liferay / liferay-ckeditor

Other
8 stars 49 forks source link

It's not possible to track changes in source mode due to Codemirror plugin #153

Closed antonio-ortega closed 3 years ago

antonio-ortega commented 3 years ago

Steps to reproduce

  1. Start Liferay (master branch).
  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" %>

PTR-2272

function onChangeEditor(html) { console.log("On change editor has been called."); } ``` You can use the project attached in file [my-mvc-portlet-project_LPS127948](https://issues.liferay.com/secure/attachment/395813/my-mvc-portlet-project_LPS127948.zip), 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 (considering debounce). 7. Move to "Source" view and keep typing. **Expected behavior** You keep seeing the same kind of messages. **Actual behavior** You stop seeing messages in browser console. **Additional Information** This is happening since v4.14.1-liferay.9 where we included CodeMirror plugin to edit text in source view.