admin管理员组文章数量:1432187
I am not able to add custom config file to ckeditor in grails.
Here is my code:
function applyEditor() {
try {
CKEDITOR.replace('editor1', {
customConfig : '../ckeditor/custom_config.js',
toolbarGroups : [ {"name" : "basicstyles",
"groups" : [ "basicstyles", "cleanup" ]
}, {
"name" : "links",
"groups" : [ "links" ]
}, {
"name" : "insert",
"groups" : [ "insert" ]
}, {
"name" : "paragraph",
"groups" : [ "list", "blocks", "align" ]
},
{
"name" : "styles"
},
{
"name" : 'colors'
}, {
"name" : 'editing',
"groups" : [ 'find', 'selection', 'spellchecker' ]
}, ],
removeButtons : 'Image,Flash,Iframe'
});
} catch (e) {
// TODO: handle exception
}
}
Custom_config.js is placed under
/target/work/plugins/ckeditor-4.4.1.0/web-app/js/ckeditor/custom_config.js
Please help me out. Thanx in advance.
I am not able to add custom config file to ckeditor in grails.
Here is my code:
function applyEditor() {
try {
CKEDITOR.replace('editor1', {
customConfig : '../ckeditor/custom_config.js',
toolbarGroups : [ {"name" : "basicstyles",
"groups" : [ "basicstyles", "cleanup" ]
}, {
"name" : "links",
"groups" : [ "links" ]
}, {
"name" : "insert",
"groups" : [ "insert" ]
}, {
"name" : "paragraph",
"groups" : [ "list", "blocks", "align" ]
},
{
"name" : "styles"
},
{
"name" : 'colors'
}, {
"name" : 'editing',
"groups" : [ 'find', 'selection', 'spellchecker' ]
}, ],
removeButtons : 'Image,Flash,Iframe'
});
} catch (e) {
// TODO: handle exception
}
}
Custom_config.js is placed under
/target/work/plugins/ckeditor-4.4.1.0/web-app/js/ckeditor/custom_config.js
Please help me out. Thanx in advance.
Share Improve this question edited Jul 28, 2015 at 12:37 Murtaza Munshi 1,0854 gold badges14 silver badges40 bronze badges asked Jul 28, 2015 at 6:18 JenJen 3981 gold badge4 silver badges15 bronze badges 1- which version of Grails are you using? – zoran119 Commented Jul 28, 2015 at 6:29
1 Answer
Reset to default 3You are using in a right way. Check your code again. There must be some other problem. Add custom config to your ckeditor:
CKEDITOR.config.customConfig = '/your/path/ckeditor_config.js';
You can refer this for more details : LINK
本文标签: javascriptHow to add custom configjs in ckeditorStack Overflow
版权声明:本文标题:javascript - How to add custom config.js in ckeditor - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745580947a2664616.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论