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

onChangeMethod attribute in input-editor taglib is not working when editing in 'Source' mode

    Details

      Description

      Steps to reproduce:

      1. Start master.
      2. Create a simple mvc-portlet which make use of liferay-ui:input-editor taglib and specify some function to onChangeMethod. I mean, something like this in your view.jsp:

      <%@ include file="/init.jsp" %>
      
      <p>
      	<b><liferay-ui:message key="mymvc.caption"/></b>
      
      	<h1>PTR-2272</h1>
      	<liferay-ui:input-editor 
      		editorName="ckeditor" 
      		name="PTR2272Editor"
      		onChangeMethod="onChangeEditor"
      	/>
      </p>
      
      <aui:script>
      	function <portlet:namespace />onChangeEditor(html) {
      		console.log("On change editor has been called.");
      	}
      </aui:script>
      

      You can use the project attached in file my-mvc-portlet-project_LPS127948, which already includes the .jar module inside build/lib folder.
      3. Deploy the generated jar module on the Portal.
      4. Deploy this new portlet in your home page
      5. Open browser console.
      6. Start typing in the editor. Assert there is a message "On change editor has been called" every time you type something.
      7. Move to "Source" view and keep typing.

      Actual behavior:
      You stop seeing messages in browser console.

      Expected behavior:
      You keep seeing the same kind of messages.

      Additional Information
      This issue is due to use CodeMirror to edit code in 'source' mode, because CodeMirror is not auto-syncing its content with CKEditor as it used to do our older plugin, Sourcearea.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              summer.zhang Summer Zhang
              Reporter:
              peter.petrekanics Peter Petrekanics
              Participants of an Issue:
              Recent user:
              Clarissa Velazquez
              Engineering Assignee:
              Julien Castelain
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                28 weeks, 2 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP100
                  7.0.X
                  7.1.10 DXP FP23
                  7.1.10.6 SP6
                  7.1.X
                  7.2.10 DXP FP13
                  7.2.X
                  7.3.7 CE GA8
                  7.3.10 DXP FP2
                  7.3.X
                  7.4.0 CE GA1 DXP 7,4
                  Master