ckeditor5 相关问题

CKEditor 5是一组随时可用的富文本编辑器,使用强大的框架创建,使您能够创建任何类型的文本编辑解决方案,并在其中包含实时协作编辑。将此标记用于任何与CKEditor 5相关的问题。有关CKEditor 4的问题,请使用“ckeditor4.x”标签。

CKeditor 自定义上传器,PHP 原生,“无法上传文件:download.jpeg。”

我正在使用 PHP、JS,目前正在尝试使用 CKEditor 5 的 Build 版本。目前,我被图像上传困住了。我必须用 JavaScript 开发自己的上传器。 这是 Java...

回答 1 投票 0

在CKEditor5中调用writer.setAttribute()时如何避免属性操作属性存在?

我正在开发一个简单的CKEditor5插件。 该插件的一部分是一个“命令”,其执行方式如下: 执行(选项){ const contentItemUtils = this.editor.plugins.get('

回答 2 投票 0

django-ckeditor-5 工具栏未显示

我正在使用 django-ckeditor,由于支持结束而升级到 ckeditor-5,但我在前端看不到它。在管理面板中正常工作 管理面板: 前端: 形式.py: 班级

回答 1 投票 0

JBOSS 在响应标头中附加 charset=ISO-8859-1

JBOSS v7.4 将 charset=ISO-8859-1 附加到我的 js 文件中,因为浏览器对于具有特殊字符的文件会抛出“意外标记”错误。 相同的文件在 Weblogic 上正确加载并且......

回答 1 投票 0

CKEditor 5 - 插入文本

是否可以在当前选择的编辑器中插入文本? 我努力了 从 '@ckeditor/ckeditor5-engine/src/model/text' 导入文本; 函数插入文本() { 让文本=新文本('测试...

回答 5 投票 0

Ckeditor 5 和 ASP.NET MVC 捆绑错误出现 NullReferenceException?

为了隔离任何问题以便重现该问题,我在 VS 2017 中使用 ASP.NET MVC 模板(.NET Framework 4.6.1)开始了一个全新的项目。 我将最新的ckeditor5添加到/Scripts/

回答 4 投票 0

为什么 CKEditor 5 工具栏中缺少一些指定按钮?

我在我的项目中实现了 De CoupledEditor CKEditor 5: 解耦编辑...

回答 1 投票 0

为什么特殊字符列表和源代码编辑按钮在官方 CKEditor 5 版本中不起作用?

我根据官网De Coupled文档构建了CKEditor 5:https://ckeditor.com/ckeditor-5/online-builder/ 但有 2 个按钮在此版本中不起作用:特殊字符(空...

回答 1 投票 0

ckEditor 5 字体和 Ident 依赖项/模块包含内联样式并违反我的 CSP

我使用 CKEditor 5 进行自定义构建,将字体和缩进模块包含到 github 上存在的基本构建中。我的 Web 环境 CSP 不允许任何内联样式或 javascript。 ...

回答 1 投票 0

需要帮助在 MERN 堆栈应用程序中通过 CKEditor5 上传图像

我之前见过几个人问这个问题,但没有人遇到我的问题。 我已经在我的网络应用程序中使用 CKEditor 一段时间了,没有出现任何问题,但我最近注意到图像上传不...

回答 1 投票 0

如何告诉ckeditor5默认使用我的自定义标题类型

我正在使用 @ckeditor/[email protected] 的自定义版本 标题:{ 选项: [ { 模型 : 'inlineParagraph', 查看...

回答 1 投票 0

Ckeditor5 - 从 Office (Word) 复制和粘贴不适用于列表

我正在尝试在我的网站中实现Ckeditor5,我想让用户从word复制和粘贴,但列表不能完全工作。 当我复制这个 1.Dfgdfgdfg dfgdfgdfgdf 2.Dfgdfgdfg

回答 1 投票 0

CKEditor - 将编辑器大小限制为小于窗口高度

将 CKEditor 5 与 React 结合使用。我正在寻找更好的解决方案来限制编辑器的高度。默认情况下,它似乎设置了高度以适合编辑器中的内容。在我的应用程序中,

回答 1 投票 0

如何删除TYPO3 12 CKEditor 5中的对齐选项?

如何在您自己的预设中排除某些对齐选项? 虽然我没有指定“right”和“justify”,但它们仍然显示: 进口: - {资源:'EXT:rte_ckedi...

回答 1 投票 0

CKEditor5:Django 中的图像上传问题 (django-ckeditor-5)

我在将 CKEditor5 集成到 Django 项目时遇到问题。具体来说,图像上传功能无法正常工作。当我尝试上传图像时,我收到一条警报...

回答 1 投票 0

Angular 17/CdkEditor

在Angular 17中,我无法将CKeditor集成到项目中。在我想使用的组件中: "message": "组件'CKEditorComponent'出现在'imports'中,但不是独立的......

回答 1 投票 0

如何在我的 Vue 应用程序中集成自定义 bulid CKEditor 5

我已经从 CKEditor 5 Online Builder 进行了自定义构建并下载了它,但它是在 Webpack 中构建的,我在 Vue 3 项目中使用 Vite。 我试过下面的代码: 导入CKEd...</desc> <question vote="0"> <p>我已经从 <a href="https://ckeditor.com/ckeditor-5/online-builder/" rel="nofollow noreferrer">CKEditor 5 Online Builder</a> 进行了自定义构建并下载了它,但它是在 Webpack 中构建的,我在 Vue 3 项目中使用 Vite。</p> <p>我尝试过以下代码:</p> <pre><code>&lt;script setup&gt; import CKEditor from &#34;@/ckeditor5-custom-build/build/ckeditor&#34; import { component as ckeditor } from &#34;@ckeditor/ckeditor5-vue&#34;; const editor = ref(CKEditor); const editorData = ref(&#34;&#34;); const editorConfig = ref({}); &lt;/script&gt; &lt;template&gt; &lt;ckeditor :editor=&#34;editor&#34; :config=&#34;editorConfig&#34; v-model=&#34;editorData&#34;&gt;&lt;/ckeditor&gt; &lt;/template&gt; </code></pre> <p>我遇到以下错误:</p> <blockquote> <p>找不到模块:错误:无法解析“ckeditor5-custom-build/build/ckeditor”</p> </blockquote> </question> <answer tick="false" vote="0"> <p>从<a href="https://ckeditor.com/ckeditor-5/online-builder/" rel="nofollow noreferrer">CKEditor 5 Online Builder</a>下载构建zip文件后。解压 zip 并转到文件夹打开 package.json 文件</p> <pre><code>{ ... &#34;dependencies&#34;: { &#34;@ckeditor/ckeditor5-alignment&#34;: &#34;41.2.1&#34;, &#34;@ckeditor/ckeditor5-autoformat&#34;: &#34;41.2.1&#34;, &#34;@ckeditor/ckeditor5-basic-styles&#34;: &#34;41.2.1&#34;, &#34;@ckeditor/ckeditor5-block-quote&#34;: &#34;41.2.1&#34;, &#34;@ckeditor/ckeditor5-cloud-services&#34;: &#34;41.2.1&#34;, &#34;@ckeditor/ckeditor5-editor-classic&#34;: &#34;41.2.1&#34;, &#34;@ckeditor/ckeditor5-essentials&#34;: &#34;41.2.1&#34;, &#34;@ckeditor/ckeditor5-font&#34;: &#34;41.2.1&#34;, &#34;@ckeditor/ckeditor5-heading&#34;: &#34;41.2.1&#34;, &#34;@ckeditor/ckeditor5-image&#34;: &#34;41.2.1&#34;, &#34;@ckeditor/ckeditor5-indent&#34;: &#34;41.2.1&#34;, &#34;@ckeditor/ckeditor5-link&#34;: &#34;41.2.1&#34;, &#34;@ckeditor/ckeditor5-list&#34;: &#34;41.2.1&#34;, &#34;@ckeditor/ckeditor5-media-embed&#34;: &#34;41.2.1&#34;, &#34;@ckeditor/ckeditor5-paragraph&#34;: &#34;41.2.1&#34;, &#34;@ckeditor/ckeditor5-paste-from-office&#34;: &#34;41.2.1&#34;, &#34;@ckeditor/ckeditor5-table&#34;: &#34;41.2.1&#34;, &#34;@ckeditor/ckeditor5-typing&#34;: &#34;41.2.1&#34;, &#34;@ckeditor/ckeditor5-undo&#34;: &#34;41.2.1&#34;, &#34;@ckeditor/ckeditor5-upload&#34;: &#34;41.2.1&#34; }, ... } </code></pre> <p>从 package.json 文件中复制除 devDependency 之外的所有依赖项,并将其粘贴到项目 package.json 文件中,然后运行 <pre><code>npm i</code></pre> 命令</p> <p>转到解压文件夹中的 <pre><code>src</code></pre> 子文件夹并打开 <pre><code>ckeditor.ts</code></pre> 文件</p> <p></p><div data-babel="false" data-lang="js" data-hide="true" data-console="false"> <div> <pre><code>/** * @license Copyright (c) 2014-2024, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ import { ClassicEditor } from &#39;@ckeditor/ckeditor5-editor-classic&#39;; import { Alignment } from &#39;@ckeditor/ckeditor5-alignment&#39;; import { Autoformat } from &#39;@ckeditor/ckeditor5-autoformat&#39;; import { Bold, Italic, Strikethrough, Underline } from &#39;@ckeditor/ckeditor5-basic-styles&#39;; import { BlockQuote } from &#39;@ckeditor/ckeditor5-block-quote&#39;; import { CloudServices } from &#39;@ckeditor/ckeditor5-cloud-services&#39;; import type { EditorConfig } from &#39;@ckeditor/ckeditor5-core&#39;; import { Essentials } from &#39;@ckeditor/ckeditor5-essentials&#39;; import { FontBackgroundColor, FontColor, FontFamily, FontSize } from &#39;@ckeditor/ckeditor5-font&#39;; import { Heading } from &#39;@ckeditor/ckeditor5-heading&#39;; import { AutoImage, Image, ImageCaption, ImageInsert, ImageResize, ImageStyle, ImageToolbar, ImageUpload } from &#39;@ckeditor/ckeditor5-image&#39;; import { Indent } from &#39;@ckeditor/ckeditor5-indent&#39;; import { AutoLink, Link, LinkImage } from &#39;@ckeditor/ckeditor5-link&#39;; import { List, ListProperties } from &#39;@ckeditor/ckeditor5-list&#39;; import { MediaEmbed } from &#39;@ckeditor/ckeditor5-media-embed&#39;; import { Paragraph } from &#39;@ckeditor/ckeditor5-paragraph&#39;; import { PasteFromOffice } from &#39;@ckeditor/ckeditor5-paste-from-office&#39;; import { Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar } from &#39;@ckeditor/ckeditor5-table&#39;; import { TextTransformation } from &#39;@ckeditor/ckeditor5-typing&#39;; import { Undo } from &#39;@ckeditor/ckeditor5-undo&#39;; import { Base64UploadAdapter } from &#39;@ckeditor/ckeditor5-upload&#39;; // You can read more about extending the build with additional plugins in the &#34;Installing plugins&#34; guide. // See https://ckeditor.com/docs/ckeditor5/latest/installation/plugins/installing-plugins.html for details. class Editor extends ClassicEditor { public static override builtinPlugins = [ Alignment, AutoImage, AutoLink, Autoformat, Base64UploadAdapter, BlockQuote, Bold, CloudServices, Essentials, FontBackgroundColor, FontColor, FontFamily, FontSize, Heading, Image, ImageCaption, ImageInsert, ImageResize, ImageStyle, ImageToolbar, ImageUpload, Indent, Italic, Link, LinkImage, List, ListProperties, MediaEmbed, Paragraph, PasteFromOffice, Strikethrough, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, TextTransformation, Underline, Undo ]; public static override defaultConfig: EditorConfig = { toolbar: { items: [ &#39;heading&#39;, &#39;|&#39;, &#39;bold&#39;, &#39;italic&#39;, &#39;underline&#39;, &#39;alignment&#39;, &#39;|&#39;, &#39;link&#39;, &#39;strikethrough&#39;, &#39;bulletedList&#39;, &#39;numberedList&#39;, &#39;|&#39;, &#39;outdent&#39;, &#39;indent&#39;, &#39;|&#39;, &#39;fontSize&#39;, &#39;fontFamily&#39;, &#39;|&#39;, &#39;fontBackgroundColor&#39;, &#39;fontColor&#39;, &#39;|&#39;, &#39;imageUpload&#39;, &#39;|&#39;, &#39;undo&#39;, &#39;redo&#39; ] }, language: &#39;en&#39;, image: { toolbar: [ &#39;imageTextAlternative&#39;, &#39;toggleImageCaption&#39;, &#39;imageStyle:inline&#39;, &#39;imageStyle:block&#39;, &#39;imageStyle:side&#39;, &#39;linkImage&#39; ] }, table: { contentToolbar: [ &#39;tableColumn&#39;, &#39;tableRow&#39;, &#39;mergeTableCells&#39;, &#39;tableCellProperties&#39;, &#39;tableProperties&#39; ] } }; } export default Editor;</code></pre> </div> </div> <p></p> <p>从<pre><code>ckeditor.ts</code></pre>文件中复制所有导入语句</p> <p>创建名为 <pre><code>Editor.vue</code></pre> 的新 Vue 文件并粘贴导入语句</p> <p>编辑器.vue</p> <pre><code>&lt;script setup&gt; import { ClassicEditor } from &#39;@ckeditor/ckeditor5-editor-classic&#39;; import { Alignment } from &#39;@ckeditor/ckeditor5-alignment&#39;; import { Autoformat } from &#39;@ckeditor/ckeditor5-autoformat&#39;; import { Bold, Italic, Strikethrough, Underline } from &#39;@ckeditor/ckeditor5-basic-styles&#39;; import { BlockQuote } from &#39;@ckeditor/ckeditor5-block-quote&#39;; import { CloudServices } from &#39;@ckeditor/ckeditor5-cloud-services&#39;; import type { EditorConfig } from &#39;@ckeditor/ckeditor5-core&#39;; import { Essentials } from &#39;@ckeditor/ckeditor5-essentials&#39;; import { FontBackgroundColor, FontColor, FontFamily, FontSize } from &#39;@ckeditor/ckeditor5-font&#39;; import { Heading } from &#39;@ckeditor/ckeditor5-heading&#39;; import { AutoImage, Image, ImageCaption, ImageInsert, ImageResize, ImageStyle, ImageToolbar, ImageUpload } from &#39;@ckeditor/ckeditor5-image&#39;; import { Indent } from &#39;@ckeditor/ckeditor5-indent&#39;; import { AutoLink, Link, LinkImage } from &#39;@ckeditor/ckeditor5-link&#39;; import { List, ListProperties } from &#39;@ckeditor/ckeditor5-list&#39;; import { MediaEmbed } from &#39;@ckeditor/ckeditor5-media-embed&#39;; import { Paragraph } from &#39;@ckeditor/ckeditor5-paragraph&#39;; import { PasteFromOffice } from &#39;@ckeditor/ckeditor5-paste-from-office&#39;; import { Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar } from &#39;@ckeditor/ckeditor5-table&#39;; import { TextTransformation } from &#39;@ckeditor/ckeditor5-typing&#39;; import { Undo } from &#39;@ckeditor/ckeditor5-undo&#39;; import { Base64UploadAdapter } from &#39;@ckeditor/ckeditor5-upload&#39;; &lt;script&gt; </code></pre> <p>安装<pre><code>@ckeditor/ckeditor5-vue</code></pre>包并导入它</p> <pre><code>&lt;script setup&gt; import { ClassicEditor } from &#39;@ckeditor/ckeditor5-editor-classic&#39;; ... ... ... import { component as ckeditor } from &#34;@ckeditor/ckeditor5-vue&#34;; /** &lt;-- Here like this **/ const editor = ref(ClassicEditor); const editorData = defineModel(); const editorConfig = ref({ plugins: [] }) &lt;script&gt; &lt;template&gt; &lt;ckeditor :editor=&#34;editor&#34; :config=&#34;editorConfig&#34; v-model=&#34;editorData&#34;&gt;&lt;/ckeditor&gt; &lt;/template&gt; </code></pre> <p>打开<pre><code>ckeditor.ts</code></pre>并复制builtinPlugins数组中的所有元素</p> <pre><code>... class Editor extends ClassicEditor { public static override builtinPlugins = [ Alignment, AutoImage, AutoLink, Autoformat, Base64UploadAdapter, BlockQuote, Bold, CloudServices, Essentials, FontBackgroundColor, FontColor, FontFamily, FontSize, Heading, Image, ImageCaption, ImageInsert, ImageResize, ImageStyle, ImageToolbar, ImageUpload, Indent, Italic, Link, LinkImage, List, ListProperties, MediaEmbed, Paragraph, PasteFromOffice, Strikethrough, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, TextTransformation, Underline, Undo ]; ... </code></pre> <p>返回 Editor.vue 文件并将其粘贴到 <pre><code>editorConfig</code></pre> 变量插件属性</p> <pre><code>... const editor = ref(ClassicEditor); const editorData = defineModel(); const editorConfig = ref({ plugins: [ Alignment, AutoImage, AutoLink, Autoformat, Base64UploadAdapter, BlockQuote, Bold, CloudServices, Essentials, FontBackgroundColor, FontColor, FontFamily, FontSize, Heading, Image, ImageCaption, ImageInsert, ImageResize, ImageStyle, ImageToolbar, ImageUpload, Indent, Italic, Link, LinkImage, List, ListProperties, MediaEmbed, Paragraph, Strikethrough, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, TextTransformation, Underline, Undo ], }); ... </code></pre> <p>打开 ckeditor.ts 并复制具有值的所有属性 <pre><code>defaultConfig</code></pre> 并将其粘贴到 Editor.vue</p> <pre><code>&lt;script setup&gt; import { ClassicEditor } from &#39;@ckeditor/ckeditor5-editor-classic&#39;; import { Alignment } from &#39;@ckeditor/ckeditor5-alignment&#39;; import { Autoformat } from &#39;@ckeditor/ckeditor5-autoformat&#39;; import { Bold, Italic, Strikethrough, Underline } from &#39;@ckeditor/ckeditor5-basic-styles&#39;; import { BlockQuote } from &#39;@ckeditor/ckeditor5-block-quote&#39;; import { CloudServices } from &#39;@ckeditor/ckeditor5-cloud-services&#39;; import { Essentials } from &#39;@ckeditor/ckeditor5-essentials&#39;; import { FontBackgroundColor, FontColor, FontFamily, FontSize } from &#39;@ckeditor/ckeditor5-font&#39;; import { Heading } from &#39;@ckeditor/ckeditor5-heading&#39;; import { AutoImage, Image, ImageCaption, ImageInsert, ImageResize, ImageStyle, ImageToolbar, ImageUpload } from &#39;@ckeditor/ckeditor5-image&#39;; import { Indent } from &#39;@ckeditor/ckeditor5-indent&#39;; import { AutoLink, Link, LinkImage } from &#39;@ckeditor/ckeditor5-link&#39;; import { List, ListProperties } from &#39;@ckeditor/ckeditor5-list&#39;; import { MediaEmbed } from &#39;@ckeditor/ckeditor5-media-embed&#39;; import { Paragraph } from &#39;@ckeditor/ckeditor5-paragraph&#39;; import { Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar } from &#39;@ckeditor/ckeditor5-table&#39;; import { TextTransformation } from &#39;@ckeditor/ckeditor5-typing&#39;; import { Undo } from &#39;@ckeditor/ckeditor5-undo&#39;; import { Base64UploadAdapter } from &#39;@ckeditor/ckeditor5-upload&#39;; import { component as ckeditor } from &#34;@ckeditor/ckeditor5-vue&#34;; const editor = ref(ClassicEditor); const editorData = defineModel(); const editorConfig = ref({ plugins: [ Alignment, AutoImage, AutoLink, Autoformat, Base64UploadAdapter, BlockQuote, Bold, CloudServices, Essentials, FontBackgroundColor, FontColor, FontFamily, FontSize, Heading, Image, ImageCaption, ImageInsert, ImageResize, ImageStyle, ImageToolbar, ImageUpload, Indent, Italic, Link, LinkImage, List, ListProperties, MediaEmbed, Paragraph, Strikethrough, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, TextTransformation, Underline, Undo ], toolbar: { items: [ &#39;heading&#39;, &#39;|&#39;, &#39;bold&#39;, &#39;italic&#39;, &#39;underline&#39;, &#39;alignment&#39;, &#39;|&#39;, &#39;link&#39;, &#39;strikethrough&#39;, &#39;bulletedList&#39;, &#39;numberedList&#39;, &#39;|&#39;, &#39;outdent&#39;, &#39;indent&#39;, &#39;|&#39;, &#39;fontSize&#39;, &#39;fontFamily&#39;, &#39;|&#39;, &#39;fontBackgroundColor&#39;, &#39;fontColor&#39;, &#39;|&#39;, &#39;imageUpload&#39;, &#39;|&#39;, &#39;undo&#39;, &#39;redo&#39; ] }, language: &#39;en&#39;, image: { toolbar: [ &#39;imageTextAlternative&#39;, &#39;toggleImageCaption&#39;, &#39;imageStyle:inline&#39;, &#39;imageStyle:block&#39;, &#39;imageStyle:side&#39;, &#39;linkImage&#39; ] }, table: { contentToolbar: [ &#39;tableColumn&#39;, &#39;tableRow&#39;, &#39;mergeTableCells&#39;, &#39;tableCellProperties&#39;, &#39;tableProperties&#39; ] }, heading: { options: [ { model: &#39;paragraph&#39;, title: &#39;Paragraph&#39;, class: &#39;ck-heading_paragraph&#39; }, { model: &#39;heading1&#39;, view: &#39;h1&#39;, title: &#39;Heading 1&#39;, class: &#39;ck-heading_heading1&#39; }, { model: &#39;heading2&#39;, view: &#39;h2&#39;, title: &#39;Heading 2&#39;, class: &#39;ck-heading_heading2&#39; }, { model: &#39;heading3&#39;, view: &#39;h3&#39;, title: &#39;Heading 3&#39;, class: &#39;ck-heading_heading3&#39; }, { model: &#39;heading4&#39;, view: &#39;h4&#39;, title: &#39;Heading 4&#39;, class: &#39;ck-heading_heading4&#39; }, { model: &#39;heading5&#39;, view: &#39;h5&#39;, title: &#39;Heading 5&#39;, class: &#39;ck-heading_heading5&#39; }, { model: &#39;heading6&#39;, view: &#39;h6&#39;, title: &#39;Heading 6&#39;, class: &#39;ck-heading_heading6&#39; } ] } }); &lt;/script&gt; &lt;template&gt; &lt;ckeditor :editor=&#34;editor&#34; :config=&#34;editorConfig&#34; v-model=&#34;editorData&#34;&gt;&lt;/ckeditor&gt; &lt;/template&gt; </code></pre> <p>现在将编辑器组件导入项目中的任何位置</p> <pre><code>&lt;script setup&gt; import { ref } from &#34;vue&#34;; import Editor from &#39;@/components/Editor&#39;; const description = ref(&#34;&#34;); &lt;script&gt; &lt;template&gt; &lt;Editor v-model=&#34;description&#34;/&gt; &lt;template&gt; </code></pre> </answer> </body></html>

回答 0 投票 0

允许在链接中使用span,但不将href属性传递给子元素

我已经成功地使用我自己的插件向 CKEditor 添加了一个 span 元素。这可以正常工作,并且该元素可以放置在任何其他元素中。 问题是:插入时...

回答 1 投票 0

如何将分页符功能添加到 TYPO3 扩展

我正在尝试创建一个TYPO3扩展,将分页符功能添加到TYPO3 v12中的ckeditor5中。 我的扩展具有以下结构: rte_ckeditor_pagebreak/配置/JavaScriptModu...

回答 1 投票 0

CKEditor5+React:如何更新内联小部件表示的节点?

我们正在尝试在 CKEditor5 中使用内联 React 组件小部件。我们已经让它渲染,但现在不确定如何更新模型节点。我们遵循了 React 组件教程,但是修改了...

回答 1 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.