ckeditor - 在编辑器外部编辑 contenteditable div

发布于 2024-12-22 10:50:37 字数 195 浏览 5 评论 0原文

我的 ckeditor 中有 div(仅限工具栏):

editor = CKEDITOR.appendTo('topSpace',
{
    editingBlock: false
});

并且我想在 contenteditable div 中编辑文本,但工具栏中的按钮不适用于所选文本。有什么解决办法吗?

I have div with my ckeditor (only toolbar):

editor = CKEDITOR.appendTo('topSpace',
{
    editingBlock: false
});

and I want to edit text in my contenteditable div, but buttons in toolbar don't work for selected text. Any solution?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

海螺姑娘 2024-12-29 10:50:37

CKEditor 使用 iframe 进行编辑,这与通过 contenteditable 使页面内的 div 可编辑不同。 有一些可编辑内容的编辑器可供您使用:

  • Aloha
  • 幸运的是, com/bergie/hallo" rel="nofollow noreferrer">你好
  • 水星

此答案的更多信息:https://stackoverflow.com/a/6756414/232288

CKEditor uses iframe for editing, which is different from making on-page divs editable via contenteditable. Fortunately there are some contenteditable editors out there for you:

More from this answer: https://stackoverflow.com/a/6756414/232288

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文