gpt4 book ai didi

javascript - 在 span 和其他内联标签上启用 CKEditor4 内联

转载 作者:太空狗 更新时间:2023-10-29 13:19:31 26 4
gpt4 key购买 nike

我想知道这是否可能以及如何在 <span> 上启用 CKEditor4 内联/contenteditable 编辑功能|和其他内联元素。这是我在官方文档中找不到的内容。

使用这个标记:

<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> 报告了同样的错误标签。

最佳答案

允许支持不支持的标签的破解方法:

CKEDITOR.dtd.$editable.span = 1
CKEDITOR.dtd.$editable.a = 1

赢了。

关于javascript - 在 span 和其他内联标签上启用 CKEditor4 内联,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14575036/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com