ckeditor

How to disable CKEditor context menu?

核能气质少年 提交于 2019-11-27 02:08:40
问题 Does anybody know how to disable CKEditor's context (right click) menu? I would expect a configuration option, but I can't find one. I am using v3.1. Thanks. 回答1: You need to remove the contextmenu plugin. See here for 3.1. 回答2: As of version 3.6.4, the other answers in this question don't work anymore. See bug #9284 The three plugins that need to be disabled (using the means discussed in this question), are contextmenu , liststyle and tabletools . So for example, using config files: CKEDITOR

Change CKEditor toolbar dynamically

时光毁灭记忆、已成空白 提交于 2019-11-27 01:53:13
问题 How do you change the CKEditor toolbar dynamically (without using a pre-defined toolbar)? The CKEditor Developer's Guide only tells you how to set the toolbar during initialization. I'm using CKEditor 3.6.4. 回答1: Following mb21's suggestion I managed to load a new toolbar by reinitialising the whole editor: CKEDITOR.instances.editor.destroy(); CKEDITOR.replace('editor', configWithNewToolbar); 回答2: var editor = CKEDITOR.instances['text_id']; if (editor) { editor.destroy(true); } CKEDITOR

How to properly destroy CKEditor instance?

99封情书 提交于 2019-11-27 01:47:42
问题 I am running CKeditor 3.4 on a pretty simple page. I am having a problem (sometimes) where when I call document.main_form.submit(), it will not send along the contents of the textarea. After some reading, it sounds like CKeditor is not destroying properly. I tried to manually destroy it before I save the form, but wasn't able to call it. The weird thing is, it works sometimes, but not others. I'm on Chrome, so that may be screwing with things, but the same thing happens in Firefox. How can I

how to add or embed CKEditor in php page

大兔子大兔子 提交于 2019-11-27 01:41:30
问题 how to add or embed CKEditor in php page, I downloaded and extracted the zip file into root of the directory and also called on my page <?php require("ckeditor/ckeditor.php"); ?> gave the textarea this fields <textarea class="ckeditor" name="editor1">Write any thing</textarea> But its not working, Documentation for installation on PHP is not found CKEditor website. Does any one knows where we or help me out..for this app. 回答1: Easy steps to Integrate ckeditor with php pages step 1 : download

in asp.net-mvc, is there a good library or pattern to follow when saving users content (images, files, etc)

筅森魡賤 提交于 2019-11-27 01:41:23
问题 i have an admin section of my website where "authors" can upload files like pictures for photo galleries, etc to include in dynamic content sections of my website later. I have certain pages where the html itself is stored in my mySQL database and users can edit the content using ckeditor interface. i am trying to see if there is something to leverage that will save files to the right directory and retrieve them later or i should just write this all from scratch. Also, looking for lessons

How to retrieve the CKEDITOR.status “ready”?

自古美人都是妖i 提交于 2019-11-27 01:34:11
问题 In my script, I wanted to wait for the CKEDITOR to be in state ready before I let my own instructions go their way. So I consulted the CKEDITOR API and wrote the following condition: if(CKEDITOR.status == "ready"){ //execute my code when ready } However, the status never ever changes to from loaded to status . Apparently I didn even see any other state. More task specific, I wanted to catch the moment when CKEDITOR has completed modifying the inline replacing of contenteditable="true". That's

Removing unwanted newline characters when adding <p> in CKEditor

瘦欲@ 提交于 2019-11-27 00:47:38
问题 When loading content with a set of paragraphs in CKEditor, it replaces my <p> tags with <p> That means the editor converts this: <p>paragraph 1</p> <p>paragraph 2</p> <p>paragraph 3</p> into what ends up like this: <p> paragraph 1</p> <p> paragraph 2</p> <p> paragraph 3</p> How do I fix it so that CKEditor doesn't add the extra newline characters when it sees the paragraph tags? 回答1: Add this line to the ckeditor.js configuration file: n.setRules('p',{indent:false,breakAfterOpen:false});

How to add data to CKEditor using JQuery

社会主义新天地 提交于 2019-11-27 00:28:40
问题 Everytime a page loads I need to load text into the CK Editor using JQuery, in order to get data from CK Editor I use var editor_data = CKEDITOR.instances['editor1'].getData(); now is there a similar function I could use to put the data back into the editor? I'm using ajax to set the data like this $.ajax({ type: "POST", url: "/inc/ajax/basic.php?menu_id="+menu_id+"&info=3", success: function(msg){ CKEDITOR.instances['editor1'].setData(msg); } }); What am I doing wrong 回答1: Try this: CKEDITOR

How can i get content of CKEditor using JQuery?

心已入冬 提交于 2019-11-26 22:36:15
问题 I'm using CKEditor. I am saving the form values with ajax using page methods. But the content of CKEditor value cannot be saving into the table. I dont postback the page. What can i do for that? 回答1: First of all you should include ckeditor and jquery connector script in your page, then create a textarea <textarea name="content" class="editor" id="ms_editor"></textarea> attach ckeditor to the text area, in my project I use something like this: $('textarea.editor').ckeditor(function() { }, {

CKEditor strips inline attributes

一世执手 提交于 2019-11-26 22:15:06
问题 I have been using CKEditor for some time and it has worked great. I've pretty much gotten rid of any problems that ive had but this one i cant seem to figure out. When i add inline attributes to elements for instance style = "color: #ff0;" on a <p></p> tag they are stripped out when i switch from wysiwyg to source view. No saving or submission is done and ckeditor is has been added to my site which is my own script. Any ideas as to what would cause this. All of the search results i can find