ckeditor

How to use ckeditor in angular JS app? [duplicate]

☆樱花仙子☆ 提交于 2019-11-30 20:16:12
This question already has an answer here: how to use ckeditor in an angular js web App? 1 answer I'm an angularJS newbie and i need to use ckeditor for a textarea in my app. Before i've tried it on the angular app i've done a "html only" webpage. I've generated my ckeditor package here and added the needed tags (as below) and it works like a charm. <!DOCTYPE HTML> <html> <head> <title>CKEditor test page</title> <meta charset="utf-8"> </head> <body> <script src='./ckeditor/ckeditor.js'></script> <div> <form> <label>Text input</label> <textarea name="text" id='editor1' class="ckeditor"><

CKEditor remove inline img style

筅森魡賤 提交于 2019-11-30 18:26:46
问题 I am using a responsive image technique setting a max-width of 100% with CSS. This isn't working for any images added through CKEditor, as an inline style is added. In CSS I have added a style to override the width, which works, but height: auto doesn't, so the images is stretched. I need to find a way to stop CKEditor from adding the inline style in the first place. I am using CKEditor 4.x Thank you 回答1: Since version 4.1, CKEditor offers so called Content Transformations and already defines

how to clear ckeditor with jquery

僤鯓⒐⒋嵵緔 提交于 2019-11-30 17:47:05
How can i clear the ckeditor textarea with jquery at the click of a button/link? I have tried this : $("textarea.editor").val(''); and $("textarea.editor1").val(''); i tried with the 1 at the end because of this line when init the editor $ckeditor->editor('editor1', $nDetails); in PHP Any help would be greatly appreciated. <p>Details: <?php // Helper function for this sample file. function printNotFound( $ver ) { static $warned; if (!empty($warned)) return; echo '<p><br><strong><span class="error">Error</span>: '.$ver.' not found</strong>. ' . 'This sample assumes that '.$ver.' (not included

can't add youtube video to ckeditor when switching to bbcode

烂漫一生 提交于 2019-11-30 17:23:33
问题 I installed ckeditor and had it set by default to html output, and i managed to add youtube video by clicking flash button and putting youtube link like so: http://www.youtube.com/v/G6Na--PE9Yo now i switched to bbcode, and when i do the same thing it's not working. i even tried with a YouTube plugin but still not working. If you know how to fix it I would love to hear. i have a lead but i don't know how to to this. when ever someone putting youtube link, I want it to replace it to this

Remove CKEdit Instance

人盡茶涼 提交于 2019-11-30 17:20:29
I can't seem to destroy instances of CKEdit per the documentation. Consider the following: <input name="txt1" type="text" id="txt1" /><br /> <a href="javascript:void(0);" onclick="create()">Create</a><br /> <a href="javascript:void(0);" onclick="destroy()">Destroy</a> <script type= "text/javascript" > <!-- function create() { var hEd = CKEDITOR.instances['txt1']; if (hEd) { CKEDITOR.remove(hEd); } hEd = CKEDITOR.replace('txt1'); } function destroy(){ var hEd = CKEDITOR.instances['txt1']; if (hEd) { CKEDITOR.remove(hEd); } } --> </script> When destroy() runs, CKEDITOR.remove(hEd); is being

how to clear ckeditor with jquery

ⅰ亾dé卋堺 提交于 2019-11-30 16:45:41
问题 How can i clear the ckeditor textarea with jquery at the click of a button/link? I have tried this : $("textarea.editor").val(''); and $("textarea.editor1").val(''); i tried with the 1 at the end because of this line when init the editor $ckeditor->editor('editor1', $nDetails); in PHP Any help would be greatly appreciated. <p>Details: <?php // Helper function for this sample file. function printNotFound( $ver ) { static $warned; if (!empty($warned)) return; echo '<p><br><strong><span class=

Where the list of all toolbar button names and group names available in CKEditor 4?

此生再无相见时 提交于 2019-11-30 15:36:09
This question is similar to What toolbar buttons are available in CKEditor 4? and a reinforce of this old other one . I add here some perceptions and personal difficulties that I faced. The CKEditor documentation is good, but pulverized and "incomplete" for Javascript programmers (first-time CKEditor deployer), because "stops in the middle"... Examples: if I need removeButtons , I need also the list of valid names . if I need to customize — by source-code, changing array elements —, I need not only clues and examples as here , but a full list of valid names, syntax rules, context exceptions,

How to change an already registered dialog in CKEditor

走远了吗. 提交于 2019-11-30 15:27:38
I'm trying to write a plugin, that adds an additional tab (page) to the image dialog. I don't want to change the dialog's source itself, but enhance it with the plugin. I searched the docs and the forum for quite some time now, and I now know that I can call "addPage" on the dialogs object to add another tab. I also understand how the contents object must look like. But I failed in finding the way how to get the dialog object of an already existing dialog. I tried a var ImageDialog = new CKEDITOR.dialog( editor, 'image' ); within the plugin's init method, but that caused an JS error "R is not

How to set up CKEditor for multiple instances with different heights?

巧了我就是萌 提交于 2019-11-30 14:49:03
问题 I'd like to have multiple instances of CKEditor based on the same config settings, but with different heights. I tried setting up config with the default height, setting up the 1st instance, then overriding the height & setting up the 2nd instance: var config = { ..... height:'400' }; $('#editor1').ckeditor(config); config.height = '100'; $('#editor2').ckeditor(config); ...but I get two CKEditor instances that both have 100px height. I also tried this: CKEDITOR.replace('editor2',{ height:

CKEditor, AJAX Save

旧时模样 提交于 2019-11-30 14:18:51
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! 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 that file do something like this (adapted from the normal