Fckeditor 删除空标签!如何修复?

发布于 2024-12-14 06:41:03 字数 200 浏览 2 评论 0原文

如果您输入代码,FCKeditor将删除该标签。

启动 FCKEditor,进入源模式(在 FCKEditor 中)。输入(锚点的内容区域中没有任何内容),进入所见即所得模式。返回源模式,您会看到空源。

我该如何解决这个问题?

If you enter the code <a href="/link"></a>, FCKeditor will remove the tag.

Start an FCKEditor, go to source mode (in FCKEditor). Type in <a href="bob"></a> (note nothing in the contents area of the anchor), go to WYSIWYG mode. Go back to source mode and you see empty source.

How I can fix this?

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

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

发布评论

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

评论(3

盗琴音 2024-12-21 06:41:04

这些都不是有效的链接。链接必须包含某些内容

如果要放置锚点,请使用 Bob

如果要链接到锚点,请使用 链接到 Bob

Neither of those are valid links. A link must contain something.

If you want to place an anchor, use <a name="bob">Bob</a>

If you want to link to an anchor, use <a href="#bob">Link to Bob</a>

黎歌 2024-12-21 06:41:04

感谢大家,我修复了 - 在文件 js/fckeditorcode_gecko.js 中注释所有

if ( htmlNode.innerHTML.Trim().length == 0 && !htmlNode.name )
                        return false ;   

thanks to all, I fixed - in file js/fckeditorcode_gecko.js comment all

if ( htmlNode.innerHTML.Trim().length == 0 && !htmlNode.name )
                        return false ;   
月棠 2024-12-21 06:41:04

...如果您有权访问设置,如果我没有记错的话,您可以告诉编辑器不要打扰您的代码。如果您无权访问这些设置,那么您可能会运气不好。

编辑:如果您需要任何空标签,那么 DIV 就可以工作。 Span 不会,但 div 会,今天发现。

... if you have access to the settings, If I'm not mistaken you can tell editor to leave you code alone. If you don't have access to the settings, you might be out of luck.

EDIT: If you need any empty tag then DIV will work. Span won't but div will, found out today.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文