We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using the customHTMLSanitizer option, a script error occurs when pasting data in a WYSIWYG table.
customHTMLSanitizer
const editor = new Editor({ // ... customHTMLSanitizer: html => { return sanitize(html); // user's sanitizer } });
Steps to reproduce the behavior:
When pasting data in a table, it should behave the same as a normal paste.
When pasting in a table, an error occurs because the paste value is processed as a string when no sanitizer is used or a custom sanitizer is used.
string
tui.editor/apps/editor/src/js/wwPasteContentHelper.js Line 115 in d0a1c47 container.innerHTML = sanitizer(container.innerHTML, true); tui.editor/apps/editor/src/js/wwTablePasteHelper.js Line 129 in d0a1c47 container.appendChild(sanitizer ? sanitizer(html) : html);
tui.editor/apps/editor/src/js/wwPasteContentHelper.js
Line 115 in d0a1c47
tui.editor/apps/editor/src/js/wwTablePasteHelper.js
Line 129 in d0a1c47
When pasting, the sanitizer behavior should be changed to run the default sanitizer used inside the Editor and then run customHTMLSanitizer.
The sanitized value should be returned as a string.
The text was updated successfully, but these errors were encountered:
fix: pasting error in table when using custom sanitizer (fix #980)
fa83343
c9295c7
fix: prevent empty text link on popup (resolve: #980)
e4ac07a
No branches or pull requests
Describe the bug
When using the
customHTMLSanitizer
option, a script error occurs when pasting data in a WYSIWYG table.To Reproduce
Steps to reproduce the behavior:
Expected behavior
When pasting data in a table, it should behave the same as a normal paste.
Cause
When pasting in a table, an error occurs because the paste value is processed as a
string
when no sanitizer is used or a custom sanitizer is used.Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Sanitizer specification for paste
When pasting, the sanitizer behavior should be changed to run the default sanitizer used inside the Editor and then run
customHTMLSanitizer
.Return value of custom sanitizer
The sanitized value should be returned as a
string
.The text was updated successfully, but these errors were encountered: