ckeditor

CKEditor: HowTo destroy instance on blur?

和自甴很熟 提交于 2019-12-12 09:14:14
问题 i have a single html page with mulitple div elements on it. Each time a user clicks on on a div , it is replaced with an CKEditor on the fly: $('.editable').click(function() { editor = CKEDITOR.replace(this); }); Now, if the CKEditor instance loses its focus (blur event), i need to post the content to a separate script via ajax (if something changed) and destroy this instance: $('.editable').click(function() { editor = CKEDITOR.replace(this); editor.on('blur', function(e) { if (e.editor

How to dynamically switch text direction in CKEditor

给你一囗甜甜゛ 提交于 2019-12-12 09:09:28
问题 On my current project, users can type text in English and Hebrew languages. Would be great to define direction automatically, according to the current text. For example, if the text contains Hebrew symbols, the direction should be RTL. But if the text doesn't contain Hebrew, then the direction is LTR. Text can be changed at any moment, and I think that the best solution is to switch the direction dynamically like it works in the Google Translate service. 回答1: I didn't find already done

CKEditor displaying HTML tags in editor

不问归期 提交于 2019-12-12 07:40:06
问题 I am using a CKEditor and saving content to a MySQL database. When trying to edit the content again in the editor, I am getting HTML tags displayed as text, for example: my test<br />and second line How can I have it display in the editor correctly again? I have been fiddling with htmlentities and html_entity_decode and CKEditor related settings for over an hour now, with no avail. $config = array(); $config['enterMode'] = 2; $config['shiftEnterMode'] = 1; //$config['basicEntities'] = FALSE;

Copy equations from word in Mathml format

我的梦境 提交于 2019-12-12 07:36:10
问题 I have created a large number of mathematical equations in Word 2013 using the in-built equation editor. I need to enter these equations into a browser based editor(CKEditor with fmath plugin) which supports mathml. Is there a way to copy these equations from word and paste them as mathml in the online editor? Any other solution( which will result in me not having to type every single equation again) besides copy/paste would also be very helpful. 回答1: You have probably used the new (as from

CKEditor, AJAX Save

前提是你 提交于 2019-12-12 07:15:35
问题 Can you provide an example on how to setup CKEditor to save via AJAX using the Save button in the CKEditor toolbar? I'm interested in creating a CKEditor AJAX save page but am not seeing any examples on their site. Thanks! 回答1: You can use the beforeCommandExec event & cancel() method: <script type="text/javascript"> $(document).ready(function () { $('.ckeditoriz').ckeditor(/* config */); $('.ckeditoriz').each(function () { var id = $(this).attr('id'), form = this.form; CKEDITOR.instances[id]

How to use CKEditor in cake php 2.3

落爺英雄遲暮 提交于 2019-12-12 06:47:20
问题 I want to use CKEditor in cake php 2.3, trying a lot but not getting any solutions. basically I need image upload option in editor from local system. How could I get success? 回答1: After lots of research, finally i got the solution for implementing CKEditor with image upload option in cakephp 2.3 For image upload in CKEditor you have to use KCFinder please check the below link you can get the details there http://cakephpclues.blogspot.in/2012/01/ckeditor-kcfinder-integration-with.html Also the

Finding textarea by id no longer works when implementing CKEDITOR

て烟熏妆下的殇ゞ 提交于 2019-12-12 05:52:28
问题 I have a table of information where the user is allowed to edit it. In one cell, there is text information. Should the user click on that cell, a bootstrap modals appears with a textarea containing the current text retrieved from the database. Here is part of the table: <table class="table table-striped table-hover" id="table_id"> <thead> <tr> <th>Event</th> <th>Notes</th> </tr> </thead> <tbody> <tr> @foreach($events as $event) <td>{{$event->Event}}</td> <td><div id="notes-{{$event->id}}">{{

Ckeditor and Lightbox not work

只愿长相守 提交于 2019-12-12 05:50:13
问题 Good day! I did everything by this http://ckeditor.com/addon/lightbox instruction, but I have always produces this error (when press button lightbox): Uncaught TypeError: Cannot read property 'split' of undefined code: <!DOCTYPE html> <!-- Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license --> <html> <head> <meta charset="utf-8"> <title>Replace Textarea by Code — CKEditor Sample</title> <script src="..

My CKEditor instance is getting the 'blur' event when I select a Toolbar dropdown

自闭症网瘾萝莉.ら 提交于 2019-12-12 05:42:10
问题 My page has a textarea which is a CKEditor instance. When the user leaves the textarea, the content should save. The problem I'm having is that the 'blur' event is being triggered when I try to select a dropdown item from the toolbar (eg if I highlight an area of text and then try to apply a format from the dropdown), so if I use this functionality, the content saves (before the style is applied) and then the editor is destroyed. My code is as follows: // Initially, colName is a variable

CKEditor 4 textarea replace - Toolbar increase the textarea width

情到浓时终转凉″ 提交于 2019-12-12 05:37:47
问题 I have a textarea that i replace to a CKEditor 4.1 instance using the "moono" skin. The problem is that even when i configure the CKEditor instance to be 100% its toolbar increase my width depend on the its buttons amount. From my research i understand that its happen because the in the "moono" skin "editor.css" file there is a "white-space:nowrap;" on all the element and this definition is preventing the ".cke_toolbar" object to go into a new line even if are floating. Notes: The problem