-
1. Re: extra plugin in rich:editor
barbaraboie Sep 22, 2014 7:50 AM (in response to barbaraboie)Noone?
I also tried to work with a custom configuration file. I don't get errors, but the file isn't used:
<rich:editor value="#{advieswaarde.waarde}">
<f:validateLength maximum="4000" />
<f:facet name="config">
customConfig: '../javascript/ckeditor_customconfig.js'
</f:facet>
</rich:editor>
ckeditor_customconfig.js:
CKEDITOR.editorConfig = function( config )
{
config.toolbar = 'MyToolbar';
config.toolbar_MyToolbar =
[
{ name: 'document', items : [ 'NewPage','Preview' ] },
{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
{ name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','Scayt' ] }
];
};
This is the toolbar that I get:
I'm using Richfaces 4.5.0.Beta2
-
2. Re: extra plugin in rich:editor
michpetrov Sep 22, 2014 12:18 PM (in response to barbaraboie)Hi,
I'm guessing the file paths aren't correct, since everything else looks ok. I'll check how the path is being resolved.
-
3. Re: Re: extra plugin in rich:editor
michpetrov Sep 23, 2014 8:47 AM (in response to barbaraboie)Okay, here's how it works:
The basepath of the editor is http://server/app/org.richfaces.resources/javax.faces.resource/org.richfaces.ckeditor/, unfortunately the editor can't resolve "..", so your best option is to put your plugins into a folder named "org.richfaces.ckeditor" (under webapp/resources).
The code is ok except the name of the toolbar needs to be in the main config:
<rich:editor value="#{advieswaarde.waarde}"> <f:validateLength maximum="4000" /> <f:facet name="config"> toolbar: 'MyToolbar', customConfig: 'ckeditor_customconfig.js' </f:facet> </rich:editor>
CKEDITOR.editorConfig = function( config ) { config.toolbar_MyToolbar = [ { name: 'document', items : [ 'NewPage','Preview' ] }, { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] }, { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','Scayt' ] } ]; };
-
4. Re: Re: extra plugin in rich:editor
barbaraboie Feb 25, 2015 8:49 AM (in response to michpetrov)Sorry, forgot to answer. Your solution worked!! Thanks a lot!