Uploaded image for project: 'PUBLIC - Liferay Documentation'
  1. PUBLIC - Liferay Documentation
  2. LRDOCS-4026

Improvement on the documentation "Modifying an Editor's Configuration" in dev.liferay

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Fix Version/s: 7.0.x
    • Component/s: None
    • Labels:
      None

      Description

      The documentation page "Modifying an Editor's Configuration" in dev.liferay.com is not valid for CKEditor

      https://dev.liferay.com/es/develop/tutorials/-/knowledge_base/7-0/modifying-an-editors-configuration

      The sections 5 and 6 of that page about how modify a toolbar, are only valid for AlloyEditor:

      In the populateConfigJSONObject method, you need to instantiate a JSONObject that holds the current configuration of the editor. For instance, you could do something like this:

      JSONObject toolbars = jsonObject.getJSONObject("toolbars");

      This gets the editor's toolbar. Now that you've retrieved the toolbar, you can modify it. You'll do this next.

      You'll modify the editor's toolbar by adding a camera button. To complete this, extract the Add buttons out of your toolbar configuration object as a JSONArray, and then add the button to that JSONArray. The following code adds a Camera button to the editor's toolbar:

      It is necessary to modify that page and add the information about how to personalize toolbars in CKEditor or at least, add a warning saying that code is only valid for AlloyEditor.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                richard.sezov Rich Sezov
                Reporter:
                caleb.cho Caleb Cho (Inactive)
                Subject Matter Expert:
                KM Material
                Participants of an Issue:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package
                  7.0.x