ckeditor / ckeditor4

The best enterprise-grade WYSIWYG editor. Fully customizable with countless features and plugins.
https://ckeditor.com/ckeditor-4
Other
5.79k stars 2.48k forks source link

Title tag is removed but not the content resulting in unnecessary content in editor #5448

Closed arunragha89 closed 1 year ago

arunragha89 commented 1 year ago

Type of report

Bug

Provide detailed reproduction steps (if any)

When an html contains a title attribute <html><head><title> My Title >/title></head></html> and it inserted in CK Editor using the insertHTML method, the resulting content strips the title tag but not the content and the content is inserted in the body resulting in unnecessary content in editor

Expected result

Actual result

Other details

Comandeer commented 1 year ago

This behavior is intended – as it's how filtering content in CKEditor 4 works.

However, you can filter out the title element using the insertHtml event.