CKEDITOR工具栏未完全显示 [英] CKEDITOR toolbar is not showing up fully

查看:1297
本文介绍了CKEDITOR工具栏未完全显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用CKEDITOR和Rails产生了一个奇怪的行为,我尝试过这两个gem: ckeditor gem ckeditor_rails gem 在不同的应用程序(Rails v4.2.0和Rails v4.2.1和Rails v4.2.2)

I am getting a weird behavior using CKEDITOR with Rails, I tried both of those gems : ckeditor gem and ckeditor_rails gem in different app I have (Rails v4.2.0 and with Rails v4.2.1 and Rails v4.2.2)

我有一个包含id =ck的文本

I have a text with id="ck"

<p contenteditable="true" id="ck">some dummy text</p>

我正在使用内联编辑选项

and I am using the inline editing option

$(document).ready(function(){
    CKEDITOR.disableAutoInline = true;
    CKEDITOR.inline("ck");
});

在我的Rails 4.2.1和4.2.2我注意到工具栏不显示所有的按钮,而它显示我的Rails 4.2.0的所有按钮(我的意思是完整的工具栏)

In my Rails 4.2.1 and 4.2.2 I noticed that the toolbar does not show all buttons, while it show all buttons (I mean full toolbar) for my Rails 4.2.0

所以我的假设是,在最后版本的rails可能有一些错误。 ..所以我创建了一个新的gemset和我安装Rails 4.2.0,看看它仍然可以工作,但它不!

So my hypotheses was that there are maybe some bugs within the the last versions of rails... so I created a new gemset and I installed Rails 4.2.0 to see if it will still work, but it doesn't !

我不知道有什么问题,我希望能得到一些帮助。

I am not sure what's wrong... I hope I can get some help

推荐答案

对于那些在此页面上搜索答案的人。插件需要在div元素上使用,而不是在p元素上使用;这里是与Tinymce相同的问题 Tinymce对齐文本按钮不能在线编辑

For those who land up on this page searching for an answer. The plugin needs to be used on a div element and not on a p element; here is the same issue with Tinymce Tinymce align text buttons don't work on inline editing

感谢您指点我这里bro。

thanks for pointing me to here bro.

这篇关于CKEDITOR工具栏未完全显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆