flutter-quill icon indicating copy to clipboard operation
flutter-quill copied to clipboard

[Quill_Html_Converter] - Converting from delta to HTML incorrectly converts HTML codes into their corresponding characters.

Open bradfrizzell opened this issue 2 years ago • 1 comments

Is there an existing issue for this?

Flutter Quill version

No response

Steps to reproduce

  1. Create a flutter quill editor instance
  2. In the document, type in any HTML character code, for example 1.
  3. Use the controller of the document to extract the delta delta = controller.document.toDelta()
  4. Convert the delta to HTML - delta.toHtml()

Expected results

You should keep the characters as the user input them into the document, e.g. toHtml should output 1

Actual results

It will output the corresponding character, in this case 1

Code sample

Code sample
    var text = quillController.document.toDelta().toHtml();

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

bradfrizzell avatar Mar 29 '24 23:03 bradfrizzell

The support for HTML is experimental and we already marked it with @experimental and it's not meant for production use, we expose it because we need it internally for pasting content from websites

EchoEllet avatar Apr 03 '24 17:04 EchoEllet