ckeditor

CKeditor adding class to img tag

对着背影说爱祢 提交于 2020-01-13 14:34:42
问题 I am trying to add a class to any inserted img tag in CKeditor. I have tried various ways but can't seem to figure out how the setting of this plugin works. Whilst there are tonnes of documents, it only mentions that a code needs to be added, but not where it should be added, there are loads of files. I tried adding it to the bottom on config.js /** * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or http://ckeditor.com

CKEditor + Yii loaded with AJAX : $_POST doesn't contain the updated value

倾然丶 夕夏残阳落幕 提交于 2020-01-13 13:47:11
问题 in short: i'm using Yii Framework i have a one Ckeditor window on my page ( php/ yii framework - works fine) when i hit a button, a new CKeditor window is being generated and shown through AJAX call THE PROBLEM: this new CKEditor window correctly displays the text stored in the database BUT : when i hit "Save" (an ajax button generated together with the rest of the form) the values from this new CKeditor window will not save : CKeditor sends back the old values that it got from the database.

CKEditor + Yii loaded with AJAX : $_POST doesn't contain the updated value

我怕爱的太早我们不能终老 提交于 2020-01-13 13:46:53
问题 in short: i'm using Yii Framework i have a one Ckeditor window on my page ( php/ yii framework - works fine) when i hit a button, a new CKeditor window is being generated and shown through AJAX call THE PROBLEM: this new CKEditor window correctly displays the text stored in the database BUT : when i hit "Save" (an ajax button generated together with the rest of the form) the values from this new CKeditor window will not save : CKeditor sends back the old values that it got from the database.

PrimeFaces Extensions CKEditor: attempts to set encoding to UTF-8 unsuccessful

北城以北 提交于 2020-01-13 13:31:30
问题 Why I am using this editor: In the past I used PrimeFaces p:editor which is however deprecated and lacks functions that the users desperately want. I cannot use the new PrimeFaces p:textEditor because of this: Primefaces textEditor: converting text to HTML with JavaScript not working. What is it used for: I am using pe:ckEditor from PrimeFaces Extensions in my program, in which the editor is used by the user to create an e-mail message content. Then by click on a send button, the HTML from

CKEditor New Instance always unloaded

久未见 提交于 2020-01-13 11:26:07
问题 I'm using CKEditor in my Angular app and have a view that reloads my CKEditor instance every time users access a new model. I'm using the following JS to initialize the editor: var initEditor = function() { $('.js-editor-wrap').html("<textarea id='editor'></textarea>"); var editor = CKEDITOR.replace('editor', {}); editor.on('loaded', function() { console.log('editor loaded'); }); editor.on('instanceReady', function() { console.log('instance ready') }); } And the following to destroy the

Load blockquote plugin in CKEditor

主宰稳场 提交于 2020-01-13 11:08:23
问题 I want to use CKEditor via django-ckeditor. CKEditor gets loaded, but I fail to load the blockquote plugin. I downloaded blockquote.zip , unpacked it Copied it to my app like this myapp/static/ckeditor/ckeditor/plugins/blockquote I run collectstatic . I can access the blockquote/plugin.js file via browser if I inter the URL by hand. I updated the config: CKEDITOR_CONFIGS = { 'default': { 'extraPlugins': 'blockquote', } } The HTML contains the blockquote : <textarea cols="40" id="id_body" name

Load blockquote plugin in CKEditor

一笑奈何 提交于 2020-01-13 11:08:10
问题 I want to use CKEditor via django-ckeditor. CKEditor gets loaded, but I fail to load the blockquote plugin. I downloaded blockquote.zip , unpacked it Copied it to my app like this myapp/static/ckeditor/ckeditor/plugins/blockquote I run collectstatic . I can access the blockquote/plugin.js file via browser if I inter the URL by hand. I updated the config: CKEDITOR_CONFIGS = { 'default': { 'extraPlugins': 'blockquote', } } The HTML contains the blockquote : <textarea cols="40" id="id_body" name

reset ckeditor value on form reset button

无人久伴 提交于 2020-01-13 10:09:50
问题 I have a form reset button on my form: <a href="#" id="reset_button" class="btn" onClick="name_of_form.reset();">Reset</a> This resets all the controls on my form except the ckeditor, and I want to be able to reset the value of the ckeditors on the form. The associated text areas of the ckeditors are reset. So how do I go code the reset of the ckeditor into the form reset button? 回答1: There's no easy way to synchronize CKEditor with <textarea> . But it is possible to synchronize <textarea>

Prevent CKEditor from formatting code in source mode

帅比萌擦擦* 提交于 2020-01-12 02:43:23
问题 How can you prevent any automatic formatting when in CKEditor when viewing in source mode? I like to edit HTML source code directly instead of using the WYSIWYG interface, but whenever I write new lines, or layout tags how I would indent them, it all gets formatted when I switch to WYSIWYG mode and then back to source mode again. I stumbled upon a CKEditor dev ticket, Preserve formatting of ProtectedSource elements, that alluded to a setting which may have existed once upon a time which would

Enable CKEditor toolbar button only with valid text selection?

江枫思渺然 提交于 2020-01-11 10:32:51
问题 I'm working on a CKEditor plugin for annotating text and adding margin comments, but I'd like some of my custom toolbar buttons to be enabled only when the user has already selected a range of text. Whenever the user is typing, or the cursor is at a single-point (instead of a range), the buttons (and their associated commands) should be disabled. I'm a pretty experienced plugin author, and I've spent a fair amount of time hunting through the core API docs, but I haven't found anything yet