版本 3.4.2 中的legacyoutput插件问题带有下划线文本

发布于 2024-11-14 11:24:13 字数 164 浏览 4 评论 0原文

如果我选择文本的一部分并尝试将其添加下划线(使用 U 按钮),则它会起作用并且 html 看起来像 ...Text...正如预期的那样。但是,当我用内容中的这些 u 标签初始化编辑器时,它们将被删除。

有人知道解决方法吗?

If i select a portion of text and try to make it underlined (using the U-Button) it works and the html looks like <u>...Text...</u> as expected. But when i initialize an editor with those u-tags in the content they are getting removed.

Does anyone know a work around?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凉风有信 2024-11-21 11:24:13

我发现 valid_elements 设置导致 tinymce 删除 u 标签。在以前版本的tinymce中从来没有遇到过这个设置的问题,但这看起来更好并且有意义:我更新了设置并添加了

-u,

这解决了问题。这里是完整的 valid_elements 设置

 //The valid_elements option defines which elements will remain in the edited text when the editor saves.
valid_elements: "@[id|class|title|style]," +
"a[name|href|target|title]," +
"#p,-ol,-ul,-li,br,img[src],-sub,-sup,-b,-i,-u," +
"-span,hr", 

I found out that the valid_elements setting was causing tinymce to remove the u-tags. Never had this problem with exactly this setting in former versions of tinymce, but this looks somewhat better and makes sense: I updated the setting and added

-u,

This solved the problem. Here the full valid_elements setting

 //The valid_elements option defines which elements will remain in the edited text when the editor saves.
valid_elements: "@[id|class|title|style]," +
"a[name|href|target|title]," +
"#p,-ol,-ul,-li,br,img[src],-sub,-sup,-b,-i,-u," +
"-span,hr", 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文