【发布时间】:2013-07-11 02:14:42
【问题描述】:
我将 CKEditor 用作 ExpressionEngine 的 WYGWAM 插件的一部分,但我的核心问题是 CKEditor 问题。
我对某些 UI 元素有一些自定义 HTML 标记,到目前为止,使用 templates_files 和 CKEditor 3 Templates 使用它们没有问题。
但是,由于某种原因,并非每个 HTML 模板的所有标记都被保留。在以下应用展开/折叠手风琴列表的情况下,当转到下一个
代码:
CKEDITOR.addTemplates( 'default',
{
imagesPath : CKEDITOR.getUrl( CKEDITOR.plugins.getPath( '../../../../wygwam_assets' ) + 'template-thumbs/' ),
// Template definitions.
templates :
[
/* toggler */
{
title: 'Expand & Collapse List',
image: 'testing.png',
description: 'Create a collapsed list of expandable items. When each title is clicked, the content below will animate open and reveal the full content.',
html:
'<div class="toggle_wrap"><ul>' +
'<li><div class="toggler">ITEM_TITLE</div><div class="togglee">ITEM_CONTENT</div></li>' +
'</ul></div>'
}
]
});
奇怪的是,当在
<li>
<div class="togglee">
</div>
</li>
togglee div 就在那里!但是为什么不是toggler?!
【问题讨论】:
标签: ckeditor