ckeditor

Use of ckeditor “key” CKEDITOR.instances.editor.on('key', function (e){

匆匆过客 提交于 2019-12-22 10:39:42
问题 I realize there are questions about how to implement an event handler for CKEDITOR 4. I am able to use this code to get the key-down data, but I can't seem to get the data after a key-up: CKEDITOR.instances.editor.on('key', function (e){ document.getElementById("preview").innerHTML = CKEDITOR.instances.editor.getData(); }); So when I type a string like "aaa" into the text editor field, the first character is never fetched. So my div id="preview" will only show "aa". I've iterated over the e

Is there anyway to stop CKEditor 4 from filtering my anchor tag attributes?

╄→尐↘猪︶ㄣ 提交于 2019-12-22 10:27:11
问题 CKEditor 4 attribute filtering is stripping any occurrence "href" from anchor tags put into the editor. I have a plugin which creates links that contain some "custom" attributes. A link looks something like this: <a href="#" document-href="abc123">Some Link</a> The CKEditor returns the link in this form when I call getData(): <a href="#" document->Some Link</a> Is there a way to instruct CKEditor to stop filtering link attributes? Does anyone happen to know where in the source this regex is

Rails 4 ckeditor file upload

醉酒当歌 提交于 2019-12-22 10:04:09
问题 I'm using ckeditor in my rails projec and I have a problem with image uploading. I don't want everything that ckeditor have, that I wrote some simple config.js for it: CKEDITOR.editorConfig = (config) -> config.language = 'pl' config.toolbar_Pure = [ '/', { name: 'basicstyles', items: [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] }, { name: 'paragraph', items: [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','-','JustifyLeft',

CKEditor dialog select box dynamic population

允我心安 提交于 2019-12-22 09:56:58
问题 I have two select boxes in a dialog..I was wondering if i can set the contents of the second select box based on the selection of the first box..i.e if select box1 has x selected, then select box2 contents are a, b, c..if select box1 has y selected, then select box2 contents are d, e, f.. Is this possible to implement? Thanks 回答1: I'm guessing that the dialog with two select boxes you mentioned is part of a custom plugin you are creating. So my answer shows code you could use in the dialog

Fckeditor漏洞总结及其***某服务器

纵饮孤独 提交于 2019-12-22 09:41:08
1.1Fckeditor漏洞总结及其渗透某服务器 有些漏洞看起来简单,级别比较低,不如SQL注入等漏洞来的直接,但在条件合适的情况下,小漏洞发挥大作用,一直以来都想做一个Fckeditor漏洞总结,免得每次遇到目标都需要重新搜索,浪费时间。 1.1.1FCKeditor编辑器漏洞利用总结 1.判断fckeditor版本 通过/fckeditor/editor/dialog/fck_about.html和/FCKeditor/_whatsnew.html页面文件中的版本号来确定。例如访问 http://***.1**.***.***:8081/fckeditor/_whatsnew.html ,获知其版本号为2.4.3。 图1获取Fckeditor版本 2.常见的测试上传地址   Fckeditor编辑器默认会存在test.html和uploadtest.html文件,直接访问这些文件可以获取当前文件夹文件名称以及上传文件,有的版本可以直接上传任意文件类型,测试上传地址有: (1)FCKeditor/editor/filemanager/browser/default/connectors/test.html (2)FCKeditor/editor/filemanager/upload/test.html (3)FCKeditor/editor/filemanager

jquery.mentionsInput and ckEditor

馋奶兔 提交于 2019-12-22 09:04:31
问题 This is just to help the people who is looking for something like mentions in ckeditor. I modified jquery.mentionsInput to work together with ckEditor and .. It is working :) You can see this online: http://jsfiddle.net/us6qo3Lc/ (type: @ken) <head> <meta charset="utf-8"> <script src="jquery-1.11.0.min.js"></script> <script src="ckeditor.js"></script> <link href="sample.css" rel="stylesheet"> <link href='jquery.mentionsInput.css' rel='stylesheet' type='text/css'> <script src='underscore-min

HOWTO - trigger source button in ckeditor by another button which is outside the editor

时间秒杀一切 提交于 2019-12-22 08:57:43
问题 I have a textarea which is behaving like a ckeditor. In the editor there is a button to view the content as source/html. I have a input button above the textarea to preview the textarea content as html Means on click of my preview button it will trigger the ckeditor button click. Can anybody help me please..? 回答1: Shortest answer ever: editor.execCommand( 'source' ); 来源: https://stackoverflow.com/questions/18830715/howto-trigger-source-button-in-ckeditor-by-another-button-which-is-outside-the

CKEditor 3.x - Dynamically add UI elements to plugin dialog

安稳与你 提交于 2019-12-22 08:56:03
问题 I'm building a CKEditor 3.x plug-in that allows certain sections of HTML to be conditionally displayed by a separate viewer application that is tied in to our back-end systems. My CKEditor plug-in will be used to define these conditions, but I'm getting stuck on how to dynamically add UI elements to the plug-in dialog. After I select the 'AND' option in the last select UI element (see the screenshot), I want to dynamically add another 3 select UI elements, similiar to the first 3 select's. I

Installing CKEditor with npm

有些话、适合烂在心里 提交于 2019-12-22 08:16:14
问题 I am trying to install CKEditor in my project. I am using Laravel. I know I could download the files but I like making my life difficult and I decided that I want to install CKEditor as a npm dependency. As stated in their documentation here, I added the package to package.json, like this: "dependencies": { "jquery": "^1.11.1", "bootstrap-sass": "^3.0.0", "elixir-coffeeify": "^1.0.3", "laravel-elixir": "^4.0.0", "font-awesome": "^4.5.0", "ckeditor": "^4.5.7" } Now I guess I have to require it

CKEditor 4 - How to set default font?

≡放荡痞女 提交于 2019-12-22 08:05:51
问题 I use CKEditor 4 and I want to set default font. I added "font_defaultLabel" with my font choice but it doesn't work ... I found this solution on the Internet but it's a trick for me and not a true solution : CKEDITOR.on( 'instanceReady', function( ev ) { ev.editor.setData('<span style="font-family:Arial, Verdana, sans-serif;">­</span>'); }); Can someone help me? EpokK 回答1: you can use ckeditor's dataprocessor to modify (for example) paragraphs with your choice for font-size, font-family,