Jahia DX > Modify the RichTextEditor

0 (0 Good)
0 (0 Bad)

Modify the RichTextEditor

by  rvt »  2011/06/07 18:06

hello!

Is there a recommended mwthod to modify the Rich Text Editor (ckeditor)?

I need to have within the dropdowns a method to add tags with classes, and I need to have some of them removed. I am also looking for a way to remove buttons, for example the image button under specific situations.

I have been searching through /modules/assets/javascript/ckeditor and the CND files, but so far I didn't find a way to modify the editor.

any hints/tips for me?

Ries
  • Modify the RichTextEditor
    2011/06/07 18:06

    rvt hello!<br/><br/>Is there a recommended mwthod to modify the Rich Text Editor (ckeditor)?<br/><br/>I need to have within the dropdowns a method to add tags with classes, and I need to have some of them removed. I am also looking for a way to remove buttons, for example the image button under specific situations.<br/><br/>I have been searching through /modules/assets/javascript/ckeditor and the CND files, but so far I didn't find a way to modify the editor.<br/><br/>any hints/tips for me?<br/><br/>Ries

  • Number of messages  185
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Modify the RichTextEditor

    by  shuber »  2011/06/07 18:06

    Hello Ries,

    Which text editor are you talking about ? The one in edit or contribute mode ? The one is edit mode is included through GWT, so it would probably require some forking of the code, although I haven't checked if we have configuration files for it. You might want to check the applicationcontext-*.xml files for possibilities there.

    Regards,
    Serge Huber.

    ps : Just a quick note, such advanced modifications will not be supported by our normal support contracts smiley

    Serge Huber (shuber)

    Number of messages  271
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re: Modify the RichTextEditor

    by  oliviervit »  2011/06/07 18:06

    Serge,

    CKEditor customisation is a pretty common feature in the world of self service CMS/Wiki (see Drupal, Mindtouch, ...)

    And CKEditor allows a lot of stuff
    http://docs.cksource.com/CKEditor_3.x/D ... igurations

    Wouldn't it be possible to have some freedom while preserving your required settings ?
  • Re: Modify the RichTextEditor
    2011/06/07 18:06

    oliviervit Serge,<br/><br/>CKEditor customisation is a pretty common feature in the world of self service CMS/Wiki (see Drupal, Mindtouch, ...)<br/><br/>And CKEditor allows a lot of stuff<br/><!-- m --><a class="postlink" href="http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Setting_Configurations">http://docs.cksource.com/CKEditor_3.x/D ... igurations</a><!-- m --><br/><br/>Wouldn't it be possible to have some freedom while preserving your required settings ?

  • Number of messages  2
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Modify the RichTextEditor

    by  shuber »  2011/06/07 18:06

    Hello Olivier,

    You are right, I was assuming Ries was trying to replace CKEditor with something else. I have checked the code and we do use a config.js file to configure it, so that's fine to modify.

    Regards,
    Serge Huber.

    Serge Huber (shuber)

    Number of messages  271
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re: Modify the RichTextEditor

    by  oliviervit »  2011/06/07 18:06

    Thanks Serge for giving a second look at this question

    I just noticed there is now an integration of CKEditor for Java
    http://docs.cksource.com/CKEditor_3.x/D ... ntegration

    It looks like it could be even simpler and cleaner to customize it this way.

    Is it the way the editor is integrated today ?

    Regards,

    Olivier
  • Re: Modify the RichTextEditor
    2011/06/07 18:06

    oliviervit Thanks Serge for giving a second look at this question<br/><br/>I just noticed there is now an integration of CKEditor for Java<br/><!-- m --><a class="postlink" href="http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Java/Integration">http://docs.cksource.com/CKEditor_3.x/D ... ntegration</a><!-- m --><br/><br/>It looks like it could be even simpler and cleaner to customize it this way.<br/><br/>Is it the way the editor is integrated today ?<br/><br/>Regards,<br/><br/>Olivier

  • Number of messages  2
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Modify the RichTextEditor

    by  rvt »  2011/06/07 18:06

    Serge,

    sorry for the late response...

    I indeed want to modify it's functions, not replace it with something else.

    For example when I look at the current editor I see under the dropdown styles 'marker Green' and 'Marker Yellow' and others, these are nice demo features, but totally not usefull for contributors and/or editors because the would properly not work with any style guide given with the template, the decision to use or not to use 'Marker Green' shouldn't be left to the editor/contributor but to a implementor that knows if a specific style is allowed or not.

    But also, the styleguide might provide styles that should be added to the styles dropdown and therefor new styles should beable to get added, this will prevent contributors/editors that frequently don't know anything about HTML/CSS to use the source button to add specific styles to text.

    Obviously I would beable to hack the editor in Jahia, but this would be horrible to upgrade when new versions of Jahia are deployed.

    So, some method to modify the Rich Text Editor on a page level, or even preferred per content type would be a highly appreciated feature.

    Ries
  • Re: Modify the RichTextEditor
    2011/06/07 18:06

    rvt Serge,<br/><br/>sorry for the late response...<br/><br/>I indeed want to modify it's functions, not replace it with something else.<br/><br/>For example when I look at the current editor I see under the dropdown styles 'marker Green' and 'Marker Yellow' and others, these are nice demo features, but totally not usefull for contributors and/or editors because the would properly not work with any style guide given with the template, the decision to use or not to use 'Marker Green' shouldn't be left to the editor/contributor but to a implementor that knows if a specific style is allowed or not.<br/><br/>But also, the styleguide might provide styles that should be added to the styles dropdown and therefor new styles should beable to get added, this will prevent contributors/editors that frequently don't know anything about HTML/CSS to use the source button to add specific styles to text.<br/><br/>Obviously I would beable to hack the editor in Jahia, but this would be horrible to upgrade when new versions of Jahia are deployed.<br/><br/>So, some method to modify the Rich Text Editor on a page level, or even preferred per content type would be a highly appreciated feature.<br/><br/>Ries

  • Number of messages  185
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Modify the RichTextEditor

    by  shuber »  2011/06/07 18:06

    Hello Ries,

    I think this is a nice suggestion, might I suggest you open an issue for an improvement in our Issue Tracker ?

    Regards,
    Serge Huber.

    Serge Huber (shuber)

    Number of messages  271
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re: Modify the RichTextEditor

    by  rvt »  2011/06/07 18:06

    Serge,

    I added the issue here : http://jira.jahia.org/browse/JAHIA-5299

    If you have any specific questions or when I was not clear somewhere, please don't hesitate and ask and I will further explain and/or clarify.

    Ries
  • Re: Modify the RichTextEditor
    2011/06/07 18:06

    rvt Serge,<br/><br/>I added the issue here : <!-- m --><a class="postlink" href="http://jira.jahia.org/browse/JAHIA-5299">http://jira.jahia.org/browse/JAHIA-5299</a><!-- m --><br/><br/>If you have any specific questions or when I was not clear somewhere, please don't hesitate and ask and I will further explain and/or clarify.<br/><br/>Ries

  • Number of messages  185
    Registration date Jun 7, 2011
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page