Skip to content

HighlightJS Update broke the html editor when Syntaxhighlighting is enabled #78

@simonmargesin

Description

@simonmargesin

Hello,
It seems like some update on the side of highlightjs broke the html editor. HighlightJS will insert the language-select inside the ql-editor, which will then on save copy the text from the select-options and add it to the quill text. This can be reproduced by testing the feature on the live demo:
https://benwinding.github.io/quill-html-edit-button/javascript/

Screen.Recording.2025-06-03.at.16.35.54.mov

Edit: maybe something like this could be a workaround:

let html = "";
document.querySelectorAll("#ql-editor >:not(.ql-ui)").forEach(function(element) {
html += elment.innerHTML
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions