Skip to content
This repository was archived by the owner on Apr 16, 2026. It is now read-only.
This repository was archived by the owner on Apr 16, 2026. It is now read-only.

mode: sql fails #5740

Closed
Closed

Description

@awunnenb

mode: sql fails, no highlighting
all other modes works fine.

codeMirrorOptions = { mode: 'sql', lineNumbers: true, theme: 'material' };

Activity

  1. marijnh commented on Jan 9, 2019

    @marijnh
    Member

    You're expected to pick a dialect (via a mime type string). But I agree it's not very useful for the mode to not recognize any keywords when you don't—attached patch fixes that.

  2. added a commit that references this issue on Jan 9, 2019
    12f8159
  3. awunnenb commented on Jan 9, 2019

    @awunnenb
    Author

    thank you very much. Where can i set the mime-type? In markup or by Code/Config? I can't find any code-example to set mime-type-string for special sql syntax highlighting.

  4. marijnh commented on Jan 9, 2019

    @marijnh
    Member

    Instead of "sql", you set the mode option to something like "text/x-pgsql".

  5. Fdango commented on Aug 2, 2019

    @Fdango

    @marijnh I want to set the syntax highlighting of pyhton3, just write it as text/x-python?

  6. added a commit that references this issue on Jan 6, 2020
    b98f1f8
  7. added a commit that references this issue on Jan 21, 2020
    2e3f6d4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions