在TinyMCE 3中,我如何从表格对话框中删除一个字段?(In TinyMCE 3, how can I remove a field from the table dialog?)

编程入门 行业动态 更新时间:2024-10-20 03:23:52
在TinyMCE 3中,我如何从表格对话框中删除一个字段?(In TinyMCE 3, how can I remove a field from the table dialog?)

我们想要改变TinyMCE中“插入/编辑表格”对话框的外观。 目前,该对话框显示了管理HTML5中不推荐使用的属性的字段。 例如, border属性被认为是过时的。

现在,我可以通过扩展这里提供的技术成功地从渲染的标记中删除边界属性: http : //krompaco.nu/2010/05/alter-default-initoptions-for-tinymce-in-episerver-6/

但是当我们从TinyMCE菜单按钮启动表格对话框时,“插入/编辑表格”对话框仍然会显示一个“边框”字段。 TinyMCE的工具栏选项使程序员能够控制编辑器显示的实际按钮。 https://www.tinymce.com/docs/configure/editor-appearance/#toolbarn

我们仍然希望显示“表格”按钮,但想从该对话框中删除一些弃用的字段。 我们应该怎么做?

我们正在使用采用TinyMCE 3.3.9.3版的EpiServer CMS(版本8-10)。 谢谢你的帮助。

We would like to alter the appearance of the "Insert/Edit Table" dialog in TinyMCE. Presently the dialog displays fields which manage attributes that are deprecated in HTML5. For instance, the border attribute is considered obsolete.

Now, I can successfully remove the border attribute from the rendered markup, by extending a technique presented here: http://krompaco.nu/2010/05/alter-default-initoptions-for-tinymce-in-episerver-6/

But the "Insert/Edit Table" dialog still presents a "Border" field when we launch the table dialog from the TinyMCE menu button. The toolbar option for TinyMCE enables programmers to control the actual buttons that get displayed by the editor. https://www.tinymce.com/docs/configure/editor-appearance/#toolbarn

We still want to display the Table button, but want to remove some of the deprecated fields from that dialog. How can we do this?

We are using the EpiServer CMS (versions 8-10) which employs TinyMCE version 3.3.9.3. Thanks for your help.

最满意答案

你可以使用virtualPathMappings。 我认为他们仍然受CMS8-10支持。

这意味着您必须创建aspx或ascx文件的副本,并在其中包含对话框。 从EPiServer代码中获取文件Inherit =“”并更改标记的方式,然后在web.config的部分中添加下面的配置:

<virtualPathMappings> <add url="~/yourprefix/CMS/Edit/LinkDialogName.ascx" mappedUrl="~/YourProjectFolder/LinkDialogName.ascx" /> </virtualPathMappings>

然而,这有点破解。

You could probably use virtualPathMappings. I think they're still supported in CMS8-10.

This means you have to create a copy of the aspx or ascx file with the dialog in it. Have the file Inherit="" from EPiServer code and change the markup how you want and then add the below configuration in section of web.config:

<virtualPathMappings> <add url="~/yourprefix/CMS/Edit/LinkDialogName.ascx" mappedUrl="~/YourProjectFolder/LinkDialogName.ascx" /> </virtualPathMappings>

This is a bit of a hack however.

更多推荐

TinyMCE,dialog,显示,We,电脑培训,计算机培训,IT培训"/> <meta name="descript

本文发布于:2023-08-07 01:12:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1458510.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:字段   表格   对话框中   TinyMCE   dialog

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!