ckeditor

Angular, ng-ckeditor, and the editor-destroy-iframe bug

不羁的心 提交于 2019-11-29 15:35:13
This posting is regards ng2-ckeditor@1.1.13 loaded with ckeditor@4.8.0. Although there are a couple of articles on SO with this question I believe this is still an open question. Please do not mark this posting as a duplicate. To replicate problem: 1) instantiate a DOM element with the ckeditor directive. 2) navigate away from the view in such a way that the Angular Component that is hosting the ckeditor is destroyed. You get this in the Javascript console: ckeditor.js:19 [CKEDITOR] Error code: editor-destroy-iframe. There is a closed bug on github over this with no apparent or acceptable

Save data to PHP / Mysql with inline edit in CKEditor

人走茶凉 提交于 2019-11-29 15:14:07
问题 I want to use "inline edit" of the new CKEditor 4 (http://docs.ckeditor.com/#!/guide/dev_inline-section-2), but can not find any example of how to save the data with PHP / MySQL. Can you help me? 回答1: You need some AJAX magic. Via JavaScript inside the page you get the edited HTML. Then you send it to the server where a PHP script gets it and can pass it onto MySQL. Here is a simple test case which will show you the ropes. Let's start with the editable HTML. <div id='textToBeSaved'

Image dialog — extend onOk, instead of total overwrite

情到浓时终转凉″ 提交于 2019-11-29 14:43:05
I have found out that I can hook into onOk with this: editor.on('dialogShow', function (ev) { var name = ev.data.getName(); var definition = ev.data.definition; if (name == 'image') { definition.onOk = function(e) { console.log( e ); }; } }); Awesome, unless now the default behavior is dropped, resulting in no image being added to the CK content. Checking up on CK's source , I do not want to break 74 lines worth of functionality provided by default. My goal is to simply run the image through a callback after it has been appended. Is copy/paste, modify the only way to retain extend the

How to add a field to POST values in CKeditor upload

二次信任 提交于 2019-11-29 14:21:21
问题 I use django and ckeditor to provide wysiwyg taste to TextEdits. I would like to use CKEditor file upload function (in filebrowser / image dialog), but the POST made by CKEditor to upload the image just contains the file data. This is a problem for CSRF checking. I couldn't find in CKEditor documentation and source a place to change the POST data for file upload , to add django's csrf_token in POST data. As a workaround, I can change the filebrowserUploadUrl parameters to include csrf data in

CKEDITOR - turn off html encoding

旧时模样 提交于 2019-11-29 13:22:14
In my CKEDITOR, when I type following letters: ó " ... whitespace and more I am getting the following HTML: &oacute; &bdquo; &hellip; &nbsp; and so on... How can I turn this off, so that the server will receive "normal" letters? I managed to reduce the number of characters converted by adding this to my config file: config.htmlEncodeOutput = false; config.entities = false; But whitespaces are still being converted into &nbsp; ... 来源: https://stackoverflow.com/questions/20645750/ckeditor-turn-off-html-encoding

How can I detect on change event in ckeditor instance?

那年仲夏 提交于 2019-11-29 12:44:02
I want realize a "live" editing. When you editing content in ckeditor, the same content appear in other place (like div, p, etc.) in same time. Other interesting question : when I removed display:none and visibility:hidden from text area, which attach to ckeditor, I saw, that it's empty. But if I try to get value of textarea ($('#text_editor').val()) there are content from ckeditor. What is the magic? One of the developers of ckeditor has developed an onchange plugin . 来源: https://stackoverflow.com/questions/10391136/how-can-i-detect-on-change-event-in-ckeditor-instance

how to use ckeditor in an angular js web App?

℡╲_俬逩灬. 提交于 2019-11-29 12:43:10
I am struggling to use ckeditor within my html page built in angularjs . I have tried so many examples. ng-ckeditor directive ckeditor directive But none of those examples helped me. I want a textarea where I can input images within it and edit its contents style (Like in ckeditor ). Anyone please give me a clear example or demo fiddle on how to use ckeditor in angularjs . I have also tried custom directive. It's not working. Is there any alternative for ck editor? Thanks in advance. nikhilvm https://github.com/lemonde/angular-ckeditor . Step 1-3 are actually documented quite well in the

Apply CKEditor Advanced Content Filter to a string

假装没事ソ 提交于 2019-11-29 12:38:09
How can I apply CKEditor's Advanced Content Filter to a string? I'm trying to intercept pasted content using editor.on('paste', ...), get its ACF-filtered value, and then apply my own transformations to the filtered value. After this point, it's okay if it runs through the ACF again. I reported recently a ticket which I think you'll find interesting: http://dev.ckeditor.com/ticket/11621 . There's a pretty high chance that this feature will be introduced in CKEditor 4.5. ( Edit : This feature got to CKEditor in 4.5 – CKEDITOR.config.pasteFilter ). As for your question - to apply ACF to an HTML

CKEditor 4.2.2 - allowedContent = true is not working

心不动则不痛 提交于 2019-11-29 12:02:14
I guess I've read most of the SO questions and CKEditor documentation about this, but it does not work for me. It should be plain and simple, in my CKEditor config.js, I have this : CKEDITOR.editorConfig = function(config) { config.allowedContent = true; }; But the html is still filtered and this piece of code is being stripped : <p> <a href="/site/public/press.pdf"><span class="icon-presseFile"></span></a> <a href="/site/public/pics.zip"><span class="icon-pressePics"></span></a> </p> into this : <p> </p> The <span> elements are font icons. Any help would be greatly appreciated. EDIT It works

Is there a way to set the default font and font-size in CKEditor?

孤街醉人 提交于 2019-11-29 10:47:40
I've been looking for a solution for this for a while now and the only fixes I found only affect the way the text is displayed in the editor itself and not how the generated text will look when sent/saved somewhere else. I'm talking CSS fixes and stuff like that. I'm using CKEditor to compose and send emails trough our web application and while the css fixes change the font shown in the editor itself, the recieved emails are still displayed in TNR or whatever is inherited from the email client. Unless, of course, I change the font and size from the plugin for each paragraph. From what I've