ckeditor

CKEditor “overflow: scroll” on parent causes toolbar to freeze at initial position

不问归期 提交于 2019-12-31 03:13:21
问题 When you add a CKEditor to a div inside a div with: "overflow: scroll" the toolbar won't move when scrolling the parent div... <div id="wrapper" style="overflow: scroll;"> <div contenteditable="true">This is the ckedito</div> </div> An example can be found here: ​http://jsfiddle.net/W8Dt4/ Does anyone know a workaround around this problem? I think the desired behaviour would be: Keep the toolbar at the top of the editor div when there's enough room. Move the toolbar to the bottom of the

How to get ckeditor resources to compile and load in Rails 3.1 asset pipeline

孤街浪徒 提交于 2019-12-30 21:27:00
问题 I'm trying to use CKEditor in a Rails 3.1 app. I have the ckeditor directory in app/assets/javascripts/ckeditor/, with extraneous stuff like the uncompressed and modularized source removed. It works fine in development. In production or staging environments, ckeditor can't find it's own files: config.js, lang/en.js skins/kama/editor.css. I can see that these files are not being precompiled, which makes sense since the asset pipeline by default won't include or precompile anything that matches

Loading Multiple CKEditors is Slow

爷,独闯天下 提交于 2019-12-30 11:38:09
问题 I have a lot of ckeditors on one web page for students to enter their data. I have a lot of ckeditors because each one is for one variable. Unfortunately, an input text field is too small for the data requested. The problem is that it takes too long for the web page to load and sometimes the web page hangs. I'm currently loading almost 425 editors. Here's an example of my code for three: <script type='text/javascript'>//<![CDATA[ $(window).load(function () { CKEDITOR.on('instanceReady',

CKEditor loses content when removed from DOM and added again

佐手、 提交于 2019-12-30 10:18:47
问题 Context CKEditor is a rich text editor that uses an iframe with an editable body. I have a situation where I need to temporarily remove an element containing a CKEditor instance from my page, then add it back some arbitrary amount of time later. Problem Unfortunately, this seems to cause the iframe to reset. Where the editor originally contained the rich text content and an editable body element, after adding the editor back to the page the iframe body is empty and no longer editable.

Retain cursor position after reloading the page in CKEditor

房东的猫 提交于 2019-12-30 10:07:48
问题 I am using CKEditor (4.1) in my project.I would like to retain the cursor position in editor after user reloading the page. CKEditor provides var bookmark = editor.selection.createBookmarks(); to store the cursor position.However, if i use var data = editor.getData() returns the following content <p>one</p> <p>two<span style="display:none"> </span></p> <p>three</p> instead of the following <p>one</p> <p>two<span data-cke-bookmakrs="1" style="display:none"> </span></p> <p>three</p> In config

Retain cursor position after reloading the page in CKEditor

偶尔善良 提交于 2019-12-30 10:07:11
问题 I am using CKEditor (4.1) in my project.I would like to retain the cursor position in editor after user reloading the page. CKEditor provides var bookmark = editor.selection.createBookmarks(); to store the cursor position.However, if i use var data = editor.getData() returns the following content <p>one</p> <p>two<span style="display:none"> </span></p> <p>three</p> instead of the following <p>one</p> <p>two<span data-cke-bookmakrs="1" style="display:none"> </span></p> <p>three</p> In config

CKEditor MVC 3 implementation

泄露秘密 提交于 2019-12-30 09:41:32
问题 Learning mvc and I am trying to implement a page with 3 fields Name-Surname-Description So in my learning example I am loading employees and I should be able to create and edit them. The description should use CKEditor . I can load employees I can save them However I cannot seem to be able to save the description,such as whatever the user types in the description field. I have seen few examples on the net but none with a solution to download,as I cannot seem to put together. I have found this

How to configure CKEditor to allow html block-level tags to be wrapped in an anchor tag

允我心安 提交于 2019-12-30 07:08:04
问题 I would like to wrap a few block tags in a link (valid in HTML5): <a href="http://example.com"> <div>foo</div> <p>bar</p> <span>baz</span> <strong>zoom</strong> </a> But CKEditor rewrites the code such that the links are placed inside block tags and allowed to wrap inline tags as the above code is replaced with the following: <div><a href="http://example.com">foo</a></div> <p><a href="http://example.com">bar</a></p> <a href="http://example.com"><span>baz</span> <strong>zoom</strong> </a> How

Where the list of all toolbar button names and group names available in CKEditor 4?

只谈情不闲聊 提交于 2019-12-30 04:58:26
问题 This question is similar to What toolbar buttons are available in CKEditor 4? and a reinforce of this old other one. I add here some perceptions and personal difficulties that I faced. The CKEditor documentation is good, but pulverized and "incomplete" for Javascript programmers (first-time CKEditor deployer), because "stops in the middle"... Examples: if I need removeButtons, I need also the list of valid names . if I need to customize — by source-code, changing array elements —, I need not

CKEditor's click event not firing

半世苍凉 提交于 2019-12-29 09:08:24
问题 I am using CKEditor 4.4.3 and trying to listen to an editor's click event: editor.on('click', function (e) { console.log('click event from attaching to the editor'); }); For some reason, the click event never fires. However, if I listen to the doubleclick event, it fires when the editor is double clicked. I was previously listening to the click event on editor.editable , but it doesn't appear to work for editors that are not inlined. Why is the click event not working? Some further