ckeditor

How can I use CKEditor, starting with HTML mode in stead of TEXT mode?

给你一囗甜甜゛ 提交于 2019-12-10 10:46:18
问题 How can I use CKEditor, starting with HTML mode in stead of TEXT mode? I want to use this source in HTML Mode, but normally it inits in TEXT Mode... Please let me know how to change or make it!! 回答1: Set the Startup Mode of CKEDITOR to start in Source (HTML) Mode. CKEDITOR.config.startupMode Refer this link for more details. 来源: https://stackoverflow.com/questions/8179692/how-can-i-use-ckeditor-starting-with-html-mode-in-stead-of-text-mode

Ckeditor shows extra space at the beginning and end of the p tags

你。 提交于 2019-12-10 10:08:39
问题 I am using ckeditor for my small web project, but when I edit a content or create a new content, it automatically add white space after the opening of p tag and the text, when I remove the space and save the content it works but when I edit again, it add the space again, how do I remove it. I think the space between opening of p tag and the text should not matter, but it shows spaces while I retrieve those content from database and it mess up with my design. How do I solve this? Here is the

Remove htmlPreview in CKEditor's image plugin

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 05:03:54
问题 I have a problem with hiding preview element in CKEditor's image plugin. I need a very simple image dialog box with only input field for image source and form with button for image uploading. So I removed unnecessary elements using these custom configuration settings: CKEDITOR.on( 'dialogDefinition', function( ev ) { var dialogName = ev.data.name; var dialogDefinition = ev.data.definition; if ( dialogName == 'image' ){ dialogDefinition.removeContents( 'advanced' ); dialogDefinition

CKEditor - No toolbars

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 02:56:25
问题 So I got a textarea with CKEditor plugin but I just want it clean, without anything. No toolbars and no status or whatever bar. It´s simple but I can´t find it on docs or web! My CKEditor is started with: $('#texto').ckeditor({skin:'office2003'}); 回答1: You can edit the config.js file in the directory where you put the source files to specify custom toolbars. CKEDITOR.editorConfig = function( config ) { config.toolbar = 'Custom'; //makes all editors use this toolbar config.toolbar_Custom = [];

How to prevent ckeditor to not add   in blank html tag

夙愿已清 提交于 2019-12-10 02:47:01
问题 I have Visual Studio 2012 Express installed in Windows 8.1 OS and using CKEditor in my project as per requirement. I am new for CKEditor and using it in a proper way as well but the problem is by defining the html in source in CKEditor it replaces automatically <div><i class="classname"></i></div> with <div> </div> or <div></div> So How to prevent CKEditor not to replace it and save as it is? I have got some solution but still little bit error I am replacing <i class="classname"></i> with

Is there a way to override CKEditor's config file for each instance of the editor?

六眼飞鱼酱① 提交于 2019-12-10 02:41:53
问题 I have a global size and height set CKEDITOR.editorConfig = function( config ) { config.height = '400px'; config.width = '600px'; ... And I would like to change this height and width for only one instance of the editor on a seperate page. Has anyone else accomplished this? 回答1: Yes. When you create the editor on the page, you can override CKEDITOR.replace(editorName, { height: 448, width: 448, customConfig: '/path/to/yourconfig.js' }); In fact as a performance recommendation you can put all

Selenium and ckEditor

喜欢而已 提交于 2019-12-10 00:58:56
问题 Does anybody know How I can get the ckEdtior to work with Selenium. I'm not able to get the focus to the "html edit" field or change the value of the html field. Does anybody has experience with this ? 回答1: Just for completing the anwser: I got it to work with: runScript("CKEDITOR.instances['InstanceName'].setData('<p>testContent</p>');") It did not work with the getEval command. 回答2: When I have had a to test against WYSIWYG editors I have had to build my own mechanism to work in the content

How to check CK editor version

这一生的挚爱 提交于 2019-12-10 00:36:02
问题 There is an existing CK editor folder in my project. How can I find out it's version? Is it documented? 回答1: just make an alert as below in the config.js file, it gives the value alert(CKEDITOR.version); or you can see it directly in the file ckeditor_php4.php, for eg: var $version = '3.6.3'; working demo : alert(CKEDITOR.version); console.log("CKEDITOR.version ==",CKEDITOR.version); <head> <meta charset="utf-8"> <title>CKEditor</title> <script src="https://cdn.ckeditor.com/4.11.4/standard

How to apply multiple styles to one element in ckeditor?

自作多情 提交于 2019-12-09 20:16:45
问题 I want to integrate some bootstrap classes to my ckeditor profile: { name : 'Button Large' , element : 'a', attributes : { 'class' : 'btn-lg' } }, { name : 'Button Primary' , element : 'a', attributes : { 'class' : 'btn-primary' } }, but the problem is those styles cant be combined. If I want a button which is btn-primary AND btn-lg I would have to create a third style: { name : 'Button Large Primary' , element : 'a', attributes : { 'class' : 'btn-lg btn-primary' } }, which obviously is quite

Using CKEditor instead of PrimeFaces Editor

寵の児 提交于 2019-12-09 18:01:03
问题 I am trying to use CKEditor in my JSF application. How to get the content of CKEditor into backing bean..? index.xhtml <form action="" method="post"> <p> My Editor:<br /> <textarea cols="90" rows="20" id="editor1" name="editor1" value="#{EditorBean.value}"></textarea> <script type="text/javascript"> CKEDITOR.replace( 'editor1', { uiColor: '#85B5D9' }); </script> <input type="button" value="Clear" name="clear" onclick="clear1()"/> </p> </form> BackingBean @ManagedBean public class EditorBean {