Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 904 Bytes

syntax.md

File metadata and controls

26 lines (19 loc) · 904 Bytes

The Syntax Module enhances the Code Block format by automatically detecting and applying syntax highlighting. The excellent highlight.js library is used as a dependency to parse and tokenize code blocks.

In general, you may configure highlight.js as needed. However, Quill expects and requires the useBR option to be false.

Example

<!-- Include your favorite highlight.js stylesheet -->
<link href="highlight.js/monokai-sublime.min.css" rel="stylesheet">

<!-- Include the highlight.js library -->
<script href="highlight.js"></script>

<script>
hljs.configure({   // optionally configure hljs
  languages: ['javascript', 'ruby', 'python']
});

var quill = new DevExpess.Quill('#editor', {
  modules: {
    syntax: true,              // Include syntax module
  }
});
</script>