标签: ckeditor

ckeditor模糊和对话

我有一个模糊功能附加到我的ckeditor就像这样

editor = CKEDITOR.instances.fck;
editor.on("blur",function(e){
    alert("hello");
});
Run Code Online (Sandbox Code Playgroud)

你跟我 ?

现在,当我点击flash按钮时,编辑器会模糊并导致警报显示.

如何阻止这种情况发生,并且仍然会在其他时间出现警报,例如当用户离开编辑器区域时

再次感谢

jquery blur ckeditor

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

CKEditor中的自动链接URL

在Internet Explorer中,当您在CKEditor中键入URL时textarea,它会自动转换为超链接.这在Opera或Firefox中不起作用.CKEditor中是否有配置设置可以使其在其他浏览器中运行?

javascript cross-browser ckeditor

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

CKEDITOR:从Javascript中的多个实例名称中获取数据

因为我在HTML代码中有多个textareas,我通过Javascript传递id值来检索每个textareas中的数据.但是,在JS函数中,"CKEDITOR.instances.id"并不代表预期,如CKEDITOR.instances.editor_1,CKEDITOR.instances.editor_2或CKEDITOR.instances.editor_4,因此,我没有任何检索数据.任何人都知道如何解决这个问题请让我.多谢了.

HTML代码:

    <textarea name="edit_1"></textarea>
    <input type="button" value="submit" onClick="getValue('edit_1')" />
    <textarea name="edit_2"></textarea>
    <input type="button" value="submit" onClick="getValue('edit_2')" />
    <textarea name="edit_2"></textarea>
    <input type="button" value="submit" onClick="getValue('edit_3')" />
Run Code Online (Sandbox Code Playgroud)

JS代码:

    var getValue = function(id) {
        var content = CKEDITOR.instances.id.getData();
        alert(content);
    };
Run Code Online (Sandbox Code Playgroud)

javascript ckeditor

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

无法使用CKEditor提交表单?

我有以下表格:

<form action="/web/app_dev.php/system/blog/new" method="post" >
    <div id="newblogpost">
    <div>
        <label for="newblogpost_title" class="required">Title</label>
        <input type="text" id="newblogpost_title" name="newblogpost[title]" required="required" />
    </div>
    <div>
        <label for="newblogpost_status">Status</label>
        <input type="checkbox" id="newblogpost_status" name="newblogpost[status]" value="1" />
    </div>
    <div>
        <label for="newblogpost_content" class="required">Content</label>
        <textarea id="newblogpost_content" name="newblogpost[content]" required="required"    class="ckeditor" id="editor1"></textarea>
    </div>
    <input type="hidden" id="newblogpost__token" name="newblogpost[_token]" value="f58cad16c1948231a504f592ec74edd7aaeca29d" /></div>

    <button type="submit">Cmon?</button>
</form>
Run Code Online (Sandbox Code Playgroud)

出于某种原因,我无法提交该死的东西.如果我在textarea字段上禁用CKEditor,它将提交,这显然会让我相信这是CKEditor的一个问题.

我已经尝试了一些事情,如字段输入的各种名称,输入类型="提交"而不是按钮等,没有运气.

我似乎无法找到其他人有同样的问题,所有我最终发现是人们有AJAX表格的问题.这只是一个直截了当,老式的可提交表格.

我错过了语义阻止提交的东西吗?或者其他人可以发现问题吗?

forms ckeditor submit-button symfony

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

如何在CKEDITOR 4.0上使用resize事件?

我如何使用CKEDITOR 4.0 的resize 事件.

我需要在编辑器调整大小时设置一些属性.在CKEDITOR 4.0 API事件就在那里.但我不知道如何使用它.

在此输入图像描述

谁能告诉我如何使用它..

javascript ckeditor

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

使ckeditor只在页面加载时读取

我想在页面上使ckeditor只读,并且只能是只读的.我该怎么做呢?我试图改进下面的代码来做到这一点,但我似乎无法弄明白.

我让编辑器有一个切换只读模式,它加载为非只读模式.(这不是我想要的,但这是我得到的最接近的)这是我的代码:

window.onload = function () {
    CKEDITOR.replace('textBox', );
}

var editor;

// The instanceReady event is fired, when an instance of CKEditor has finished
// its initialization.
CKEDITOR.on('instanceReady', function (ev) {
    editor = ev.editor;

    // Show this "on" button.
    document.getElementById('readOnlyOn').style.display = '';

    // Event fired when the readOnly property changes.
    editor.on('readOnly', function () {
        document.getElementById('readOnlyOn').style.display = this.readOnly ? 'none' : '';
        document.getElementById('readOnlyOff').style.display = this.readOnly ? '' : 'none';
    });
});

function toggleReadOnly(isReadOnly) {
    // Change the read-only state of …
Run Code Online (Sandbox Code Playgroud)

html readonly ckeditor

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

CKEditor多个ID的一个实例

我可以为多个ID的CKeditor使用一种配置吗?

我的页面中有此配置:

var editor = CKEDITOR.replace('dsi3',{  
            toolbar :
                [
                    { name: 'basicstyles', items : [ 'Bold','Italic'] },
                    { name: 'paragraph', items : [ 'BulletedList'] }

                ],
            width: "210px",
            height: "140px"
        });
Run Code Online (Sandbox Code Playgroud)

但是我不得不一次又一次地输入不同的ID,相反,我想做这样的事情:

var editor = CKEDITOR.replace('dsi3, dsi4, dsi5, dsi6',{    
            toolbar :
                [
                    { name: 'basicstyles', items : [ 'Bold','Italic'] },
                    { name: 'paragraph', items : [ 'BulletedList'] }

                ],
            width: "210px",
            height: "140px"
        });
Run Code Online (Sandbox Code Playgroud)

javascript jquery ckeditor

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

将类应用于ckeditor中的块级元素

我似乎无法使用此样式定义应用样式:

var object = {
    type: CKEDITOR.STYLE_BLOCK,
    attributes: {
        'class': 'foo'
    } 
};
Run Code Online (Sandbox Code Playgroud)

var style = new CKEDITOR.style(object);

我在我的配置中将allowContent设置为true.

ckeditor

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

无法运行ckeditor:install

以下是此处的文档:http://symfony.com/doc/current/bundles/IvoryCKEditorBundle/installation.html

我目前输入了命令:

composer require egeloen/ckeditor-bundle

目前解决的问题

使用版本^ 5.0 for egeloen/ckeditor-bundle

之后,我将新包输入我的AppKernel并转到运行命令:

php bin/console ckeditor:install

不幸的是,这会导致此错误:

[Symfony\Component\Console\Exception\CommandNotFoundException]
"ckeditor"命名空间中没有定义命令.

使用Symfony 3.3-dev,Ckeditor-bundle(5.0.3)

php ckeditor symfony

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

EasyAdminBundle:验证不适用于CKEditorType

在使用EasyAdminBundle创建的管理控制台中,我的表单验证仅适用于没有的字段CKEditorType。一些字段需要编辑,因此我使用FOSCKEditorBundle实现了所见即所得。

有关领域的摘录:

- { property: 'content', type: 'FOS\CKEditorBundle\Form\Type\CKEditorType'} 
Run Code Online (Sandbox Code Playgroud)

当我提交带有空白“内容”字段的表单时,InvalidArgumentException出现错误消息:Expected argument of type "string", "NULL" given.而不是诸如“ 请填写此字段”之类的验证错误

没有CKEditor的相关领域的代码片段:

- { property: 'content' } 
Run Code Online (Sandbox Code Playgroud)

=>验证非常有效。

我的实体字段:

    /**
     * @ORM\Column(type="text")
     * @Assert\NotBlank
     * @Assert\NotNull
     */
    private $content;
Run Code Online (Sandbox Code Playgroud)

Symfony探查器显示此字段确实具有required属性。

如何使用CKEditor字段类型启用验证?

ckeditor symfony symfony4 easyadmin

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