ckeditor

How to change the editor size of CKEditor?

匿名 (未验证) 提交于 2019-12-03 08:33:39
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Since it is a textarea , I tried cols="50" in html attribute but it does not work. Also , I found the answer from the previous question . He said I can do this by adding. CKEDITOR.instances.myinstance.resize(1000, 900); However , the size still has not changed. Here is the code I attempted, thank you. Updated <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <script src="../plugin/jquery-1.6.1.min.js"></script> <script src="../plugin/jquery.validate.min.js"

CKEditor Memory Leak on setData()

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I think I'm having some big memory leaks related to the CKeditor setData() function. I have a web app where users can design their own content with Javascript. CKEditor is used as the WYSIWYG editor for the users to write content of each part of the design. Each time a user click on a editable text-element in their design, editor.setData is called, and it sets the CKEditor data to whatever is within the text element of the users design that is being clicked. This works fine for a few times, but each time a user click a new text element, and

Copy equations from word in Mathml format

孤街醉人 提交于 2019-12-03 07:48:20
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. You have probably used the new (as from Word 2007) Equation Tools. Then the conversion is simple. The old equation editor is still available, but you

Controlling save button enabled/disabled state programmatically

浪子不回头ぞ 提交于 2019-12-03 07:39:46
How would I enable/disable the save button of CKEditor using external JS? I don't want to remove it completely, just change the appearance between gray and colored icon so that it's more user friendly. My save button is generated like so: CKEDITOR.plugins.registered['save'] = { init : function( editor ) { var command = editor.addCommand( 'save', { modes : { wysiwyg:1, source:1 }, exec : function( editor ) { if(My.Own.CheckDirty()) My.Own.Save(); else alert("No changes."); } }); editor.ui.addButton( 'Save',{label : '',command : 'save'}); } } Here you go: For 3.6.x: CKEDITOR.instances

Remove all CKEditor instances

给你一囗甜甜゛ 提交于 2019-12-03 05:52:24
I have a form in which I have CKEditor replacing my <textarea> s (multiple). I want to remove all CKEditor instances from the page before submitting the form. How can I accomplish this? I've looked at Remove CKEdit Instance but it didn't help me at all. NOTE: All my CKEditors have a class "ckedit" This will destroy all CKEDITOR instances on a page: for(name in CKEDITOR.instances) { CKEDITOR.instances[name].destroy(true); } you can make use of . remove () of jquery, before submitting. Have you tried just... delete CKEDITOR; I had a similar situation and this worked for me. Just make sure you re

ckeditor - onpaste event

三世轮回 提交于 2019-12-03 05:29:33
Does anyone know how I can attach an onpaste event in CKEditor 3.x? I basically want to grab CTRL + V data and add few text to it and then add it to the editor. I have looked around but have not found a definitive answer. CKEditor forum is of not much help. This should do the trick var editor = CKEDITOR.instances.YourInputControlName; editor.on('paste', function(evt) { // Update the text evt.editor.setData(evt.editor.getData() + ' your additional comments.'); }, editor.element.$); Your both examples are a little bit synthetic. At first, editor.getData() gets all the content of editor, so if

Insert text at the cursor position to a CKEditor using jQuery

只谈情不闲聊 提交于 2019-12-03 05:23:20
I'm trying to add a piece of text to an existing CKEditor using jQuery. This needs to be done when a link is clicked. I tried this solution, which works for regular textareas, but not for CKEditor: jQuery.fn.extend({ insertAtCaret: function(myValue) { return this.each(function(i) { if (document.selection) { //For browsers like Internet Explorer this.focus(); sel = document.selection.createRange(); sel.text = myValue; this.focus(); } else if (this.selectionStart || this.selectionStart == '0') { //For browsers like Firefox and Webkit based var startPos = this.selectionStart; var endPos = this

How to configure simple links and image attaching in ckeditor?

≡放荡痞女 提交于 2019-12-03 04:30:58
问题 I'm using django-ckeditor and I have some problems with the links and images. Regarding Links: In this interface you can see that this is not usable by the end users, as it is too complex and can lead to errors and security issues, as the button Browse Server literally permits the user browse uploaded content. What I want is something really simple: just an input text that automatically appends http (if not typed by user) and that opens the link in a new window aka target _blank . I've tried

rails 4 with CKeditor

和自甴很熟 提交于 2019-12-03 03:57:03
问题 I cannot get the galetahub ckeditor gem to work with Rails 4 for me. I searched for any problems online but cannot find any. I'm following the instructions exactly. I include gem "ckeditor" in my Gemfile I include gem "carrierwave" and gem "mini_magick" I run rails generate ckeditor:install --orm=active_record --backend=carrierwave I run rake db:migrate Inside application.rb I include config.autoload_paths += %W(#{config.root}/app/models/ckeditor) Inside routes.rb I have mount Ckeditor:

CKEditor in CodeIgniter

隐身守侯 提交于 2019-12-03 03:22:53
I wanna load CKEditor in CodeIgniter,I search a lot,but can't understand their way. I placed ckeditor in application/plugins folder and now I wanna make editor ,so I do following in Controller Method. include APPPATH.'plugins/ckeditor/ckeditor.php'; $CKEditor = new CKEditor(); $CKEditor->basePath = '/'.APPPATH.'plugins/ckeditor/'; $initialValue = '<p>This is some <strong>sample text</strong>.</p>'; echo $CKEditor->editor("editor1", $initialValue); but it makes simple teaxaria only ,with This is some sample text . value. where is the problem and how should I solve it? I use this steps to add