标签: ckeditor5

如何设置CKEditor 5的高度(经典编辑器)

在CKEditor 4中更改编辑器高度,有一个配置选项:config.height.

如何更改CKEditor 5的高度?(经典编辑)

ckeditor ckeditor5

30
推荐指数
9
解决办法
2万
查看次数

CKEditorError: ckeditor-duplicated-modules: 一些 CKEditor 5 模块被复制

import CKEditor from '@ckeditor/ckeditor5-react';
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
import Base64UploadAdapter from '@ckeditor/ckeditor5-upload/src/adapters/base64uploadadapter';
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明 获取 ckeditor 5 重复模块错误。任何人都可以帮助我。提前致谢。

ckeditor reactjs ckeditor5

14
推荐指数
4
解决办法
2万
查看次数

错误:找不到模块 '@ckeditor/ckeditor5-build-classic' angular 9 的声明文件

我想在 angular 9 中使用 ckeditor,我按照https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/frameworks/angular.html 中的说明进行操作, 但在我导入 '@ckeditor/ 时显示错误ckeditor5-build-classic':

Could not find a declaration file for module '@ckeditor/ckeditor5-build-classic'. 

'a:/repositories/BasimStore/source/Web/Frontend/node_modules/@ckeditor/ckeditor5-build-classic/build/ckeditor.js' implicitly has an 'any' type.
  Try `npm install @types/ckeditor__ckeditor5-build-classic` if it exists or add a new declaration (.d.ts) file containing `declare module '@ckeditor/ckeditor5-build-classic';`
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

我在 package.json 中有 "@ckeditor/ckeditor5-angular": "^1.2.3" 和 "@ckeditor/ckeditor5-build-classic": "^20.0.0" 但它仍然显示错误。我在 ckeditor5-build-classic 文件夹中找不到 index.d.ts。我应该如何解决这个错误?

angular ckeditor5 angular9

13
推荐指数
3
解决办法
5365
查看次数

如何在CKEDITOR 5中获得工具栏可用项目?

我想在CKEDITOR 5中配置工具栏.我看了一下文档.

https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/builds/guides/integration/configuration.html

然而,与我的问题相关的唯一脚本是:

Array.from( editor.ui.componentFactory.names );
Run Code Online (Sandbox Code Playgroud)

前端程序员很难理解.我在哪里放这个脚本?如何输出结果?有详细的教程吗?

事实上,如果CKEDITOR只是将可用的项目放在文档中,那就太好了.这将节省很多麻烦.

谢谢!

ckeditor5

12
推荐指数
4
解决办法
1万
查看次数

在change()中停止操作

有没有办法在model.document.on('change')中停止删除操作?

我用这段代码听改变:

model.document.on('change',(eventInfo,batch) => {
// My code here.
}
Run Code Online (Sandbox Code Playgroud)

它工作得很好,就我所知,并且可以检查所有变化.但似乎没有办法拒绝改变.

我尝试在不同的地方调用eventInfo.stop()和reset().这两种方法都会停止更改,但 如果我尝试停止删除操作,则以后总是会导致 模型 - nodelist-offset-out-of-bounds: exception.

我想要做的是更改文本删除的工作方式,因此当用户删除文本时,我创建了一个标记,用于标记哪些文本已被用户"删除",而不是从编辑器中删除文本.(用于可选的更改控制).

ckeditor5

12
推荐指数
1
解决办法
235
查看次数

CKEditor 5-如何插入一些HTML(又称源代码模式)?

我希望能够从WYSIWYG切换到纯HTML,例如在YouTube视频中插入IFrame。到目前为止,对于标准CKEditor 5构建,尚无有关如何执行此操作的文档。

除了CKEditor 5外,是否有与Source Editing Area插件等效的插件?

javascript ckeditor ckeditor5

11
推荐指数
2
解决办法
7582
查看次数

从ckeditor获取xml 5

如何将ckeditor的输出作为XML而不是HTML?

我以为我可以使用, editor.data.processor=new XmlDataProcessor();但这似乎只适用于编辑器在调用时现在需要XML editor.setData()editor.getData()仍然返回HTML而不是XML的输入.数据不包含在根元素中,并且<img>标记未关闭.

toData应该转换为XML 的方法实现如下,它看起来不像是因为它试图_htmlWriter用来转换为XML 而可以工作的东西.所以它看起来像是一个没有人实现过的功能.

toData( viewFragment ) {
    // Convert view DocumentFragment to DOM DocumentFragment.
    const domFragment = this._domConverter.viewToDom( viewFragment, document );

    // Convert DOM DocumentFragment to XML output.
    // There is no need to use dedicated for XML serializing method because BasicHtmlWriter works well in this case.
    return this._htmlWriter.getHtml( domFragment );
}
Run Code Online (Sandbox Code Playgroud)

javascript xml ckeditor ckeditor5

10
推荐指数
1
解决办法
388
查看次数

如何在CKEditor 5中启用图像上传支持?

我将使用ckeditor v5进入我的项目.我试图使用图片插件,但我找不到有关它的足够信息.

如果你在这里看到Demoe ,你可以使用Drag&Drop轻松上传图像.但是,当我尝试拖放图像时,我会尝试使用下载气囊拉链时没有任何反应.也没有错误.

有没有办法在downladable变体中使用此图像支持?

javascript ckeditor ckeditor5

9
推荐指数
4
解决办法
2万
查看次数

VueJS CKeditor5 上传图片

在 Vuejs 中使用 CKeditor5 上传图片时遇到问题。

首先尝试了简单上传适配器,它给了我以下错误:

原因:CKEditorError: ckeditor-duplicated-modules: 某些 CKEditor 5 模块重复。阅读更多:https : //ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-ckeditor-duplicated-modules

我尝试制作上传适配器。作为上传适配器,我拿了这个例子并修改了 url。uploadadapter.js 文件如下所示:

    export default class UploadAdapter {
        constructor( loader ) {
            // The file loader instance to use during the upload.
            this.loader = loader;
        }
    
        // Starts the upload process.
        upload() {
            return this.loader.file
                .then( file => new Promise( ( resolve, reject ) => {
                    this._initRequest();
                    this._initListeners( resolve, reject, file );
                    this._sendRequest( file );
                } ) );
        }
    
        // Aborts …
Run Code Online (Sandbox Code Playgroud)

ckeditor vue.js ckeditor5

9
推荐指数
1
解决办法
5585
查看次数

如何进行CKEditor 5图像上传?

ClassicEditor
    .create( editorElement, {
        ckfinder: {
            uploadUrl: 'my_server_url'
        }
    } )
    .then( ... )
    .catch( ... );
Run Code Online (Sandbox Code Playgroud)

我的服务器响应应该是什么?我在后端使用Java.无论我的回答是什么,它都会抛出一个"无法上传文件"对话框.

ckeditor ckeditor5

8
推荐指数
2
解决办法
1万
查看次数

标签 统计

ckeditor5 ×10

ckeditor ×7

javascript ×3

angular ×1

angular9 ×1

reactjs ×1

vue.js ×1

xml ×1