ckeditor

FCKEditor与rails的集成

ぐ巨炮叔叔 提交于 2019-11-28 02:16:04
1.下载 fckeditor_plugin-0.3.2.zip ,目前版本为0.3.2 2.解压到vendor\plugins目录下,并且重新命名为fckeditor 3.到该应用程序根目录下,然后运行rake fckeditor:install,则执行自动安装 4.在自己的view层中添加 <%= javascript_include_tag :fckeditor %> 以及在你需要编辑的字段textarea替换为 <%= fckeditor_textarea("book", "desc", { :toolbarKit => 'Simple', :width => '100%', :height => '200px' }) %> 第一个参数为你的domain对象,desc为你的编辑字段值,其他顾名思义 然后运行你的页面程序,发现simple upload有点bug,上传后javascript报错 5.追踪代码发现 vendor\plugins\fckeditor\app\controllers\fckeditor_controller.rb下的 def upload self.upload_file end 调用了upload_file方法 def upload_file @new_file = params[:NewFile] @url = upload_directory

Angular, ng-ckeditor, and the editor-destroy-iframe bug

感情迁移 提交于 2019-11-28 01:34:32
问题 This posting is regards ng2-ckeditor@1.1.13 loaded with ckeditor@4.8.0. Although there are a couple of articles on SO with this question I believe this is still an open question. Please do not mark this posting as a duplicate. To replicate problem: 1) instantiate a DOM element with the ckeditor directive. 2) navigate away from the view in such a way that the Angular Component that is hosting the ckeditor is destroyed. You get this in the Javascript console: ckeditor.js:19 [CKEDITOR] Error

Use “pastefromword” Filtering on All Pasted Content in CKEditor 3

自作多情 提交于 2019-11-28 00:45:06
问题 CKEditor is a great editor and the pastefromword plugin is very good. I'd like to have the filtering provided by the plugin applied to all pasted text. For example, when pasting from word, all fonts and sizes are stripped. This does not happen when pasting from an email. That said, I came up with the following solution and posting it here to get some feedback. I'm wondering if I made it too complicated, or if there is an easier way. I kind of just copied the code from pastefromword/plugin.js.

Use Javascript variable in object name? [duplicate]

為{幸葍}努か 提交于 2019-11-28 00:31:28
This question already has an answer here: Dynamically access object property using variable 11 answers I am using CKEditor, and, when referring to the CKEditor instance, I need to use a variable. But, since calling the instance is a object, I am really not sure how to do this. I am using: CKEDITOR.instances.textarea123.insertHtml('<p>Whatever</p>'); The issue is, I need 123 to be a variable, because I need to change the instance based on the editor page that is loaded. So, how can I use a variable in an object name? For obvious reasons the following does not work, but I need to achieve what it

How to set the height of CKEditor 5 (Classic Editor)

元气小坏坏 提交于 2019-11-27 23:27:43
In CKEditor 4 to change the editor height there was a configuration option: config.height . How do I change the height of CKEditor 5? (the Classic Editor) Wiktor Walc Answering my own question as it might help others. CKEditor 5 no longer comes with a configuration setting to change its height. The height can be easily controlled with CSS. There is one tricky thing though, if you use the Classic Editor : <div id="editor1"></div> ClassicEditor .create( document.querySelector( '#editor1' ) ) .then( editor => { // console.log( editor ); } ) .catch( error => { console.error( error ); } ); Then the

xadmin引入django-ckeditor富文本编辑器

独自空忆成欢 提交于 2019-11-27 21:59:30
一、安装: pip install django-ckeditor 安装django-ckeditor库 https://github.com/django-ckeditor/django-ckeditor GitHub主页 这个库上传图片是依赖pillow的 由于之前已经安装了pillow 所以不用再 pip install pillow 了 二、配置文件demo/settings.py: import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'db@02^k!pw$6kx*0$+9#%2h@vro-*h^

转:dedecms自带ckeditor编辑添加行间距按钮

你离开我真会死。 提交于 2019-11-27 21:17:00
1.下载ckeditor的行距插件包( https://files-cdn.cnblogs.com/files/fudanchencds/ckeditor-lineheight.zip ); 2.解压到ckeditor/plugins目录下; 3.在/include/ckeditor/plugins/dedepage文件夹下,打开plugin.js文件在最后面添加:requires : [ 'lineheight' ],添加完之后的代码如下: 1 // Register a plugin named "dedepage". 2 (function() 3 { 4 CKEDITOR.plugins.add( 'dedepage', 5 { 6 init : function( editor ) 7 { 8 // Register the command. 9 editor.addCommand( 'dedepage',{ 10 exec : function( editor ) 11 { 12 // Create the element that represents a print break. 13 // alert('dedepageCmd!'); 14 editor.insertHtml("#p#副标题#e#"); 15 } 16 }); 17 // alert(

CKEditor, initialize widget added with insertElement

孤者浪人 提交于 2019-11-27 18:01:06
问题 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

How can i get content of CKEditor using JQuery?

纵饮孤独 提交于 2019-11-27 17:48:46
I'm using CKEditor. I am saving the form values with ajax using page methods. But the content of CKEditor value cannot be saving into the table. I dont postback the page. What can i do for that? First of all you should include ckeditor and jquery connector script in your page, then create a textarea <textarea name="content" class="editor" id="ms_editor"></textarea> attach ckeditor to the text area, in my project I use something like this: $('textarea.editor').ckeditor(function() { }, { toolbar : [ ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'], ['Undo',

CKEDITOR, Image Upload (filebrowserUploadUrl)

余生长醉 提交于 2019-11-27 17:31:25
I'm using CKEDITOR and would like to be able to allow users to upload and embed images in the Text Editor... The following JS is what loads the CKEDITOR: CKEDITOR.replace( 'meeting_notes', { startupFocus : true, toolbar : [ ['ajaxsave'], ['Bold', 'Italic', 'Underline', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ], ['Cut','Copy','Paste','PasteText'], ['Undo','Redo','-','RemoveFormat'], ['TextColor','BGColor'], ['Maximize', 'Image'] ], filebrowserUploadUrl : '/notes/add/ajax/upload-inline-image/index.cfm' } ); Where I'm stuck is with filebrowserUploadUrl... What is that URL