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
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745580948a4634250.html
评论列表(0条)