启用CKEditor4内联跨度和其他内联标记(Enable CKEditor4 inline on span and other inline tags)
我想知道是否有可能以及如何在<span>和其他内联元素上启用CKEditor4内联/可控编辑功能。 这是我在官方文档中找不到的。
有了这个标记:
<span id="editable" contenteditable="true"></span>无论是标准配置(AutoInline启用)还是此配置:
<script> CKEDITOR.disableAutoInline = true; CKEDITOR.inline('editable'); // ID of the element to edit </script>报告错误: The specified element mode is not supported on element: "span". 对<a>标签报告相同的错误。
I'd like to know if it's possible and how to enable the CKEditor4 inline/contenteditable editing feature on <span> and other inline elements. This is something which I cannot find in the official docs.
With this markup:
<span id="editable" contenteditable="true"></span>And either the standard configuration (AutoInline enabled) or this configuration:
<script> CKEDITOR.disableAutoInline = true; CKEDITOR.inline('editable'); // ID of the element to edit </script>An error is reported: The specified element mode is not supported on element: "span". The same error is reported for <a> tags.
最满意答案
Hack方式允许支持不支持的标签:
CKEDITOR.dtd.$editable.span = 1 CKEDITOR.dtd.$editable.a = 1赢得。
Hack way to allow support for un supported tags:
CKEDITOR.dtd.$editable.span = 1 CKEDITOR.dtd.$editable.a = 1Win.
更多推荐
发布评论