内联CKEditor在某些HTML标记中不起作用 [英] Inline CKEditor not working in some HTML tags

查看:73
本文介绍了内联CKEditor在某些HTML标记中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CKEditor内联标准所有版本仅适用于少数HTML标记行< div> < p> < h1> -< h6> .此内联编辑器不会弹出诸如 strong i span 等之类的元素.

CKEditor Inline standard-all version works only with few HTML tags line <div>, <p>, <h1>-<h6>. This inline editor not popping up for elements like strong, i, span, etc.

我正在grapesJS编辑器中使用此内联编辑器.

I am using this inline editor inside grapesJS editor.

这是 JSFiddle ,您可以在其中检查工作状态&代码.

Here is JSFiddle where you can check the working & code.

版本:

grapesjs-0.16.18

grapesjs - 0.16.18

ckeditor-标准版-4.14.1

我们可以使用 format_tags:"span; strong" 来解决此问题吗?还有其他方法可以解决此问题.请让我知道.

Can we able to fix this issue by using format_tags: "span;strong". Is there any other ways to fix this issue. Please let me know if any.

推荐答案

我得到的解决方案如下:

I got its solution as below:

CKEDITOR.dtd.$editable.span = 1
CKEDITOR.dtd.$editable.a = 1
CKEDITOR.dtd.$editable.strong = 1
CKEDITOR.dtd.$editable.em = 1
CKEDITOR.dtd.$editable.s = 1
CKEDITOR.dtd.$editable.u = 1
CKEDITOR.dtd.$editable.i = 1
CKEDITOR.dtd.$editable.p = 1
CKEDITOR.dtd.$editable.sub = 1
CKEDITOR.dtd.$editable.sup = 1
CKEDITOR.dtd.$editable.h1 = 1
CKEDITOR.dtd.$editable.h2 = 1
CKEDITOR.dtd.$editable.h3 = 1
CKEDITOR.dtd.$editable.h4 = 1
CKEDITOR.dtd.$editable.h5 = 1

CKEDITOR.disableAutoInline = true;

这不是核心文件更新或与之相关的东西.您可以在自定义/执行功能的地方添加此代码.

This not a core file update or something related to that. You can add this code in the place where you are customizing/doing your feature.

这是 JSFiddle ,您可以在其中检查工作状态&代码.

Here is JSFiddle where you can check the working & code.

GrapesJS编辑器中集成的嵌入式CKeditor

这篇关于内联CKEditor在某些HTML标记中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆