Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlight bug when using formats #4579

Open
louis-ev opened this issue Jan 27, 2025 · 0 comments
Open

Syntax highlight bug when using formats #4579

louis-ev opened this issue Jan 27, 2025 · 0 comments

Comments

@louis-ev
Copy link

louis-ev commented Jan 27, 2025

Hi,

on quill 2.0.3, when adding hljs to enable code syntax highlight, using the formats option prevents the highlighting to work. I've tried adding all possible values in formats but nothing works.

This works:

const quill = new Quill('#editor', {
  modules: {
    syntax: true,            
    toolbar: [['code-block']]
  },
  theme: 'snow',
});

This doesn't:

const quill = new Quill('#editor', {
  modules: {
    syntax: true,             
    toolbar: [['code-block']] 
  },
  theme: 'snow',
  formats: ['code-block', 'code', 'color']
});

Codepen with the issue: https://codepen.io/louis-ev/pen/qEWLrGL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant