ckeditor

Liferay 6.2 adding a new ckeditor

安稳与你 提交于 2019-12-12 03:45:48
问题 I want to add a new ckeditor to my liferay because we need to limit the functionality of the one available. However, I do not want to change the original one because we migth later on need it in a different form. How can I add a new ckeditor that can be used to create a structure for webcontent articles? Do I need to create a new Theme for liferay or something like this? Info: Our liferay runs on a Jboss server EDIT: I have created a hook that overrides the html\js\editor\ckeditor\ckconfig

How to change the background color of container in CKEditor with color palette

╄→尐↘猪︶ㄣ 提交于 2019-12-12 03:43:48
问题 How to change the color of the container with inline ckeditor from the list of colors.I know we have "colorbutton" plugin to change the text color and background color of block element but I need to change the entire container color. Here is the image about my requirement 回答1: Modified the colorbutton button ckeditor plugin. Add the following conditions in renderColors() method. if(type != 'back'){ editor.applyStyle( new CKEDITOR.style( colorStyle, { color: color } ) ); }else{ editor

CKEDITOR : storing wordcount value to a variable

为君一笑 提交于 2019-12-12 03:41:25
问题 CKEDITOR: I have a form and a textarea(replaced to ckeditor) if i pass the content of the textarea how do i get the wordcount value ? i am using the wordcount plugin in ckeditor. thank you //how do i store the wordcount? CKEDITOR.replace('textarea', { extraPlugins: 'wordcount,justify' }); //how do i get the wordcount ? <?= form_input($title,set_value('title')) . "</br>"; ?> <textarea name="textarea" id="text" required></textarea> <?= form_close(); ?> //in php $text = $this->input->post(

Kcfinder Upload image issue

二次信任 提交于 2019-12-12 03:36:43
问题 My site is a Codeigniter with kcfinder and ckeditor, and my issue is when I try upload and load an image, this image upload correctly in an autocreated folder /assets/kcfinder/.thumbs/images/ , but When I select the image from server, the URL is wrong and I can not see it. How can I set the correct path? 回答1: I thing that the problem is that you need to add the base url in your image path base_url() . 'images/' . $img; 回答2: I have solved the problem. In ../assets/kcfinder/config.php I changed

CKEDITOR validation in JQuery

[亡魂溺海] 提交于 2019-12-12 03:29:13
问题 i want validate my ckeditor with jquery validation,Validation fire on submit event and give error message on that according message Web Page: Script: jQuery.validator.setDefaults({ highlight: function (element, errorClass, validClass) { if (element.type === "radio") { this.findByName(element.name).addClass(errorClass).removeClass(validClass); } else { $(element).closest('.form-group').removeClass('has-success has-feedback').addClass('has-error has-feedback'); $(element).closest('.form-group')

Finding Touched elments CKEDITOR

隐身守侯 提交于 2019-12-12 02:55:09
问题 I am looking several days now on the web, but i can't seem to find out, how i can find if the caret is touching a element. Let me explain myself a little better with this example. This is a[ ] <span>example</span> As Example we say that the caret is the tag [ ]. And now we like to know if the caret is near a span element? How can we find this? Also I need to know if the span element is before or after the caret. I'm doing this with the CKEDITOR 4.0 api.. 回答1: Try this: var range = CKEDITOR

How to blur caret in CKEditor?

痴心易碎 提交于 2019-12-12 02:48:11
问题 I am using CKEditor in inline mode. I am focusing and immediately blurring (for testing) using the following: var editor = CKEDITOR.dom.element.get( e.currentTarget.getDOMNode()); editor.getEditor().focus(); editor.getEditor().focusManager.blur(true); I want to blur the editor and focusManger.blur(true) results in the toolbar being hidden. However, the caret is still focused. For some reason, I cannot find a way to defocus and remove the caret. I have tried calling focus() on another DOM

Getting editor text without html code

大憨熊 提交于 2019-12-12 02:45:46
问题 I used CKeditor in my project. I want to record the data which is writed in the CKeditor text to database. When I use to get content from CKeditor I used CKEditor1.Text but the problem is that when I record the data it is recorded with together HTML code. For example I have writen in the Ckeditor Computer Programing and I selected this write as bold it records the write to database as <b>Computer Programing</b> . And I want to record the database same as Computer Programing and I want to show

set plugin toolbar icon using class names in CK Editor

。_饼干妹妹 提交于 2019-12-12 02:14:42
问题 How do I set plugin and/or widget toolbar button icon using class names (instead of using image URL)? 回答1: I've found a hack for this seemingly obvious missing feature: editor.ui.addButton('MyButton', { //className: '...' // this only adds the classes to the parent container, not the icon span icon: '_ fa fa-scissors _' // this hacks the existing classes and injects extra classes to the icon span }); Tested with CK Editor v4.6.2 来源: https://stackoverflow.com/questions/41620593/set-plugin

PrimeFaces extension javascript uncaught TypeError: Cannot read property '1' of null

我的梦境 提交于 2019-12-12 02:09:45
问题 I am using primefaces extensions as I need to use ckEditor. I am getting my form lockup after an initial submit, and the the drop down lists are either being displayed incorrectly (about 1mm wide!) or are not selectable. The only only new content I have introduced is primefaces extensions. I see in Chrome editor I am getting this error below. Uncaught TypeError: Cannot read property '1' of null PrimeFacesExt.getPrimeFacesExtensionsVersion PrimeFacesExt