TinyMCE - 允许表格单元格元素作为有效的 html [英] TinyMCE - allow table cell element as a valid html
问题描述
我找到了 answer 可以帮助将表格单元格添加为有效身体的 html 元素,但由于某种原因它没有帮助.我需要这样做的原因是我想将此特定内容用作另一个内容的重复数据,其中包含 table
元素.
I have found the answer which could help to add table cell as a valid html element of a body, but it doesn't help for some reason. The reason I need this is that I would like to use this particular content as a repeated data for another content, which contains table
element.
初始内容示例:
<td>{{IMAGE}}</td>
<td><span style="font-weight: bold;">{{SHORT_DESCRIPTION}}</span></td>
以及剥离的内容:
{{IMAGE}}<span style="font-weight: bold;">{{SHORT_DESCRIPTION}}</span>
我已经尝试过的:
valid_children: "+body[style], +body[td]",
valid_elements : '+*[*]'
感谢任何帮助.
推荐答案
在花了几个小时深入TinyMce
的核心之后,发现问题不在于TinyMce
.自 起,表格单元格元素不能是正文的直接子元素html 规范.
After spending couple hours and digging into core of TinyMce
realized that the problem is not TinyMce
. The table cell element cannot be direct child of a body as of html specs.
所以因为 So because 我没有在评论中执行建议的步骤,而是添加了另一个 Instead of doing suggested steps in comments I have added another 这篇关于TinyMCE - 允许表格单元格元素作为有效的 html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!TinyMce
将内容包装到 iframe
,这是当前页面上的另一个 HTML 页面, 是脱光了.
TinyMce
wraps content into iframe
, which is another HTML page on the current page, the <td>
's are stripped out.textarea
,它在加载时没有用 TinyMce
包装它.我认为在我的情况下这样做更好,因为我在页面上有多个 textareas
并且不想通过使用 javascript
进行操作来影响它们.textarea
which is loaded without wrapping it with TinyMce
. I think doing this way is better in my case as I have multiple textareas
on a page and don't want to affect them all by manipulating with javascript
.
登录
关闭