admin管理员组文章数量:1297011
I'm using CK editor 5 to input some data on our application, and it accepts html in the 'HTML embed' plugin.
On this plugin configuration, we can sanitize the entered data as follows:
htmlEmbed: {
showPreviews: true,
sanitizeHtml: ( inputHtml ) => {
const outputHtml = sanitize( inputHtml );
return {
html: outputHtml,
hasChanged: true
};
}
}
and the sanitize function can be either locally defined or a 3pp, up to the application. This works well when you are previewing the html inside ckeditor, but once you request it the data from the editor, it returns the original html, not the sanitized one.
Is there any way to retrieve the editor value with the sanitized html instead of getting the original one user typed? Sanitizing the entire output is not a option, as I wanna restrict the html tags used in the html editor and they can
本文标签: ckeditorCk editor output unsanitized html embed valueStack Overflow
版权声明:本文标题:ckeditor - Ck editor output un-sanitized html embed value - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741646416a2390209.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论