ckeditor

CkEditor - Uncaught TypeError: Cannot read property 'getSelection' of undefined

可紊 提交于 2020-02-25 07:05:09
问题 I am implementing the CKEditor in my app. When I am trying to instantiate CKEditor to the textarea I am getting following error Cannot read property 'getSelection' of undefined at below line of ckeditor getNative: function() { return void 0 !== this._.cache.nativeSel ? this._.cache.nativeSel : this._.cache.nativeSel = B ? this.document.$.selection : this.document.getWindow().$.getSelection() } Any help is much appreciated. 回答1: I have a list of articles. every time I clicked on any article a

tidying html with ckeditor

℡╲_俬逩灬. 提交于 2020-02-22 05:25:43
问题 Hi I've got a small problem with ckeditor, basically I need to make the editor run it's html cleanup command. Is there any way of doing this. At present it doesn't seem to run after I type some stuff into the source and then press save I would like it to tidy the html like it does in the 'normal' editor view Any ideas? Thanks Richard here is some example code <SCRIPT type=text/javascript src="http://www.johnpricephotography.co.uk/crawler.js"> /* Text and/or Image Crawler Script v1.5 (c)2009

ckeditor angularjs directive : how to upload multiple images?

梦想与她 提交于 2020-02-20 10:27:14
问题 I am using ckeditor directive just like : Updating textarea value with CKEditor content in Angular JS I want to upload multiple images by angularjs directive like this example : http://www.codeproject.com/Articles/616308/Image-upload-with-CKEditor How can i do that? 回答1: I have use Angular File Upload to do the same thing. I used it as a service not as a directive. Angular File Upload Demo 来源: https://stackoverflow.com/questions/21986869/ckeditor-angularjs-directive-how-to-upload-multiple

Configuring CK Editor plugin in Grails

你。 提交于 2020-02-08 02:46:08
问题 How do we configure the CK Editor plugin in Grails? I'd like to use a couple of add-ons and customise the skin (theme) as well. The documentation by Stefano Gualdi, which seems to be the most prominent material, isn't too helpful. Also, I did find a builder which will let us customize (http://ckeditor.com/builder), but I couldn't find anything similar for CK Editor in Grails. Also, the builder gave the impression that I customize my package according to my needs, download it, and copy it onto

How to set the size of an image within CKeditor in Ruby On Rails according to the picture model?

≡放荡痞女 提交于 2020-02-07 09:32:08
问题 This could be a duplicate question but I doubt it. I have the following situation: I have a ruby on rails apllication with two widely used gems: paperclip and ckeditor (which is working with paperclip). I want the size of the image that I upload in the Ckeditor screen to be resized depending on the type of 'post'. Right now there's not a button that can help with that in the Ckeditor or anything, though it does upload the different type of sizes I set in the picture.rb model: class Ckeditor:

CKEditor — seeing styles in editor window

巧了我就是萌 提交于 2020-02-07 06:00:47
问题 I'd like a true WYSIWYG experience from CKEditor, but it seems that since the editor operates in an iframe, there's no way to have the styes that clients apply to their items appear as they should per a site's stylsheet within the editor port. That is, for example, text given an H1 markup appear with the browser's default style, not the styles that I have in my stylesheet. Or is there a way to apply a stylesheet to the generated iframe that displays the editor instance? Searches on "CKEditor

Django添加富文本编辑器ckeditor

痴心易碎 提交于 2020-02-05 09:39:15
Django中大段文字采用的是textfield模型,但是textfield太简单,没办法设置更多的格式(加粗,颜色字体等),所以就需要使用富文本编辑器ckeditor ckeditor免费且功能强大 安装ckeditor pip install django-ckeditor 将ckeditor与ckeditor_upload加入INSTALLED_APPS中 ckeditor 不允许上传图像和其他文件,只能编辑文本 ckeditor_uploader 可以直接上传文本 INSTALLED_APPS = [ 'django.contrib.admin' , 'django.contrib.auth' , 'django.contrib.contenttypes' , 'django.contrib.sessions' , 'django.contrib.messages' , 'django.contrib.staticfiles' , 'dome' , 'ckeditor' , 'ckeditor_uploader' , ] 在settings.py文件中加入CKEDITOR_JQUERY_URL 因为django-ckeditor在ckeditor-init.js中使用了JQuery,所以必须加入指定JQuery库的路径 CKEDITOR_JQUERY_URL =

ckeditor add <iframe> tag in editor

邮差的信 提交于 2020-02-01 08:19:31
问题 I am using ckeditor in a drupal 7 site. I want to put iframe tag inside the editor. Currently what happen when we put iframe in ckeditor. <iframe src="http://www.lipsum.com/"></iframe> It convert that iframe tag with a img tag with some special attribute and URL. <img class="cke_iframe" data-cke-realelement="%3Ciframe%20src%3D%22http%3A%2F%2Fwww.lipsum.com%2F%22%20class%3D%22placeholder-tool%20helpTool-placeholder%22%20scrolling%3D%22no%22%20frameborder%3D%220%22%3E%3C%2Fiframe%3E" data-cke

Programmatically set the position of CKEditor's dialogs

和自甴很熟 提交于 2020-01-30 06:11:36
问题 I'm trying to find a way to programmatically set the position of a CKEditor dialog whenever a new one is opened up. The actual setting of the position part seems easy, but what I can't seem to figure out is how to trap the event of a new CKEditor dialog being created and shown. I'm assuming it will be something along the lines of... CKEDITOR.on('dialogCreated', function(e) { ... } ); But can't seem to actually find it in the documentation. 回答1: After spending several hours today, I was able

Programmatically set the position of CKEditor's dialogs

跟風遠走 提交于 2020-01-30 06:11:28
问题 I'm trying to find a way to programmatically set the position of a CKEditor dialog whenever a new one is opened up. The actual setting of the position part seems easy, but what I can't seem to figure out is how to trap the event of a new CKEditor dialog being created and shown. I'm assuming it will be something along the lines of... CKEDITOR.on('dialogCreated', function(e) { ... } ); But can't seem to actually find it in the documentation. 回答1: After spending several hours today, I was able