FCKEditor 破坏 HTML 表单

发布于 2024-09-02 20:48:23 字数 326 浏览 3 评论 0原文

我正在使用 FCKEditor 的 CMS 中将一些独立的 HTML 表单复制为页面,只需将相关代码复制并粘贴到编辑器中即可。

但是,当我保存并查看页面时,HTML 已更改,并且标记已移至打开标记的正下方,而不是表单的底部。这显然会使表单中的所有字段(包括提交按钮)变得无用。

有没有办法告诉 FCKEditor 我知道我在做什么并且我不需要它来验证 HTML 输出?

不幸的是,这是一个托管的 CMS 服务(实际上是电子邮件群发工具的一部分),因此对配置进行更改意味着我需要通过公司的支持系统,这很好,但他们一直无法解决这个问题我还没有,所以我希望得到他们的答案。

谢谢!

I'm in the process of reproducing some standalone HTML forms as pages in a CMS that uses FCKEditor by simply copying and pasting the relevant code into the editor.

But when I save and view the page, the HTML has been changed and the tag has been moved up to just below the open tag -- and not at the bottom of the form. This obviously renders all of the fields in the form, including the submit button, useless.

Is there a way to tell FCKEditor that I know what I'm doing and I don't need it to validate the HTML output?

Unfortunately this is a hosted CMS service (actually part of an email blast tool) so making changes to the configuration will mean I need to go through the company's support system, which is fine -- but they haven't been able to solve it for me yet, so I'm hoping to get the answers for them.

Thanks!

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

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

发布评论

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

评论(2

莫多说 2024-09-09 20:48:23

这是一件有点困难的事情,因为据我所知,“修复”“损坏的”HTML 不一定是所见即所得的编辑器,而是浏览器的 HTML 编辑引擎本身,而且通常几乎不可能说服他们停止这样做这。

您必须显示确切的来源才能获得详细的反馈,但请检查是否 protectedSource 适合您。它应该保护您指定的正则表达式所覆盖的代码。

This is a bit of a difficult thing because as far as I know, it's not necessarily the WYSIWYG editors that "fix" "broken" HTML, it's the browsers' HTML editing engines themselves, and it's often near impossible to talk them out of doing this.

You'd have to show your exact source to get detailed feedback, but check out whether protectedSource is something for you. It's supposed to protect code that is covered by the regular expression you specify.

白云不回头 2024-09-09 20:48:23

我不确定 FCKEditor,但您可能需要考虑切换到 TinyMCE。 TinyMCE 允许您编辑允许的标签列表,如果您愿意,还可以完全关闭 HTML 验证。

I'm not sure about FCKEditor, but you might want to consider switching to TinyMCE. TinyMCE allows you to both edit a list of allowed tags, and to turn off HTML validation off completely if you like.

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