首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >CKeditor 5(在线构建器)缺少按钮

CKeditor 5(在线构建器)缺少按钮
EN

Stack Overflow用户
提问于 2020-07-02 11:46:02
回答 2查看 587关注 0票数 1

使用CKeditor v5联机构建器下载默认设置。

当你使用它的时候,一切都很有效。但是当使用要加载本地(以及下载的在线构建器版本)时,所有的按钮都消失了,为什么?

我们很感激你的帮助。

代码语言:javascript
运行
复制
<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>

    <script src="/ckeditor5/build/ckeditor.js"></script>
    <!-- <script src="https://cdn.ckeditor.com/ckeditor5/20.0.0/classic/ckeditor.js"></script> -->

<body>

        <div id="editor">Test Text (buttons missing)</div>
                
        <script>
            ClassicEditor
            .create( document.querySelector( '#editor' ) )
            .catch( error => {
            console.error( error );
            } );
        </script>

</body>
</html>
EN

Stack Overflow用户

发布于 2020-08-26 10:37:34

对于有角度的用户:

尽管默认的ckeditor (@ckeditor/ckeditor5-build-classic/build/ckeditor)带来了它自己的工具栏按钮,但您必须自己为自定义构建添加它(例如,https://ckeditor.com/ckeditor-5/online-builder/)

将从theCustomBuild/sample/index.html生成的工具栏数组复制到您的配置中:

html:

代码语言:javascript
运行
复制
<ckeditor [editor]="Editor" [config]="config"></ckeditor>

在你的组成部分中:

代码语言:javascript
运行
复制
public config = {
    toolbar: [
        'exportPdf',
        'heading',
        '|',
        'bold',
        ...
    ]
};
票数 0
EN
查看全部 2 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62695657

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档