irshu355 / Android-WYSIWYG-Editor

:pager: A text editor written in Android using native components in the content tree. Integrate easily to work with web based WYSIWYG's.
http://irshulx.github.io/Android-WYSIWYG-Editor
Apache License 2.0
412 stars 116 forks source link

java.lang.NullPointerException: Attempt to invoke virtual method 'android.text.Editable com.github.irshulx.Components.CustomEditText.getText()' on a null object reference #49

Open diwesh87 opened 6 years ago

diwesh87 commented 6 years ago

Gives me this error when I have multiple lines of text and then I put the cursor in the very beginning and presses the back button. The app finally crashes.

Also when I paste an English or a Korean text, it does not paste it correctly. With English text paste I get some text missing while in case of Korean text, I get multiple same text.

java.lang.NullPointerException: Attempt to invoke virtual method 'android.text.Editable com.github.irshulx.Components.CustomEditText.getText()' on a null object reference
        at com.github.irshulx.EditorCore.onKey(EditorCore.java:604)
        at com.github.irshulx.Editor.onKey(Editor.java:304)
        at com.github.irshulx.Components.InputExtensions$1.onKey(InputExtensions.java:176)
diwesh87 commented 6 years ago

This removes the crash but with the cursor in the beginning position hitting the delete button deletes the entire text on that line