ckeditor

How do you define the path which CKEditor uses to search for config / language files?

风流意气都作罢 提交于 2019-11-29 09:06:15
CKEditor seems to look for its configuration files relative to the location it was loaded from, not the location of ckeditor.js. So loading CKEditor on the page http://www.example.com/articles/1 causes it to look for the language files in http://www.example.com/articles/1/lang/ The config file contains an attribute for baseHref, but it doesn't affect the editor resources themselves. How do I set the path which CKEditor uses for its own resources? AlfonsoML That behavior that you describe isn't normal, for some reason CKEditor isn't identifying properly its own folder so you should set a

HTML5 like placeholder

蓝咒 提交于 2019-11-29 08:45:05
问题 Is there a plugin or built-in functionality for CKEditor 4.x that would act like HTML5 input/textarea placeholder? Only thing I found is http://ckeditor.com/addon/placeholder, but that seems to be something a lot different. 回答1: You can use the configHelper plugin. Demo: http://alfonsoml.blogspot.com.es/2012/04/placeholder-text-in-ckeditor.html 来源: https://stackoverflow.com/questions/16558310/html5-like-placeholder

How to set default font-size on CKEditor

隐身守侯 提交于 2019-11-29 08:44:47
I am having a problem setting a default font-size for a CKEditor Instance. I have tried googling but found nothing that answers my question. I have a page which takes an input for a website. There are 3 Editor instances and I have to make the default font-size of the first instance to, say about 20 to 30px. I have tried modifying contents.css found inside CKEDITOR folder and changing the font-size there but it affects all the 3 editor instances /* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ body {

How to use CKEditor as an NPM module built with webpack or similar

徘徊边缘 提交于 2019-11-29 06:09:01
问题 How can I use CKEditor from npm with webpack? Ideally I want npm install ckeditor --save then var CK = require('ckeditor'); without any global namespace pollution. 回答1: CKEditor was published on NPM. Now you can use exactly the commands you want. Install npm install ckeditor --save-dev Inject var CK = require('ckeditor'); 回答2: The problem As far as I can tell it isn't currently possible to load CKEDITOR directly into webpack as a chunck without getting some errors, especially when starting to

CKEditor, initialize widget added with insertElement

荒凉一梦 提交于 2019-11-29 04:03:35
I have some widgets created, they on initial startup they load fine, but i add more of this type of widget to the editor through: ckeditorInstance.insertElement( CKEDITOR.dom.element.createFromHtml('<html></html>')); It inserts just fine, but the ckeditor does not recognize the element inserted as a widget, so the widget editable fields are not getting enabled like they should. Is there any way to make ckeditor do a rescan of its content to initialize any new widgets that it has not already initialized? Reinmar Data formats First of all - there's a separation for data format of a widget (how

Adding custom styles to CKEditor

扶醉桌前 提交于 2019-11-29 03:25:09
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: <script type="text/javascript"> CKEDITOR.replace( 'editor1',{ uiColor : '#9AB8F3', }); </script> Please look at @metavida answer for a better answer than this <script type="text/javascript"> CKEDITOR.replace( 'editor1',{ uiColor : '#9AB8F3', stylesSet.add('default', [ { name: 'My Custom Block', element: 'h3', styles: { color: 'Blue'} }, { name: 'My Custom inline style', element: 'q'} ]); }

ckfinder+ckeditor配置经验

谁都会走 提交于 2019-11-29 03:22:08
1,单独使用ckfinder <div> <script type="text/javascript" src="../ckfinder/ckfinder.js"></script> <script type="text/javascript"> function BrowseServer(inputId) { var finder = new CKFinder() ; finder.basePath = '../ckfinder/'; //导入CKFinder的路径 finder.selectActionFunction = SetFileField; //设置文件被选中时的函数 finder.selectActionData = inputId; //接收地址的input ID finder.popup() ; } //文件选中时执行 function SetFileField(fileUrl,data) { document.getElementById(data["selectActionData"]).value = fileUrl ; } </script> <p> <asp:TextBox ID="txtImgPath" runat="server"></asp:TextBox> <input type="button" value=" 浏 览 " onclick=

What toolbar buttons are available in CKEditor 4?

醉酒当歌 提交于 2019-11-29 02:48:56
The CKEditor docs mention item by item toolbar configuration here , but where is a list of the names of the buttons in the different groups? There is a similar question here , but the answer is for a previous version of CKEditor. Some of the button names do not work. You can check the toolbar sample in your CKEditor package. There, you've got listed all buttons and all toolbar groups (since CKEditor 4 there are two ways of setting toolbar layout) that are enabled in your CKEditor build. If you don't see a button that you remembered from CKEditor 3, check if it's available in your CKEditor

CKEditor 3.0 Height

早过忘川 提交于 2019-11-29 02:32:43
问题 Is there a way to set the height of CKEditor 3.0 to a percentage, such as 100%, such that it takes up the whole window? I am currently using absolute values, but they do not blend well with my UI :( CKEDITOR.replace('editor1',{ height: '600px' }); 回答1: After a lot of fiddling with this resizing stuff on ckeditor 4 I made up this which works perfectly perfectly for me: in config.js: // prevent flashing of resizing by setting the content panel to zero height before it is resized config.height =

Modify CKEditor link dialog to add custom attribute to links

最后都变了- 提交于 2019-11-29 00:42:18
问题 I am using CKEditor on a website and I need to be able to put a special data attributes on some of the links created through the editor. The user would indicate that they need the special attribute put on the link by checking a checkbox in the link dialog. I have managed to add a checkbox to the link dialog with the following code: CKEDITOR.on('dialogDefinition', function(ev) { if (ev.data.name == "link") { var info = dialog.getContents("info"); info.elements.push({ type: "vbox", id: