Open aerjotl opened 4 days ago
try this
const quill = new Quill('#editor', {
modules: {
syntax: true,
toolbar: '#toolbar-container',
keyboard: {
bindings: {
"code exit": null,
},
}
},
placeholder: 'Compose an epic...',
theme: 'snow',
});
Or you can adjust the binding of Enter yourself.
I am implementing a custom editor using Quill 2.0.2. I want it to act as a code editor with syntax highlighting for my own custom language.
I have added highlight.js implementation and the highlighting is working as expected. The problem is when I add multiple newlines in the editor the code block "splits" into two separate blocks. Does anyone know how to disable it? I want users to be able to edit inside the code block only.
Are there any other ideas for forcing Quill to be a code editor? I know that there are other code editors out there, but we are using Quill in several other places on our website and we would like to keep the user experience consistent.