ICEfaces
  1. ICEfaces
  2. ICE-2679

Add customizable toolbar support to inputRichText

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7DR#3
    • Fix Version/s: 1.7RC1, 1.7
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      n/a

      Description

      Need to provide the api to use customizable toolbar for the inputRichText. Available toolbars are documented here:

      http://wiki.fckeditor.net/Developer%27s_Guide/Configuration/Toolbar?highlight=%28toolbar%29

      - New attribute would be called 'toolbar' and would simply be a string or params passed to the FCKEditor.

        Issue Links

          Activity

          Hide
          Adnan Durrani added a comment -

          In order to define the custom toolbar, the following snippet needs to be put inside the config.js.

          FCKConfig.ToolbarSets['custom'] = [
          ['item1'],
          ['item2'],
          ['item3', 'item4]
          ] ;

          To server the FCKeditor resources we use a zip file (fckeditor.zip). So its not straight to take above snippet as string parameter and manipulate the config.js inside the zip and serve it.

          I thought after loading the FCKeditor API, the "FCKconfig" will be available into the javascript context as a public variable, but when I tried it, I didn't find it.

          Show
          Adnan Durrani added a comment - In order to define the custom toolbar, the following snippet needs to be put inside the config.js. FCKConfig.ToolbarSets ['custom'] = [ ['item1'] , ['item2'] , ['item3', 'item4] ] ; To server the FCKeditor resources we use a zip file (fckeditor.zip). So its not straight to take above snippet as string parameter and manipulate the config.js inside the zip and serve it. I thought after loading the FCKeditor API, the "FCKconfig" will be available into the javascript context as a public variable, but when I tried it, I didn't find it.
          Hide
          Ken Fyten added a comment -

          An initial version of this is implemented by ICE-2721.

          Show
          Ken Fyten added a comment - An initial version of this is implemented by ICE-2721 .
          Hide
          Adnan Durrani added a comment -

          revision 15878

          Show
          Adnan Durrani added a comment - revision 15878
          Hide
          Adnan Durrani added a comment -

          The following new attribute added on the inputRichText component, to define the custom configuration path.
          -customConfigPath

          The configuration of the FCKEditor can be changed using the js file defined by the above path, relative to the web root.

          In order to get the custom toolbar, there are two steps are involved.

          1- Define a toolbarset into the JS file, and place it into the web app.(e.g.)

          web_application_root/js/my_config.js
          FCKConfig.ToolbarSets["MyToolbar"] = [['Bold','Italic', 'Underline'], ['Save']] ;

          2- Define the customConfigPath and the toolbar name on the inputRichText component (e.g.)
          <ice:inputRichText customConfigPath="js/my_config.js" toolbar="MyToolbar" />

          Show
          Adnan Durrani added a comment - The following new attribute added on the inputRichText component, to define the custom configuration path. -customConfigPath The configuration of the FCKEditor can be changed using the js file defined by the above path, relative to the web root. In order to get the custom toolbar, there are two steps are involved. 1- Define a toolbarset into the JS file, and place it into the web app.(e.g.) web_application_root/js/my_config.js FCKConfig.ToolbarSets ["MyToolbar"] = [ ['Bold','Italic', 'Underline'] , ['Save'] ] ; 2- Define the customConfigPath and the toolbar name on the inputRichText component (e.g.) <ice:inputRichText customConfigPath="js/my_config.js" toolbar="MyToolbar" />

            People

            • Assignee:
              Unassigned
              Reporter:
              Philip Breau
            • Votes:
              4 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: