动态改变CKEditor工具栏 [英] Change CKEditor toolbar dynamically

查看:139
本文介绍了动态改变CKEditor工具栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何动态更改CKEditor工具栏(不使用预定义工具栏)?

How do you change the CKEditor toolbar dynamically (without using a pre-defined toolbar)?

CKEditor 开发人员指南仅告诉您如何在初始化期间设置工具栏。

The CKEditor Developer's Guide only tells you how to set the toolbar during initialization.

我使用CKEditor 3.6 .4。

I'm using CKEditor 3.6.4.

推荐答案

关注 mb21 的建议,我设法通过重新初始化整个编辑器加载一个新的工具栏:

Following mb21's suggestion I managed to load a new toolbar by reinitialising the whole editor:

CKEDITOR.instances.editor.destroy();
CKEDITOR.replace('editor', configWithNewToolbar);

这篇关于动态改变CKEditor工具栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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