ckeditor 相关问题

CKEditor是一个开源富文本编辑器生态系统,支持实时协作。将此标记与[ckeditor4]和[ckeditor5]标记一起使用以指示编辑器版本。

CKE5 内部使用的第 3 方库是什么?

我们正在评估 ckeditor 5,需要以下信息 - 我们能否获得有关 CKE5 内部使用的第 3 方库的一些指针? 我尝试搜索 cke5 API 文档(下面的链接)

回答 1 投票 0

Chrome 上的 ckeditor4 打字性能较低,HTML 编辑器中的大文本输入滞后

我有一个包含ckeditor4的项目。我使用“wysiwygarea”插件进行全屏 html 编辑。本地一切似乎都很好,但在测试环境中,大型文档上的 Chrome 输入开始滞后......

回答 1 投票 0

CKEditor 5 - 在外部操作/事件上为编辑器在深色和浅色主题/背景之间切换

我在 React 应用程序中使用 CKEditor5,并尝试实现一个切换以在 CKEditor5 的深色和浅色主题之间切换。 从他们的文档中我发现了这一点:https://ckeditor.com/docs/cked...

回答 1 投票 0

简单上传适配器,ckeditor 无法上传文件

一切正常,但是当我上传图像时,出现此错误。 我找不到有关此错误的任何信息。我找到了很多类似的解决方案,但没有一个有效。 这是我的代码。我将 Express.js 与 ejs 一起使用......

回答 1 投票 0

CKeditor页面上两个表单POST数据问题

我有 2 个带有 CKeditor 的表格 <p>我有 2 个带有 CKeditor 的表格</p> <pre><code><form id="save_category" class="uk-form" enctype="multipart/form-data"> <textarea id="editor1" class="uk-textarea" rows="5" aria-label="Textarea" name="description"><?echo $description?></textarea> </form> <form id="save_category_en" class="uk-form" enctype="multipart/form-data"> <textarea id="editor2" class="uk-textarea" rows="5" aria-label="Textarea" name="description"><?echo $description?></textarea> </form> <script> CKEDITOR.replace( 'editor1' ); CKEDITOR.add </script> <script> CKEDITOR.replace( 'editor2' ); CKEDITOR.add </script> </code></pre> <p>现在我用这个代码发送这2个表格的数据</p> <pre><code>$(document).on("submit", "#save_category", function(save_category){ save_category.preventDefault(); var formData = new FormData(this); $.ajax({ url: 'controllers/object/save_category.php', type: 'POST', contentType: false, cache: false, processData:false, data: formData, success: function(response){ $("#result").html(response); } }); var formData_en = new FormData($("#save_category_en")[0]); $.ajax({ url: 'controllers/object/save_category.php', type: 'POST', processData: false, contentType: false, data: formData_en, success: function(response){ $("#result").html(response); } }); }); </code></pre> <p>问题是当我使用 CKeditor 时,表单 #2 的 $_POST['description'] 不发送,只有 CKeditor 的文本区域字段不起作用。如果我禁用 ckeditor 它可以工作。有什么问题吗?</p> <p>仅使用 CKEDITOR 时才会出现问题</p> </question> <answer tick="false" vote="0"> <p>当将 CKEditor 与表单中的文本区域一起使用时,与父表单元素的集成是自动的。提交表单时,CKEditor 会自动更新替换的文本区域,因此在现有表单元素上启用 CKEditor 后,无需更改任何处理表单提交的服务器端代码1。但是,如果您通过 Ajax 提交表单数据,则可能需要在提交表单数据之前更新 CKEditor 实例。您可以通过在与您尝试提交的表单元素关联的 CKEditor 实例上调用 updateElement() 方法来完成此操作 来源:<a href="https://ckeditor.com/docs/ckeditor4/latest/examples/savetextarea.html" rel="nofollow noreferrer">https://ckeditor.com/docs/ckeditor4/latest/examples/savetextarea.html</a></p> <pre><code>$(document).on("submit", "#save_category", function(save_category){ save_category.preventDefault(); for (instance in CKEDITOR.instances) { CKEDITOR.instances[instance].updateElement(); } var formData = new FormData(this); $.ajax({ url: 'controllers/object/save_category.php', type: 'POST', contentType: false, cache: false, processData:false, data: formData, success: function(response){ $("#result").html(response); } }); var formData_en = new FormData($("#save_category_en")[0]); $.ajax({ url: 'controllers/object/save_category.php', type: 'POST', processData: false, contentType: false, data: formData_en, success: function(response){ $("#result").html(response); } }); }); </code></pre> </answer> </body></html>

回答 0 投票 0

如何安装ck编辑器git repo

当我尝试在本地安装 ck editor git repo 时,遇到以下错误 Git 存储库 - https://github.com/ckeditor/ckeditor5 npm 错误!代码 ERESOLVE npm 错误! ERESOLVE 无法解决依赖...

回答 1 投票 0

如何覆盖 CKEditor 中按钮的处理程序?

我想要一个用于“保存”按钮的自定义处理程序。 如何覆盖默认命令?

回答 5 投票 0

使用 Ckeditor 上传 Django 图像失败未定义

我正在尝试使用 Django 创建一个博客页面。我正在使用 CKEditor 添加文本。当我在本地上传图片时没有任何问题,但是当我将项目部署到服务器时遇到问题。

回答 1 投票 0

CKEditor 5 与 Nuxt 3 - “组件缺少模板或渲染功能”

我已经安装了依赖项: npm 我@ckeditor/ckeditor5-build-classic @ckeditor/ckeditor5-vue 然后,在组件中实现它: 我已经安装了依赖项: npm i @ckeditor/ckeditor5-build-classic @ckeditor/ckeditor5-vue 然后在组件中实现: <template> <div class="w-full h-[400px]"> <CKEditor v-model="text" :editor="ClassicEditor" :config="config"/> </div> </template> 组件设置: import ClassicEditor from '@ckeditor/ckeditor5-build-classic' import CKEditor from "@ckeditor/ckeditor5-vue"; const config = { toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote' ], heading: { options: [ { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' }, { model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' }, { model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' } ] } } const text = ref('') 组件包含它的根组件: <client-only> <InputWysiwyg/> </client-only> 当我使用所见即所得打开页面时,我收到警告:组件缺少模板或渲染功能。在 CKEditor 元素中。我做错了什么? 好吧,如果有人要搜索这个,我建议您自己创建 CKEditor 实例: const editor = ref(null) const ck = ref(null) const init = () => { ck.value = ClassicEditor.create(editor.value) } onMounted(() => { init() }) <template> <div class="w-full h-[400px]"> <div class="w-full h-full" ref="editor"></div> </div> </template>

回答 1 投票 0

CK Editor 5 无法在编辑器之外添加评论?

每当我尝试在 ck-editor 5 中的编辑器外部添加注释时。 出现以下错误: 错误类型错误:无法读取 null 的属性(读取“名称”) 虽然我正在关注“ck编辑器

回答 1 投票 0

有没有办法构建未缩小的 CKEditor 发行版

我已经从这里克隆了源存储库,我想将所有内容构建到一个文件中,但不希望该文件被丑化。我需要在构建文件中调整任何设置来防止

回答 1 投票 0

如何获得 HTML 输出而不是 Markdown?

我目前正在使用 CKEditor 5 在我的应用程序中拥有一个文本编辑器(用 nextjs 制作)。问题是,我希望我的编辑器输出是 HTML 而不是 Markdown。 当前编辑器代码 我目前正在使用 CKEditor 5 在我的应用程序中拥有一个文本编辑器(用 nextjs 制作)。问题是,我希望我的编辑器输出是 HTML,而不是 markdown。 当前编辑器代码 <CKEditor // @ts-ignore editor={CKEditorCustomBuild} onChange={(event: any, editor: any) => { const data = editor.getData(); onChange(data); }} /> data函数内部onChange的输出类似于: Hello there, my _name_ is **John Doe**. 我想要以下格式: Hello there, my <u>name</u> is <strong>John Doe</strong>. 我怎样才能实现这一目标? 与@endbermudas 的评论中的每个讨论: CKEditor 5 默认以 HTML 格式输出内容。如果您将 Markdown 作为输出,则您可能正在使用 Markdown 插件或配置为输出 Markdown 的自定义构建。

回答 1 投票 0

无法通过ajax使用CKEDITOR插入php数据

我已经包含了CKEDITOR(html编辑器)来操作文本区域中的文本。我只尝试使用 php (没有 ajax)并且数据已成功插入到数据库中。问题是...

回答 3 投票 0

从 CKEditor 中删除页脚标签

我在我的网站中使用CKEditor,在这里我想删除页脚标签。我该怎么做?我正在使用 CKEditor 添加一些有用的内容。它工作正常,但我不想显示页脚标签......

回答 3 投票 0

如何通过单击外部元素将内容添加到 CKeditor5 中

我的页面上有几个位于 Ckeditor 之外的按钮,我想单击它们并向 Ckeditor5 添加内容。 通过单击按钮,我进行 ajax 调用以从

回答 1 投票 0

CKEditor 5 / Laravel Livewire 即使有内容也会返回“null”

我使用 CKEditor 5 作为我的所见即所得编辑器。它加载良好,看起来很完美 - 但是当我提交表单并尝试获取编辑器的内容时,它返回 null。 我的 HTML 代码: 我使用 CKEditor 5 作为我的所见即所得编辑器。它加载良好,看起来很完美 - 但是当我提交表单并尝试获取编辑器的内容时,它返回 null。 我的 HTML 代码: <form wire:submit.prevent="sendBulkEmail"> <div> <textarea wire:model="message" class="form-control" id="ckeditor"></textarea> </div> <div class="mb-4"> <button type="submit" class="btn btn-alt-primary"> Send Bulk Email </button> </div> </form> <script> ClassicEditor .create( document.querySelector( '#ckeditor' ) ) .catch( error => { console.error( error ); } ); </script> 控制器: public $message; dd($this->message); 有什么想法可以让 Livewire 发挥价值吗? 查看了google、CKEditor Docs 和其他步骤。 CKEditor 将创建一个单独的 DOM 元素作为您所选元素的同级元素,在本例中为#ckeditor(在浏览器检查器中检查)。您的 Livewire 模型绑定适用于原始 textarea 元素,它实际上从未改变。 您需要做的是挂钩编辑器数据更改事件,然后使用(例如)事件将该数据发送到 Livewire。 editor.model.document.on( 'change:data', () => { console.log( 'The data has changed!' ); Livewire.emit('ckeditorChanged', editor.getData()) });

回答 1 投票 0

React js:图片上传在 CKEditor 中不起作用

CKEditor 图片上传不起作用,下面是代码 CKEditor 图片上传不起作用,下面是代码 <CKEditor editor={ ClassicEditor } data={this.state.miscNotesData.miscnote} onInit={ editor => { // You can store the "editor" and use when it is needed. console.log( 'Editor is ready to use!', editor ); } } onChange={ ( event, editor ) => { const data = editor.getData(); this.handleChange(data); console.log( { event, editor, data } ); } } /> 错误: backend.js:6 filerepository-no-upload-adapter: Upload adapter is not defined. Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-filerepository-no-upload-adapter 如文档中提供的https://ckeditor.com/docs/ckeditor5/latest/features/image-upload/image-upload.html 在 CKEDitor 中上传图像有 4 个选项:Easy Image(专有)、CKFinder(需要 PHP 或 ASP.net 上的连接器)、简单适配器、Base64 适配器 我在 Node js 服务器上使用简单适配器来实现此目的: 首先,我在ClassicEditor中安装了SimpleUploadAdapter,然后在CKEditor中设置了配置: <CKEditor data={input.value} editor={ ClassicEditor } config={{ simpleUpload: { uploadUrl: 'https://myserver.herokuapp.com/image-upload' }, toolbar: ['heading', '|', 'bold', 'italic', 'blockQuote', 'link', 'numberedList', 'bulletedList', 'imageUpload', 'insertTable', 'tableColumn', 'tableRow', 'mergeTableCells', 'mediaEmbed', '|', 'undo', 'redo'] }} /> 并在我的服务器上创建 url /image-upload 您可以使用额外的插件选项.. 要使用它,您可以修改他们的文档。 在配置中,您将设置 extraPlugins 。 你可以让 uploadPlugin 函数来工作。 <CKEditor editor={ ClassicEditor } config = {{ placeholder : "please your question, here", extraPlugins: [uploadPlugin] }}

回答 2 投票 0

CKedit 图片上传不起作用

这是我的 urls.py 从 django.conf.urls 导入 include, url 从 django.contrib 导入 admin 从 django.contrib.auth 导入视图 从 django.conf 导入设置 url 模式 = [ url(r'^admin/',

回答 2 投票 0

使用 Rails 7 为 CKEDITOR 配置新工具栏

我正在使用 ckeditor gem,如下所示: # 宝石文件 gem 'ckeditor', '~> 4.3' 然后在我的 activeadmin 表单中显示它: # 管理/starts.rb f.input :expertpro, as: :ckeditor, 标签: "预测器&q...

回答 1 投票 0

如何响应式Django ckeditor

我已经为我的博客网络应用程序下载了ckeditor。 但是当我通过移动设备访问这个网站时,它看起来非常糟糕,因为它没有响应式,我怎样才能将其转换为响应式设计...... 我是...

回答 3 投票 0

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