ckeditor

ckeditor is undefined in Angular 6

烈酒焚心 提交于 2019-12-02 10:16:48
I am using ckeditor in Angular 6. And trying to create a instance while uploading image saveToServer(file: File) { this.appService.saveEditorimage(file).subscribe(data => { this.response = data.json(); var url = "/images/" + this.response[0].filename console.log(url) // this.ckEditor let link = this.ckEditor.instance.document.createElement("img"); link.setAttribute("alt", "Image"); link.setAttribute("src", url); this.ckEditor.instance.insertElement(link); }) } this.ckEditor is undefined. How Do i fix this issue. 来源: https://stackoverflow.com/questions/55298230/ckeditor-is-undefined-in-angular

Using CKEditor with Aurelia

↘锁芯ラ 提交于 2019-12-02 10:06:46
问题 Does anyone have a good working example of how to use CKEditor in Aurelia? I try this code in my template file but get the following error: <template> <require from="../../../jspm_packages/npm/ckeditor@4.5.10/ckeditor.js"></require> <textarea name="editor1" id="editor1"></textarea> <script> CKEDITOR.replace('editor1'); </script> </template> Error: c[a] is undefined system.js 4992:13 回答1: This example works well in ESNext/SystemJS skeleton. First, install ckeditor via jspm: jspm install npm

CKeditor with multible dynamic textareas

会有一股神秘感。 提交于 2019-12-02 09:48:58
I have a forms which allows multiple steps to be submitted. When a user clicks "add step" another textarea appears. I am using CKeditor. It works great of the first iteration, but on all subsequent ones, it shows a standard text area. Here is my code: <form method="post" action="process_project.php"> <b>Steps for your project:</b> <div> </div> Step 1 <div id="divWho"> <textarea name="projSteps[]" class="steps" id="1" rows="10" cols="60"></textarea> </div> <div> </div> <input type="button" value="Add project step" onClick="addTextArea();"> <input type="submit" name="submit" value="submit" /> <

How can I change the title ckeditor sets for inline instances?

ぃ、小莉子 提交于 2019-12-02 09:48:45
Right now it sets it to Rich text editor, element_id. Is there any way to change that? In ckeditor.js search for the following string: a.changeAttr("title",c) And justs set it to an empty string if you want: a.changeAttr("title",''); Keep In mind, you'll lose this during an update, but this is the only way until they add it to their editable configurations. Only use this if you don't mind losing some a11y. This title is set in CKEDITOR.editable . You can change it by: modifying this code, changing translation in lang/<your lang>.js (e.g. https://github.com/ckeditor/ckeditor-dev/blob/master

Using CKEditor inside blade template [Laravel 3.x]

扶醉桌前 提交于 2019-12-02 09:32:59
I'd like to use this bundle: laravel-ckeditor but I have troubles in nesting it in my view (all previous installation steps I've done successfully). How can i connect Form::text() with this bundle? When I add <?php $ckeditor = new CKEditor(); $config = array(); $config['toolbar'] = array( array( 'Source', '-', 'Bold', 'Italic', 'Underline', 'Strike' ), array( 'Image', 'Link', 'Unlink', 'Anchor' ) ); $events['instanceReady'] = 'function (ev) { alert("Loaded: " + ev.editor.name); }'; $ckeditor->editor("field1", " Initial value. ", $config, $events); ?> it simply creates new text area but

detecting changes with ckeditor

只愿长相守 提交于 2019-12-02 09:03:16
问题 I've been googling around to find a solution but without any working solutions yet. I want to detect if the textarea has been changed. I'm using ckeditor so you can't check the textarea itself. I found something in the documentation but I couldn't get it to work for me. Did someone ever tried to do this before and is it possible? 回答1: After some research and a lot of googling a found a suitable method. var content_editor = CKEDITOR.instances['content']; content_editor.on( 'key', function() {

CKEditor4 destroy, not preserve original HTML content. How to disable filters?

别说谁变了你拦得住时间么 提交于 2019-12-02 08:48:35
I am using the standard demos, like this . So, the main options (little changes) can be flagged at config.js . Example when edit by source-code-HTML (button Source ): elements (tags) with class attribute, lost the attribute ( class has been stripped out). So, how to disable the "default filter"? The "filtering by default" behaviour is a problem: is not backwards compatible, and, mainly, not a expected behaviour, because destroy the original content, that you must only change with editor. Similar questions: CKeditor allowedContent behaving oddly CKEditor classes being stripped At config.js you

UploadFile callback is not being triggered in CKEditor

别说谁变了你拦得住时间么 提交于 2019-12-02 08:36:49
问题 I am using latest Full CKEditor ( 4.5.3 ) with Office2013 style enabled. I added filebrowserImageUploadUrl option here: CKEDITOR.replace( 'news_content' , { "filebrowserImageUploadUrl": "/path/to/script.php" }); When an image is uploaded, backed is returning proper HTML and headers to CKEditor, but what it does - just displays that JavaScript code and doesn't actually trigger that. If I copy-paste that JS to the browser (Chrome) console - it works (switches tab to the first one and inputs the

CKeditor rich text editor displaying html tags in browser

若如初见. 提交于 2019-12-02 07:39:44
I've just installed CKeditor rich text WYSIWYG editor on a site I'm building and it seems to be working ok except for the fact that it inserts text into my mysql database as encoded html rather than regular html and then when the browser outputs this text it converts the encoded data into regular html that then displays in the browser showing the html tags and none of the styling!? eg I type: "This is text" into the editor and it then inserts <p>This is text</p> into the database. Then when the page is called the browser converts the above and outouts the following on the page: <p>This is text

In CKEditor 4.x is there a way to get the list of allowed tags after initialization?

怎甘沉沦 提交于 2019-12-02 07:20:29
问题 Is there a way to get a list of all allowed tags in CKEDitor 4.x (4.4.7 to be precise) after the editor has been initialized with all plugins, and all allowedContentRules and disallowedContentRules or any other datafilters have been applied? I would like to have this list so that I can pass it on to our back-end for whitelisting. I know there is already a whitelist plugin for CKEditor which would allow me to specify the same whitelist on both front-end and back-end, but I'm afraid I may miss