CKEditor Custom Config Path?

Community Driven Extensions Project
Post Reply
fsrinxmail
Posts: 7
Joined: 01 Oct 2010, 17:14

20 Apr 2012, 15:00

Hi everyone,

I struggle to pass my custom CKEditor configuration to the editor via the customConfig attribute. The file is in http://[webapp]/resources/js/ckEditorConfig.js. Unfortunaltely setting

Code: Select all

customConfig="/resources/js/ckEditorConfig.js"
does not work...

Can anyone help?

Cheers,
Fabian

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

20 Apr 2012, 15:14

Hey,

we use it like this:

customConfig="#{request.contextPath}/js/config/ckeditor.js"

and it's working. Can you try to add #{request.contextPath}? Also check if the file is really available in your WAR.

Regards,
Thomas
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

fsrinxmail
Posts: 7
Joined: 01 Oct 2010, 17:14

20 Apr 2012, 16:40

Thank you for your quick reply!!
PF 2.2.1
JSF 2.0 (Mojarra 2.1)
Glassfish 3.1
FF 3.6, IE 8

kaushik.mvsp
Posts: 2
Joined: 02 Nov 2018, 22:57

02 Nov 2018, 23:01

tandraschko wrote:
20 Apr 2012, 15:14
Hey,

we use it like this:

customConfig="#{request.contextPath}/js/config/ckeditor.js"

and it's working. Can you try to add #{request.contextPath}? Also check if the file is really available in your WAR.

Regards,
Thomas
Hi ,

I downloaded resources-ckeditor-6.2.RC1 and its working . However , i want to customize with less plugins

should i do like this customConfig="/ckeditor/config.js ? will it work? its not going inside script file...
Please suggest . do i need to overrider ckeditor.js?

CKEDITOR.editorConfig = function( config )
{
alert('inside');
config.removePlugins = 'elementspath';
config.toolbar = [
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ], items: [ 'Scayt' ] },
{ name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] },
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
{ name: 'others', items: [ '-' ] },
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic','Underline', '-', 'RemoveFormat' ] },
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent' ] },
{ name: 'styles', items: [ 'Styles', 'Format', 'Font','FontSize' ] }
];

}

Melloware
Posts: 3716
Joined: 22 Apr 2013, 15:48

03 Nov 2018, 14:31

I think you just need a custom config file like @tandraschko mentioned.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests