tneotia / html-editor-enhanced

A Flutter package that provides a WYSIWYG editor backed by flutter_inappwebview and the Summernote library.
https://pub.dev/packages/html_editor_enhanced
MIT License
272 stars 322 forks source link

No text area shows on iOS simulator #107

Open mark8044 opened 3 years ago

mark8044 commented 3 years ago

On the iOS simulator there is no text area showing, but there is a toolbar.

On a real android device the texture does show and you can type, although it is quite laggy (release mode)

tneotia commented 3 years ago

Do you mind posting screenshots of what you see on the iOS simulator?

Also what do you mean by laggy on Android side? I have a production app using the editor and haven't experienced lag on my devices. Just trying to understand because lag on a text editor is odd, we are inserting text one letter at a time so if it is laggy then there is a major issue. Thanks!

mark8044 commented 3 years ago

in the iOS simulator its just a toolbar and no text area, there is a faint grey outlined box where the texture should be but no text area

Update:

As for android lag, the lag isn't when you type, but when swiping the single line toolbar left and right. Everything about flutter looks very native/fast but this has noticeable lag so its unpleasant and gives a very hacked feel to the app. I understand this is depending on a web view, but I have other hacked solutions using web views and they are lightening fast so this one stands out.

Screen Shot 2021-08-08 at 3 38 20 PM

mark8044 commented 3 years ago

Oddly when clicking on the add a link icon, you can type into that box

tneotia commented 3 years ago

In the flutter simulator text input into WebView is broken. On a physical iOS device it will allow you to type. You can test this by the solution here: https://github.com/tneotia/html-editor-enhanced/issues/7#issuecomment-803494941

As for the toolbar it uses fully native flutter components so I am very surprised that it is laggy for you, on my S10+ it feels very smooth. I might be able to optimize it a bit though. In the meantime, if you don't like the single line toolbar you can go with the gridview toolbar as well which won't lag (because it doesn't move, of course).

Edit: the JavaScript error can be ignored, it doesn't affect anything.

mark8044 commented 3 years ago

Ok I see, thanks for the help with this, it is appreciated!

If there is hope to fix the problem with the simulator it would be great to make that top priority, as without the simulator it makes development very very difficult.

Going to grid view does not help with the lag.

Sure there is no lag in the sense that you cannot scroll anymore so you don't see the lag. But this package is very resource intensive for some reason?

I'll explain

I actually have a modal which appears to present this text editor. This modal appears with a nice smooth drawer like effect, very similar to the modal-bottom-sheet package.

I use this type of modal all over my app and its smooth as butter. Except when opening the sheet with this editor its very very slow, choppy and laggy. Closing it is even worse.

I think the functionality offered here will be of real benefit, as there seems to be no really good editor right now, and yours could fit in very well, but with this kind of lag it will limit wide adoption in flutter IMO.

Keep up the great work, hoping the lag can be fixed as well as iOS simulator issues

Image of modal sheets

tneotia commented 3 years ago

If there is hope to fix the problem with the simulator it would be great to make that top priority, as without the simulator it makes development very very difficult.

Yes it can be fixed with the solution I linked above, you will have to use your mouse to manually click the letters on the keyboard but you cannot use the physical keyboard unfortunately.

I will definitely look into the performance issues, I have a few ideas regarding that. Thanks for the detailed info!

tranvieth2t commented 10 months ago

Hi @tneotia , as shown on iOS, is there any way to remove the "done" bar on iPhone?