当我在打字稿中使用它时,我遇到了麻烦。
我已经用npm install --save @ckeditor/ckeditor5-react @ckeditor/ckeditor5-build-classic安装了它
并使用以下方法导入:
import { CKEditor } from "@ckeditor/ckeditor5-react";
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
但是,我得到了以下错误:TS7016: Could not find a declaration
import BalloonEditor from '@ckeditor/ckeditor5-editor-balloon/src/ballooneditor';
import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
import Bold from '@ckeditor/ckeditor5-basic-styl
我试图在我的vue js应用程序中集成,我已经成功地添加了ckeditor,但是现在我想在ckeditor中的光标位置添加一些文本,单击一个按钮。为了达到这个目的,我尝试了方法。但是,在将代码添加为editor.model.change(...)时,无法在vue中获取编辑器实例。
Uncaught ReferenceError: editor is not defined
代码=>
<template>
<ckeditor
id="custom"
ref="custom"
name="custom
CKEditor 4或以上
我有表单> textarea,启用了CKEditor并运行。
我在模式对话框中有iframe,在iframe按钮中有insert_media() javascript函数。
function insert_media( element ) {
// get element html decode
element = htmlspecialchars_decode( element, 'ENT_QUOTES' );
// htmlspecialchars_decode is external function.
使用4.4.7版
我的CKEDITOR加载在页面中打开的模态窗口中。我注意到当我重新打开模型时,编辑器不会加载.解决方案是销毁实例,然后将其重新应用于文本区域。
但我似乎不能正确地摧毁它。基于,我尝试了以下所有尝试,但始终得到一个错误:
TypeError: a is null
http://domaim/ckeditor/ckeditor.js
Line 778
我尝试了以下方法(为了简单起见,我将所有尝试合并在一个代码块中,但它们是一个接一个地尝试的):
var editor = CKEDITOR.instances.mail_message;
if (editor) {
我试图从插件中捕捉一个事件:
$(document).ready(function( ) {
CKEDITOR.replaceAll( 'js-ckeditor' );
CKEDITOR.editor.on('simpleuploads.startUpload', function (ev) {
console.log(ev.data)
});
});
...but当我运行它时,我会看到错误TypeError: CKEDITOR.editor.on is not a function。我在这里做错什么了?根据文档编辑器应
我正在尝试将通知插件添加到CKEditor,但当我转到实现CKEditor的任何页面时,无论它是否尝试使用通知插件,都会收到以下错误
Uncaught TypeError: CKEDITOR.tools.eventsBuffer is not a function
at Area (plugin.js?t=D2LI:448)
at Object.init (plugin.js?t=D2LI:17)
at Object.<anonymous> (ckeditor.js:221)
at n (ckeditor.js:202)
at Array.m (cke
我有自己的自定义非jQuery,用于编写web应用程序。最近我遇到了使用IE9使用TinyMCE时遇到的问题,所以我尝试切换到CKeditor
可编辑文本被包装在div中,如下所示:
<div id='content'>
<div id='editable' contenteditable='true'>
page of inline text filled with ajax when links throughout the site are clicked
</div>
</div
我正在尝试制作一个定制的CKeditor版本。我采用了完整的编辑器,删除了一些插件并添加了占位符。当把它放到我的页面上时,我会得到:
ckeditor.js:731 Uncaught TypeError: Cannot read property 'hasFocus' of undefined
at $.showBlock (ckeditor.js:731)
at Object.execute (ckeditor.js:799)
at $.<anonymous> (ckeditor.js:799)
at ckeditor.js:31
at Ob
我们的web应用程序会定期创建和销毁ckeditor编辑器。我们在Chrome中看到了一个内存泄漏,在分析之后,似乎由于对ckeditor.tools.bind的调用,对ckeditor的引用被保留了下来。editor.destroy应该删除这些绑定吗?如果没有,有没有办法自己删除它们?
显示问题的示例代码(添加超时以查看时间是否存在问题)
var editor;
function replaceDiv() {
if ( editor ) {
editor.destroy();
}
setTimeout(func