ckeditor4.x

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

Upload Image: Cannot read property 'setCustomData' of undefined

依然范特西╮ 提交于 2019-12-10 23:35:03
问题 I am trying to embed into the editor an uploaded image. My filebrowserUploadUrl is /api/m/image and it seems to be working fine. After I clicked the Send it to the Server button, there is a script error as follows: image.js?t=H4PG:19 Uncaught TypeError: Cannot read property 'setCustomData' of undefined at textInput.onChange (image.js?t=H4PG:19) at textInput.n (ckeditor.js:10) at textInput.CKEDITOR.event.CKEDITOR.event.fire (ckeditor.js:12) at textInput.setValue (ckeditor.js:619) at textInput

CKEditor 4.4.7 does not show up on any mobile browsers

怎甘沉沦 提交于 2019-12-10 13:59:13
问题 I am creating an internal CMS for work, and it is important that all pages be mobile-friendly. When you view a page with CKEditor 4.4.7 installed from a phone, the editor shows up as a normal textarea and none of the HTML or text within it is properly formatted. I can request a desktop version using my phone's browser, and sometimes this will work. It seems to be pretty hit-or-miss across different phones. I don't believe it has anything to do with enabling JavaScript. Sorry for the lack of

How to apply multiple styles to one element in ckeditor?

自作多情 提交于 2019-12-09 20:16:45
问题 I want to integrate some bootstrap classes to my ckeditor profile: { name : 'Button Large' , element : 'a', attributes : { 'class' : 'btn-lg' } }, { name : 'Button Primary' , element : 'a', attributes : { 'class' : 'btn-primary' } }, but the problem is those styles cant be combined. If I want a button which is btn-primary AND btn-lg I would have to create a third style: { name : 'Button Large Primary' , element : 'a', attributes : { 'class' : 'btn-lg btn-primary' } }, which obviously is quite

checkDirty always returning true

对着背影说爱祢 提交于 2019-12-08 13:42:47
问题 Whenever I call checkDirty() I am always getting true. Run the example below and just click the destroy button. jsfiddle $(document).ready(function() { CKEDITOR.config.autoUpdateElement = false; CKEDITOR.on('contentDom', function (event) { event.editor.resetDirty(); }); CKEDITOR.on('instanceReady', function (event) { event.editor.on('contentDomUnload', function (destroyevent) { alert('isdirty: ' + destroyevent.editor.checkDirty()); }); }); $("#item_ckeditor").ckeditor(); $("#item_docompare")

Using Bootstrap 3 Popovers With CKEditor 4 and jQuery Validate

夙愿已清 提交于 2019-12-08 13:41:46
问题 This is a continuation of a question I asked previously: jQuery Validate, Select2, and Bootstrap 3 Popovers - How to Bind Popover To Select2's Parent Elements Instead of Hidden Select Element While the issue with Select2 was resolved, the issue with CKEditor never did, and while at the time I resorted to an alternate solution, I would prefer to use the popovers since they do not alter document layout when triggered. Here is a Fiddle of my current issue: http://jsfiddle.net/jemxtthb/13/ I know

CKEDITOR Drag and drop plugin integration stops working after editor instance is destroyed and recreated

左心房为你撑大大i 提交于 2019-12-08 00:57:10
问题 I'm having quite a bit of trouble while trying to use CKEditor's drag and drop integration. At first, dragging and dropping into the editor works allright with dataTransfer and all. But whenever I have to destroy and recreate an instance of the editor, dragging and dropping content stops working as expected. I have modified the sample code directly from CKEditor's SDK page about DnD integration, where you can see the issue being reproduced. (I just reduced the example as to make it more

How to apply multiple styles to one element in ckeditor?

回眸只為那壹抹淺笑 提交于 2019-12-04 17:26:02
I want to integrate some bootstrap classes to my ckeditor profile: { name : 'Button Large' , element : 'a', attributes : { 'class' : 'btn-lg' } }, { name : 'Button Primary' , element : 'a', attributes : { 'class' : 'btn-primary' } }, but the problem is those styles cant be combined. If I want a button which is btn-primary AND btn-lg I would have to create a third style: { name : 'Button Large Primary' , element : 'a', attributes : { 'class' : 'btn-lg btn-primary' } }, which obviously is quite redundant for many buttons and not necessary. So how can you do this? Using CKeditor 4.4.3 Antares42

CKEditor : wordcount - unable to find in CDN

荒凉一梦 提交于 2019-12-02 14:29:56
问题 how to use wordcount or any other plugin when referrring to CDN script. Question-1: I'm referring to below CDN and I have added extraplugin in config.js. But it says unable to find "wordcount". it is full-all package not sure why it is unable to find. src="https://cdn.ckeditor.com/4.8.0/full-all/ckeditor.js" Question-2: is there a way to download full-all(full package doesn't have all plugins enabled) from builder. instead have everything locally. Question-3: without CDN URL ng2-ckeditor

Preventing CKEditor from removing classes assigned in source mode?

前提是你 提交于 2019-12-02 11:59:23
I want to be able to add a class attribute to a UL in source mode of CKEditor. When I do that and switch back to the normal editor mode the <ul class="xxxx"> becomes <ul> How can I get it to not remove the class tag? This happens because of Advanced Content Filter (ACF) . You need to use extraAllowedContent like this: config.extraAllowedContent = 'ul(*)'; to allow any CSS class for ul element. You can be more specific and allow only certain CSS classes, like this: config.extraAllowedContent = 'ul(class1,class2,class3)'; (note no space between names). You could also disable ACF (not ideal