ckeditor

ckeditor with spring mvc not working

笑着哭i 提交于 2019-12-11 02:29:56
问题 I'm trying to integrate ckeditor with a spring mvc project and it does not seem to be working. As far as I can tell I'm following the documentation but something is wrong. The only output I get is a textarea with no toolbar or anything resembling ckeditor. This stays the same if I specify the "Full' toolbar. It appears as if ckeditor is not being found, but why? Note: in my servlet-context.xml I have tried both <resources mapping="/resources/**" location="/resources/" /> and <resources

CKEditor on font-size change event

非 Y 不嫁゛ 提交于 2019-12-11 02:28:38
问题 Is there any way to capture an event when user has changed font-size? I'm looking for something similar to this: CKEDITOR.editor.getCommand('xxx').on('xxx', function(){ }); 回答1: You need to use: CKEDITOR.instances.your_instance_name.on( 'change', function() { // Code goes here } ); Replace your_instance_name with your instance name. 来源: https://stackoverflow.com/questions/19490380/ckeditor-on-font-size-change-event

How can I add an onClick listener to a fileButton in CKEditor?

萝らか妹 提交于 2019-12-11 02:08:48
问题 I'm working in the image uploader plugin, and have a button definition like this: { type : 'fileButton', id : 'uploadButton', filebrowser : 'info:txtUrl', label : editor.lang.image.btnUpload, 'for' : [ 'Upload', 'upload' ], onClick : function() {alert('hey')} } I have tried defining the function to be called elsewhere as a named function, with no luck. I also haven't been able to add an onClick listener to other elements, but the buttonDefinition class here specifically says you should be

how to make ckeditor stop removing empty divs

懵懂的女人 提交于 2019-12-11 02:08:43
问题 There are similar questions to this here on stackoverflow, but the answers in those questions do not work for me, so please don't flag this as a duplicate. In my cms, I want people to be able to add content pages that are SPA (Single Page Applications). It is very common for these kinds of apps to have nothing but a div with some attributes and javascript is used to load the app into the div. So I want users to be able to create content that consists only of an empty div with some attributes

How to discard only the last element of CKEditor undo stack?

荒凉一梦 提交于 2019-12-11 02:05:03
问题 Is there a way to remove only the last snapshot in the CKEditor undo stack or can i replace it with another.Should i implement it on my own? Example: Step 1 Step 2 --should be removed and replaced with step 3 (On given situation) Step 3 -- should become step 2 This feature should be available only if special event occurs. 回答1: If your undo snapshots are a result of user actions, following this way: Step 1. Step 2. CKEDITOR.instances.editor.fire( 'lockSnapshot' ) Step 3. CKEDITOR.instances

Limit number of characters and put read more link

谁说我不能喝 提交于 2019-12-11 01:43:42
问题 I am using in place ckeditor with jquery drag and drop. I want to limit the number of characters to 20 and put the read more link. Can anyone tel me, how can i do this. 回答1: Not sure if this will work inside your editor but does limit the characters when displayed on html page on frontend: <html> <body> <?PHP $chars = 20; $desc = substr($ckeditorcontent,0,$chars); echo $desc ."...";?><a href="#" title="More info">More</a> </body> </html> 来源: https://stackoverflow.com/questions/6332305/limit

How to stop CKEditor producing \r\n characters automatically when data is sanitized in PHP?

天大地大妈咪最大 提交于 2019-12-11 01:36:40
问题 I am having a problem regarding data coming from CKEditor textarea field. I am using CKEditor 4.4.1 . Whenever I try to submit the content of CKEditor it generates characters \r\n again and again. But it happening only when I am sanitizing my incoming data. Here is my function which sanitizes the incoming content - // filter user input public function filter_data($input) { // if magic quotes are on if(get_magic_quotes_gpc()) { $input = stripslashes($input); } $sanitized_data = mysqli_real

Display text from CKEditor

白昼怎懂夜的黑 提交于 2019-12-11 01:15:31
问题 When I display CKEditor text the html tags are also displayed. How can I only show the text? I'm getting this: <p>  </p> <ul style="list-style-type: none; list-style-image: none; list-style-position: outside;"> <li> Nurzahan Road,Dhaka</li> <li> West of Tajmahal Road</li> <li> Phone: 9110614</li> </ul> I want to show only this: * Nurzahan Road,Dhaka * West of Tajmahal Road * Phone: 9110614 回答1: You have probably a htmlentities() or htmlspecialchars() somewhere in the code that displays the

How to allow CKEditor within WebView to access the clipboard?

女生的网名这么多〃 提交于 2019-12-11 01:13:45
问题 I'm using a CKEditor 4.1.1 instance within my JavaFX apps' WebView . When i hit the paste-button of the editor, a window opens that tells me that the security settings of the browser prevent clipboard access. As the browser in this case is the WebView component, how can i alter the according settings to enable clipboard access? Test App: import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.web.WebView; import javafx.stage.Stage; public class SimpleWebView

Click anywhere to focus in CKEditor

时光毁灭记忆、已成空白 提交于 2019-12-11 00:48:24
问题 In FireFox, I can click anywhere in CKEditor (350px x 250px) to place focus on a single paragraph of text located at the top of the editor. However, in IE6 (I know, but our client insists) I must click directly atop the paragraph to focus the cursor and subsequently edit the text. CKEditor creates the following: <iframe> <html> <head>...</head> <body spellcheck="true"> <p>some text to edit</p> </body> </html> </iframe> I suspect this is an IE6 problem; any ideas??? EDIT: Apparently a known