ckeditor

How to Destroy and Reinitialize CKEDITOR Again?

自古美人都是妖i 提交于 2019-12-08 12:39:11
问题 I use the below code to destroy the editor instance. editor.destroy(); After this, I try to initialize CKEditor and set content using the below code. CKEDITOR.replace('editor1'); CKEDITOR.instances['editor1'].setData("MY HTML DATA"); But when I am doing like this only the empty HTML page is Shown. How can I do this in a Correct Way? 回答1: If i understand you correctly, following fiddle will help you in initializing and destroying ckeditor. <!DOCTYPE html> <html> <head> <meta charset="utf-8">

CKEDITOR - how to add permanent onclick event?

若如初见. 提交于 2019-12-08 12:17:45
问题 I am looking for a way to make the CKEDITOR wysiwyg content interactive. This means for example adding some onclick events to the specific elements. I can do something like this: CKEDITOR.instances['editor1'].document.getById('someid').setAttribute('onclick','alert("blabla")'); After processing this action it works nice. But consequently if I change the mode to source-mode and then return to wysiwyg-mode, the javascript won't run. The onclick action is still visible in the source-mode, but is

Capitalize first letter of sentence in CKeditor

空扰寡人 提交于 2019-12-08 12:17:40
问题 I wish to capitalize the first letter of a sentence, on-the-fly, as the user types the text in a CKEditor content instance. The strategy consists in catching each keystroke and try to replace it when necessary, that is for instance, when the inserted character follows a dot and a space. I'm fine with catching the event, but can't find a way to parse characters surrounding the caret position: var instance = CKEDITOR.instances.htmlarea instance.document.getBody().on('keyup', function(event) {

File Uploading to Azure Storage by ASP.NET Webpages

拜拜、爱过 提交于 2019-12-08 11:14:49
问题 There are some reference about File Uploading to Azure BY ASP.NET MVC but I can't find none in field of ASP.NET Webpages How to implement such code to upload to Azure Storage? Well.. For more information, My goal is image uploading in CK Editor but Due to Azure Hosting, ordinary CKEditor reference is not working. So I googled and use this code block CloudStorageAccount storageAccount = CloudStorageAccount.Parse( CloudConfigurationManager.GetSetting("StorageConnectionString")); // Create the

CKEditor charset

六眼飞鱼酱① 提交于 2019-12-08 10:51:02
问题 I updated my web app to use UTF-8 instead of ANSI. I did the following measures to define charset: mysql_set_charset("utf8"); // PHP <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> // HTML utf8_general_ci // In MySQL I also edited the CKEditor config to remove htmlentities because I need the correct character (i.e. é and not é ) for MySQL fulltext search. config.entities = false; config.entities_latin = false; In the database (phpMyAdmin view) and on normal text fields

docx4j conversion html->docx->html

假如想象 提交于 2019-12-08 10:50:26
问题 I'm working on my first project using docx4j... My goal is to export xhtml from a webapp (ckeditor created html) into a docx, edit it in Word, then import it back into the ckeditor wysiwyg. (*crosspost from http://www.docx4java.org/forums/xhtml-import-f28/html-docx-html-inserts-a-lot-of-space-t1966.html#p6791?sid=78b64a02482926c4dbdbafbf50d0a914 will update when answered) I have created an html test document with the following contents: <html><ul><li>TEST LINE 1</li><li>TEST LINE 2</li></ul><

using ckeditor does not work: when I click the path, it isn't going to the related file

本秂侑毒 提交于 2019-12-08 09:23:40
问题 I want to use ckeditor in a web page created in spring mvc 3.1. It is maven project. I downloaded required files from http://ckeditor.com/download. I added taglib <%@ taglib uri="http://ckeditor.com" prefix="ckeditor" %> on the head section. In form, I wrote the code below. path="aciklama" is the property of my class. I want to bind data retrieved from ckeditor . form method="post" modelAttribute="my class name"> ....... ..... <form:textarea cols="80" id="editor1" name="editor1" rows="10"

How to use <br> instead of <br /> in CKeditor

Deadly 提交于 2019-12-08 08:14:49
问题 It's 2017 and it's the age of HTML5! In HTML5, the line break is <br> , NOT <br /> . But for the life of it, I can't get CKeditor to ditch <br /> in favor of <br> . The incorrect <br /> 's are giving me all sorts of problems. Among them: Failed code validation (In Firefox) Using JavaScript's innerHTML on a code block that was created with <br /> 's, returns <br> 's instead - which messes up comparisons about changes. I found this old forum entry about the issue (in a related program, not in

CKEditor in Twig Template + Symfony2

旧城冷巷雨未停 提交于 2019-12-08 07:33:15
问题 I want to use CK Editor in my Symfony 2 project. I downloaded the zip file, unzipped and put it in my js folder, I included it in the page where I want the Editor. I am following this Question Click Here now I am stuck at step 6. How can I include that php in my twig template. The php that is in step 6 that needs to be included is <?php // Make sure you are using a correct path here. include_once 'ckeditor/ckeditor.php'; $ckeditor = new CKEditor(); $ckeditor->basePath = '/ckeditor/';

bootstrapvalidator gives “Cannot read property 'group' of undefined” on ckeditor field

那年仲夏 提交于 2019-12-08 07:14:44
问题 I'm using ckeditor on a text area and I need to set a custom validation. Following the example, I set the textbox using the jquery adapter in this way: $('#posteditor') .bootstrapValidator() .find('[name="text"]').ckeditor({ skin: 'moono,/asset/css/moono/', language: 'it', toolbarGroups: [ {"name":"basicstyles","groups":["basicstyles"]}, {"name":"paragraph","groups":["list","align"]}, {"name":"insert","groups":["insert"]}, {"name":"styles","groups":["styles"]}, {"name":"links","groups":[