Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-115570

Allow me to call updateEditableValues from my own javascript for an editable

Details

    Description

      As a developer I want to support our editors in the content editing process. Fragments are very nice, but for some usecases it would really be helpful if I could give them helper functions that update the content of an editable tag.

      In the following example, I have a little text field and a button that replaces the content of the text field with the current date. Works very well and the text "changeMe" is replaced when I click.

      BUT the change is never persisted since the edit event is never triggered. Clicking the button and clicking afterwards into the field actually triggers the event, but it would be convenient, if it I could update the content and just tell the react application to persist the change.

       

      <div class="fragment_36347">
        <div
          data-lfr-editable-id="test"
          data-lfr-editable-type="text"
          id="changeme">
         changeMe
        </div>
        <!-- This button should only be shown in Edit Mode -->
        <button id="InsertTime" onclick="getElementById('changeme').innerHTML = Date()">
            InsertTime
         </button>
      </div>
      

       

      Attachments

        Issue Links

          Activity

            People

              mateo.hermosin Mateo Hermosin
              crabel Christoph Rabel
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Packages

                  Version Package