如何禁用跟踪更改并在ckeditor中启用跟踪

时间:2018-01-25 07:04:27

标签: javascript jquery angularjs ckeditor ckeditor4.x

如何禁用跟踪更改并在ckeditor enter image description here

中启用跟踪

正如您在图像中看到的那样,启用了跟踪并禁用了跟踪更改。 我需要这个条件但是没有得到它。

请帮帮我

1 个答案:

答案 0 :(得分:0)

根据您要显示的图片,您需要:

  • 启用更改跟踪
  • 隐藏跟踪更改的可见性(即显示更改=== false)

创建对曲目更改插件的引用,然后使用值 false 调用插件的toggleShow()函数:

const editorInstance = CKEDITOR.instances['editor-1']; // Where 'editor-1' is the name of your editor's instance
const liteRef = editorInstance.plugins.lite.findPlugin(editorInstance);
liteRef.toggleShow(false);

注意:

  • 启用显示/隐藏按钮与设置更改可见性不同。 E.g:

  • 每当您启用更改跟踪功能并启用跟踪功能时,显示/隐藏按钮已启用,并且更改的可见性设置为true。< / p>