WYSIWYG in Android web browser

I am trying to offer a WYSIWYG HTML editor for my users, from within my application. This should not be fancy WYSIWYG. I just need some basic features like Bold, Italic, Underline, images, link and some basic formatting (font size, color, alignment). That should be enough.

The ideal solution is an open source library, but I could not find it. So I googled around for a web editor that runs on Android. I found Sceditor . This editor works great when I launch my Android browser (beta beta of Chrome). It LET work from my webview (see screenshot), but it’s not.

Sorry for the size!

As soon as I start the editor from the application, most of the functions stop working. The cursor jumps randomly, I can no longer edit the existing text, and more strange happens. Basically, it just doesn't work.

Question: How can I get this to work properly?

Thanks a lot!

+4
source share
2 answers

EditText is capable of displaying rich text. It's just that there is no easy way for users - or even developers - to really control this formatting. Therefore, I was going to use the library to solve this problem by suggesting a replacement RichEditText for EditText . This is still work in progress, and I really need to spend more time on it in the near future.

+8
source

Webview support API support Andoird, editable HTML.

 webSettings.setJavaScriptEnabled(true) webSettings.setDomStorageEnabled(true); webSettings.setLightTouchEnabled(true); 

to enable web page editing and then use

  webview.loadurl("javascript:....") 

for example: webView.loadUrl ("javascript: document.execCommand ('bold', false, null);"); for editing management.

you can see the WYSIWYG editing of my Android application, WYSIWYG editing YodaNote 0.4

+2
source

Source: https://habr.com/ru/post/1486288/


All Articles