我正在为CKEDITOR开发一个占位符插件,它基本上是完整的.我遇到的问题是我试图从对话框中的选择中获取值和描述,而我只是获得了值.包含描述和值的数组如下所示
- >
items: [['description1', 'value1'], ['description2', 'value2']]
< -
在返回 - > contents - >元素中ID
dropdown
我有setup
和commit
函数.在这些函数中,我需要获取描述就像从select选项中获取名称一样.
真的需要帮助这个,谢谢你提前
例子 - >
<select>
<option value="value1">description1</option>
<option value="value2">description2</option>
</select>
Run Code Online (Sandbox Code Playgroud)
示例< -
(function () {
function placeholderDialog(editor, isEdit) {
var lang = editor.lang.phlink,
generalLabel = editor.lang.common.generalTab;
return {
title: lang.title,
minWidth: 300,
minHeight: 80,
contents: [
{
id: 'info',
label: generalLabel,
title: generalLabel,
elements: [
{
id: 'dropdown'
, …
Run Code Online (Sandbox Code Playgroud) 我正在使用CKEditor 4 inline.是否可以更改工具栏位置,例如50px超过编辑器div?
谢谢!
我有一个使用ckeditor 4.2的Drupal 7站点.我已经创建了一个基本的页面节点,并在一个h2标题中添加了一个span.我在html视图中对其进行了硬编码.它看起来很好,但如果我回去编辑页面,我已经得到了html和任何style =""我已经加入html了.我查看了ckeditor配置和文本格式.我已经设置了唯一允许为text和full html的格式,所以我根本就没有使用过滤.是什么赋予了?我以前多次使用过编辑器,但可能不是这个版本.
脚本
$('.DDL').change(function update() {
$.get('../Folder' + $(this).val() + '.html', function(result) {
$('.CKE').val(result);
});
});
Run Code Online (Sandbox Code Playgroud)
TEXTAREA
<asp:CKEditorControl ID="txtMailBody" CssClass="CKE" RunAt="Server" BasePath="~/Editor"/>
Run Code Online (Sandbox Code Playgroud)
我有一些jscript根据他们的选择用相关内容填充我的textareas.
javascript完美地填充任何textarea.
当我的textarea是我的ckeditor时,它不起作用.
检查页面显示正在添加内容但ckeditor不显示它.刷新页面也会导致内容出现.
题
如何使CKEditor textarea刷新/更新以显示从下拉列表中动态添加的客户端代码?
我正在尝试将 ckeditor 集成到我的 django 博客应用程序中。我严格遵循 django-ckeditor github 页面中的所有说明。即安装、添加到已安装的应用程序、添加到 URL、收集静态文件、在 settings.py 中配置设置并在必要时在模型中导入 ckeditor.fields。当我尝试进行迁移或运行时,出现以下错误:
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/kush/projects/venv/lib/python3.6/site-packages/django/utils/autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "/home/kush/projects/venv/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 109, in inner_run
autoreload.raise_last_exception()
File "/home/kush/projects/venv/lib/python3.6/site-packages/django/utils/autoreload.py", line 77, in raise_last_exception
raise _exception[1]
File "/home/kush/projects/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 337, in execute
autoreload.check_errors(django.setup)()
File "/home/kush/projects/venv/lib/python3.6/site-packages/django/utils/autoreload.py", line 54, in wrapper
fn(*args, **kwargs) …
Run Code Online (Sandbox Code Playgroud) 像很多人一样,我正在开发一个简单的 Android 应用程序,它只是一个Webview,可以打开我的完整响应式网站,只是为了允许找到它、安装它并像“真正的”应用程序一样启动它(我知道你知道为什么我正在这样做!)。我的网站使用CKEditor允许用户创建简单的 html 页面并上传图像以放入其页面中。为此,我将响应式文件管理器与 CKEditor 结合使用,如果我从手机 (Android 9) 上的 Chrome 或其他浏览器打开我的网站,则一切正常。但是当我启动我的 Web 应用程序时,即使 90% 的网站工作正常,日志中也会出现几个 Javascript 错误,例如:
I/chromium: [INFO:CONSOLE(305)] "Uncaught TypeError: $(...).fancybox is not a function"
I/chromium: [INFO:CONSOLE(1)] "Uncaught TypeError: Cannot read property 'tools' of undefined" (it refers to this source code --> window.opener.CKEDITOR.tools.callFunction(a, e) )
Run Code Online (Sandbox Code Playgroud)
当我尝试使用“上传图像”或“选择图像”功能时,由于上述 Javascript 错误,它不起作用(当我单击操作按钮时它不执行任何操作)。
我已经启用了 Javascript、dom 存储并使用 webview 设置访问所有文件和文档,正如其他类似问题中所建议的那样,但对我来说没有任何作用。
我的超级简单的 Android 应用程序:
public class MainActivity extends Activity {
private WebView mWebView; …
Run Code Online (Sandbox Code Playgroud) 我在我的网站上使用 CKEditor 5,以便允许用户为其公司生成 PDF 模板。
我的问题是,一旦我从 ckEditor 中取出数据,每个样式元素都有一个 class="CSS-Class-Here",这是有问题的,因为当我将 CKEditor 的 HTML 内容转换为 PDF 时, PDF 不知道这些类中的任何一个。
有没有办法让 CKEditor 将这些类保存为内联样式?
我知道可以为特定样式的特定元素创建插件,但我希望一切都以这种方式运行,而不是特定的东西。
此外,不可能将样式直接注入 PDF 本身,因为 ckEditor 将样式保留在 javascript 函数中并根据需要创建它们。
例如:黄色突出显示的文本显示为:
<mark class="" marker-yellow "">Random Text</mark>
我希望它的结果是:
<mark style="background: yellow">Random Text</mark>
这意味着标记黄色类中存在的样式应该直接内联应用于元素本身。
我正在尝试向 CKEditor5 的经典版本添加一个插件。我已按照此页面上的说明进行操作: https://ckeditor.com/docs/ckeditor5/latest/installation/plugins/installing-plugins.html
我可以说我已经正确完成了所有事情,因为当我打开sample/index.html
.
现在是时候将此自定义构建与我的 React 应用程序集成了。
此页面上的说明“描述”了要做什么:
您将在项目旁边的某个位置创建一个新构建,并将其包含在内,就像包含现有构建之一一样。
它说“像包含现有版本之一一样包含它”。好吧,这就是我包含经典构建的方式:
import React from "react";
import ReactDOM from "react-dom";
import CKEditor from "@ckeditor/ckeditor5-react";
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
import "./styles.css";
function App() {
return (
<div className="App">
<CKEditor
editor={ClassicEditor}
// Other Props
}}
/>
</div>
);
}
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);
Run Code Online (Sandbox Code Playgroud)
所以,我假设我会做这样的事情:
import React from "react";
import ReactDOM from "react-dom";
import CKEditor from "@ckeditor/ckeditor5-react";
import ClassicEditor from './ckeditor/ckeditor'
import "./styles.css";
function App() {
return ( …
Run Code Online (Sandbox Code Playgroud) 我目前使用 ckeditor 5,似乎我添加的每个跨度总是添加<br data-cke-filler="true">
和
。我发现这个模块引擎/视图/填充器(BR_FILLER () 和NBSP_FILLER ())导致了这种意外行为。是否可以禁用该模块?
示例 HTML:
<p>
<comment id="thread-1" type="start"></comment>
<span style="color:hsl(0,0%,0%);">The</span>
<comment id="thread-1" type="end"></comment>
<span id="thread-2" type="start"></span>
<span style="color:hsl(0,0%,0%);">quick</span></span>
<span id="thread-2" type="end"></span>
brown fox
</p>
Run Code Online (Sandbox Code Playgroud)
结果:
I'm using CKEditor 5 in a Laravel project, getting it from a CDN, so initially I have not needed to run npm. But now I need an alignment plugin, so I used Laravel Mix to run npm install, and then copy the plugin to public folder. Like this:
mix.copyDirectory('node_modules/@ckeditor', 'public/@ckeditor');
Run Code Online (Sandbox Code Playgroud)
In my code, I tried to import it:
import Alignment from '/@ckeditor/ckeditor5-alignment/src/alignment.js';
Run Code Online (Sandbox Code Playgroud)
So it threw this error in console
Uncaught TypeError: Failed to resolve module specifier "@ckeditor/ckeditor5-core/src/plugin". Relative references must …