ckeditor

CKEDITOR Error code: editor-destroy-iframe in Angular 2

匿名 (未验证) 提交于 2019-12-03 02:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using ng2-ckeditor in my Angular2 project. It is working fine but when I go on another component, It shows warning message [CKEDITOR] Error code: editor-destroy-iframe . I google for solution and found below solution: for (name in CKEDITOR.instances) { CKEDITOR.instances[name].destroy(true); } But from where to get CKEDITOR . In ng2-ckeditor package, I can see only 2 library CKEditorModule, CKEditorComponent . Please help me to solve this. 回答1: Try adding the typescript definition file for CKEditor in package.json under devDependencies

CKEditor, AJAX Save

匿名 (未验证) 提交于 2019-12-03 01:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Can you provide an example on how to setup CKEditor to save via AJAX using the Save button in the CKEditor toolbar? I'm interested in creating a CKEditor AJAX save page but am not seeing any examples on their site. Thanks! 回答1: Try copying straight from _source/plugins/save/plugin.js and changing as needed. Create your new plugin in /path/to/ckeditor/plugins (i.e. Not in /path/to/ckeditor/_source/plugins). For example, in /path/to/ckeditor/plugins create a new directory "AjaxSave", then in that directory create a file "plugin.js". Then in

Using JQuery to set CKEditor Value

匿名 (未验证) 提交于 2019-12-03 01:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a CKEditor textarea: I have jQuery trying to set the value from the database: $ ( '#ContentPlaceHolder_taBody' ). val ( substr [ 5 ]); Don't worry about the substring I already tested that it is returning a string. For testing purposes I replaced the substring with 'test' and was receiving the same issue. I know that the jquery surrounding this line doesn't affect it because the other textfields I'm trying to populate work. Just when it comes to the ckeditor. Here is the script in whole: function ( obj ) { $ . ajax ({ type :

How to configure CKEditor in Rails 3.1 (gem + Asset Pipeline)

匿名 (未验证) 提交于 2019-12-03 01:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I've successfully configured the ckeditor gem from https://github.com/galetahub/ckeditor on my Rails 3.1 app. My problem now is that I can't figure out how to configure the CKEditor. The files that are used according to the Readme simply don't exists in a Rails 3.1 application with the asset pipeline enabled. 回答1: The answer was easy once i've figured out the thrown error message. /app/assets/javascript/ckeditor CKEDITOR . editorConfig = function ( config ) { config . toolbar_MyToolbar = [ { name : 'document' , items : [ 'NewPage'

CKeditor instance is null or undefined?

匿名 (未验证) 提交于 2019-12-03 01:41:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Hi all i have an CKeditor in my screen ckeditor is displaying but when i try to get the instance of the editor i have the value null or undefined how can i get the ckeditor instance can any one help me here function editor () { //i have null here for ( name in CKEDITOR . instances ) { CKEDITOR . instances [ name ]. destroy () } var editor = CKEDITOR . instances . editor1 ; //i have null here editor . on ( 'key' , function () { var data = editor . getData (); }); } $ ( document ). ready ( function () { var editorShort = CKEDITOR .

Prevent CKEditor from formatting code in source mode

梦想的初衷 提交于 2019-12-03 01:30:18
How can you prevent any automatic formatting when in CKEditor when viewing in source mode? I like to edit HTML source code directly instead of using the WYSIWYG interface, but whenever I write new lines, or layout tags how I would indent them, it all gets formatted when I switch to WYSIWYG mode and then back to source mode again. I stumbled upon a CKEditor dev ticket, Preserve formatting of ProtectedSource elements , that alluded to a setting which may have existed once upon a time which would be exactly what I'm after. I just want to know how I can completely turn off all automatic formatting

CKEditor: Customized HTML on inserting an image

匿名 (未验证) 提交于 2019-12-03 01:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm using CKEditor 3.5 to provide WYSYWYG editing in a website. When inserting an image you can provide width and height of the image, which results in HTML like follows: Since this does the resizing in the browser and in other places on the same website I use Nathanael Jones' Image Resizing Module , I'd like to get the following output instead: Is there an easy way to control the generated HTML or have I really to write my own dialog/plugin for CKEditor? EDIT: Adding the following lines to config.js was the solution that

CKEditor HTML Autocorrection Issue

匿名 (未验证) 提交于 2019-12-03 01:13:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have few lines of HTML in my database. I want to edit the content in CKEditor. But when I open that in editor the HTML gets break down. The HTML gets rearranged. Below is the HTML which is in database: <span class="sec_title"> <h1><span>Web</span> Engineering</h1> <hr> </span> And when I open it in CKEditor the HTML looks likes below: <h1><span class="sec_title"><span>Web</span> Engineering</span></h1> <hr /> Some one please help me. I tried config.allowedContent = true; but it is also not stopping the CKEditor to do the modifications. 回答1

Adding custom styles to CKEditor

匿名 (未验证) 提交于 2019-12-03 01:12:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I recently added CKEditor to my app and I would like to include my own CSS stylesheets within the editor so that I can select them within the editor. How do I accomplish this? My code so far looks like this: 回答1: Please look at @metavida answer for a better answer than this Though if you're using this in more than one place it'd be best to look at putting this into the stylescombo\styles\default.js file and updating your config.js file accordingly as per api. 回答2: You can also read the full documentation of the stylesSet.add syntax: CKEditor

How can I set height in CKEditor 5 with Ionic?

匿名 (未验证) 提交于 2019-12-03 01:11:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to create a text editor using Ionic and Angular. I applied it using CKEditor 5 but the height value is not changed. According to the CKEditor 5 documentation, I can control the height value through the config attribute. I have confirmed through the config option that 'paragraphs' are translated into Korean. Is my approach wrong? Here is my source code. My source code consists of 'html', 'component.module.ts', 'component.ts'. html template <ckeditor formControlName="bbsContent" [editor]="Editor" [config]="config" style="height: 300px"