0

I'm using CKEditor 5 and unable to make htmlEncodeOutput configuration work as expected.

Following is the code snippet I'm using but even when setting the value to true the editor's element always return decoded value.

 ClassicEditor .create(document.querySelector('#editor'), { htmlEncodeOutput: true}) .then(editor => { editorObj = editor; console.log('Editor was initialized', editor); }) .catch(err => { console.error(err.stack); }); 

Any solution or workaround would be highly appreciated.

1

1 Answer 1

1

CKEditor 5 does not have this configuration option.

The CKEditor 5 is rewriten from scratch and does not have the same configuration options as previous (CKEditor 4).

If you'd like to encode HTML you can use similar approach that is used in CKEditor 4 which simply replaces unsafe characters to HTML-safe - ie & to &.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.