ckeditor

ckeditor content into textarea on change event - multiple ckeditors on form

∥☆過路亽.° 提交于 2019-11-30 07:23:06
With a lot of help I finally got the CKEditor to update the associated text area. See the post here . However, I am stumped of how to get the CKEditor to update each associated text area when there is more than 1 CKEditor on the form. Here is the jquery that I currently have. It only updates the last CKEditor associated text area on the form: for (var i in CKEDITOR.instances) { CKEDITOR.instances[i].on('change', function() { CKEDITOR.instances[i].updateElement() }); //update the relative hidden textarea. } How do I update each associated CKEditor text area when I have 5 or 10 CKEditors on the

HTML5 like placeholder

若如初见. 提交于 2019-11-30 07:05:11
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. 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

Integrating CKEditor with Rails 3.1 Asset Pipline

一笑奈何 提交于 2019-11-30 06:47:05
问题 I'm new to the Asset Pipeline, having just migrated over from Rails 3.0. I'm trying to get CKEditor into the pipeline, but all the gems for it are really unclear about how they work, and have little or no usage instructions. I would prefer to do this without using a gem, since it seems that all I have to do is drop the source files into the vendor/assets directory and then include them in application.js . I've tried that, however, when I precompile and push to production, it seems that some

沙雕程序员(二)——教你如何在vue项目中引用ckeditor的富文本编辑器

六月ゝ 毕业季﹏ 提交于 2019-11-30 06:02:44
注:首先解释一下沙雕程序员系列属于这个菜逼博主学习前端系列文章 最近我啊,可能就是单身久了,寂寞——然后我准备那vue写个博客出来,后续我会在其他文章里,写我拿boot2.1.4整合各种使用的东西,分享给大家。 言归正传!!!! 发表文章,或者评论啊啥的,就需要一个好使又强大的富文本编辑器,开始的时候我用的mavonEitor,这个编辑器,不能说他不好使,但他跟最代码官方的这个编辑器就是个弟弟!!!没有字体啊,颜色啊,这些个设置都没有,想要还得给他里边单独添加一些插件,忒麻烦了。 那最代码的富文本编辑器怎么才能在咱的vue项目里使用呢?好吧!老牛忙啊,不教大家怎么用,让我这个寂寞又帅气的菜逼,发扬一波! 1.先给你贴个地址,https://ckeditor.com/,去看看这编辑器的文档。别跟我说你不看,虽然我也没细看! 2.它目前俩个版本,4和5。这里咱们就死跟最代码,跟它用一样的,多逼逼一句,5应该是不能被商用的,想用你得买! ,你说气人不?不气,4可以zashi咋使都行! 3.这个首页啊有个4和5的概述,点击进入4的概述里边你会看到下图! 4.大哥们进了下载页,会见到四个小兄弟! 这里小弟多说一句,基本套餐,和标准套餐很调皮,没有调节文字颜色和大小。然后你就下载,也不知道他官方干啥吃的,下载俩字只漏出个刘海!好在点击不耽误下载! 5.下载完以后,文件是这个样子。 6

CKEditor 4: Uncaught TypeError: Cannot read property 'langEntries' of null

自古美人都是妖i 提交于 2019-11-30 05:45:03
问题 I'm using the Ruby gem for CK Editor (https://github.com/galetahub/ckeditor) and I'm getting this error: Uncaught TypeError: Cannot read property 'langEntries' of null Here's where it's occurring in the code: CKEDITOR.plugins.load = CKEDITOR.tools.override(CKEDITOR.plugins.load, function (a) { var d = {}; return function (b, c, e) { var i = {}, g = function (b) { a.call(this, b, function (a) { CKEDITOR.tools.extend(i, a); var b = [], l; for (l in a) { var s = a[l], q = s && s.requires; if (!d

angularjs ckeditor directive sometimes fails to load data from a service

狂风中的少年 提交于 2019-11-30 05:04:33
I used Vojta's angularJS directive but sometimes ckeditor would fail to display the data from a service. This almost never happened on a refresh, but often happened when navigating back to the page. I was able to verify that the $render function was always calling ck.setData with the correct data, but sometimes it would not display. It appears that the $render method was sometimes called before ckeditor was ready. I was able to resolve this by adding a listener to the instanceReady event to make sure that it was called at least once after ckeditor was ready. ck.on('instanceReady', function() {

CKEditor 3.0 Height

六月ゝ 毕业季﹏ 提交于 2019-11-30 04:57:24
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' }); 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 = '0px'; config.width = '100%'; jQuery: $(document).ready(function(){ // resize the editor(s) while the

How to programmatically determine name of CKEditor instance

十年热恋 提交于 2019-11-30 04:17:39
问题 I've added a CKEditor instance programmatically to my page in the code-behind of my ASP.NET page: VB.NET: itemEditor = New CkEditor cell.Controls.Add(itemEditor) ... which works fine. I can get the HTML on the postback and do stuff with it. However, I also want to do some client-side stuff with it, specifically take a selected item out of another control, and insert it into the text by handling the onchange event. So, how can I get the name of the editor instance in the JavaScript, so that I

Modify CKEditor link dialog to add custom attribute to links

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 03:40:35
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: "urlOptions", children: [{ type: "hbox", children: [{ id: "button", type: "checkbox", label: "Button", commit:

Problems with ckeditor running on production Rails application with Heroku

别说谁变了你拦得住时间么 提交于 2019-11-30 03:17:43
I'm using the ckeditor gem in my Rails 4 application. Everything works great locally and on my staging heroku environment, but I get this errors when pushing on the production environment : GET http://myapp.herokuapp.com/assets/ckeditor/contents.css 404 (Not Found) GET http://myapp.herokuapp.com/assets/ckeditor/skins/moono/icons.png 404 (Not Found) The editor shows up well, but all icons are missing. I followed the README ( https://github.com/galetahub/ckeditor ), but I'm probably missing something. Here are my steps: 1) Gem installation, generate etc ... 2) config.autoload_paths += %W(#