【问题标题】:How do I get CKEditor to work for inline editing如何让 CKEditor 用于内联编辑
【发布时间】:2017-06-08 19:39:57
【问题描述】:

我想使用 CKEditor 来编辑我网站上的页面。内联编辑功能看起来很酷,但我无法使用它。

我将他们网站上的示例复制到我的页面之一,我可以编辑文本但 CKEditor 没有出现?控制台中没有错误。

怎么了。

【问题讨论】:

    标签: javascript ckeditor inline-editing


    【解决方案1】:

    在 CKEditor 网站上进行一些研究后发现,CKEditor 有一组受限的标签,它会弹出。你可以看到list here on the CKEDITOR.dtd.$editable object

    默认只会在以下标签上弹出

    {address: 1, article: 1, aside: 1, blockquote: 1, body: 1, details: 1, 
    div: 1, fieldset: 1, figcaption: 1, footer: 1, form: 1, 
    h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1, header: 1, hgroup: 1, main: 1,
    nav: 1, p: 1, pre: 1, section: 1}
    

    我使用的是<span>,所以它不起作用。将其更改为 <div> 并且有效。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-09
      相关资源
      最近更新 更多