TinyMCE:如何防止编辑器中的“<br data-mce-bogus=“1">"文本? [英] TinyMCE: How do I prevent `<br data-mce-bogus="1">` text in editor?

查看:28
本文介绍了TinyMCE:如何防止编辑器中的“<br data-mce-bogus=“1">"文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含多个 TinyMCE (v4) 编辑器的页面,它们都运行良好......直到我尝试添加:

I have a page with several TinyMCE (v4) editors, which all work great ... until I try and add:

inline: true

到他们的配置.当我这样做时,内联部分效果很好(工具栏消失了,然后在我聚焦编辑器时出现),但由于某种奇怪的原因,编辑器在那时停止工作.在编辑器中我看到:

to their configuration. When I do that the inline-ing part works great (the toolbar is gone, then appears when I focus the editor), but for some strange reason the editor stops working at that point. Inside the editor I see:

<br data-mce-bogus="1">

但我无法编辑该文本,或添加新文本,或使用编辑器做任何事情.

but I can't edit that text, or add new text, or do anything at all really with the editor.

如果我删除 inline: true,我可以让编辑器再次工作,但我真的想要内联效果.有谁知道如何在不破坏编辑器的情况下获得 inline?

I can make the editor work again if I remove inline: true, but I really want the inline effect. Does anyone have any idea how I can get inline without breaking my editors?

推荐答案

我最近遇到了这个问题,inline: true 不适用于 textarea.我将我的更改为 div,现在它按预期工作.

I recently had this problem, inline: true would not work with a textarea. I change mine to a div and it now works as expected.

这篇关于TinyMCE:如何防止编辑器中的“&lt;br data-mce-bogus=“1"&gt;"文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆