Tri*_*rip 9 javascript jquery ckeditor
我有全局尺寸和高度设置
CKEDITOR.editorConfig = function( config )
{
config.height = '400px';
config.width = '600px';
...
Run Code Online (Sandbox Code Playgroud)
我想在单独的页面上仅为编辑器的一个实例更改此高度和宽度.有没有其他人完成这个?
dov*_*ove 14
是.在页面上创建编辑器时,您可以覆盖
CKEDITOR.replace(editorName, {
height: 448,
width: 448,
customConfig: '/path/to/yourconfig.js'
});
Run Code Online (Sandbox Code Playgroud)
实际上,作为性能建议,您可以在此处放置所有配置选项,并单独保存配置文件的加载.您可以在自己的共享JavaScript文件中执行此操作,参数化以覆盖页面的特定值.
更新以回应评论
可以像使用任何其他设置一样使用单独的配置文件(使用customConfig查看上面的内容.如果您不希望任何自定义配置加载使用
customConfig: ''
Run Code Online (Sandbox Code Playgroud)