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: 3494
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
Always Bet On Prime (+ Extensions)!

Thomas Andraschko
PrimeFaces Developer | PrimeFaces Extensions Founder
Apache OpenWebBeans PMC | Apache DeltaSpike PMC | Apache MyFaces PMC

Personal Blog: http://tandraschko.blogspot.de/

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: 1
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' ] }
];

}

User avatar
Melloware
Posts: 765
Joined: 22 Apr 2013, 15:48

03 Nov 2018, 14:31

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

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest