Tui.editor: WYSIWYG editor removes HTML tags

Created on 26 Oct 2020  路  1Comment  路  Source: nhn/tui.editor

Describe the bug

The WYSIWYG editor inconsistently removes html tags and otherwise damages the source content, regardless of what HTML sanitizer is being used.

To Reproduce

Steps to reproduce the behavior:

  1. open the Using Custom HTML Sanitizer example in the documentation.
  2. Insert some valid HTML code in the Markdown area.
<h1>Some code that will be destroyed</h1>
<p>This code will be damaged by the WYSIWYG editor.</p>
  1. Switch from Markdown to WYSIWYG, then back. Observe that some of the content has been changed.
<h1>Some code that will be destroyed
</h1>This code will be damaged by the WYSIWYG editor.
  1. Repeat steps 2 and 3 in the Basic Example that does not use a custom sanitizer. The same content is changed in the same way.

Expected behavior

Expected HTML code to be retained, and only changed by the sanitizer specified.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome
  • Version 86.0.4240.111
Bug Question

>All comments

@breezystatic77 Paragraph is created by default in the Markdown editor. So you don't need to create a paragraph using the <p> HTML string, and it's correct that the P tag disappears when converted from WYSIWYG to Markdown. However, the part where the line breaks before and after </h1> seems to be a bug and needs to be fixed.

paragraph

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lovemine picture lovemine  路  4Comments

hellojsna picture hellojsna  路  4Comments

aarangara picture aarangara  路  3Comments

mygyugyu picture mygyugyu  路  3Comments

oguera picture oguera  路  3Comments