Open mark8044 opened 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!
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:
import 'package:html_editor_enhanced/html_editor.dart';
import 'package:html_editor_enhanced/utils/options.dart';
and import 'package:html_editor_enhanced/utils/shims/dart_ui_real.dart';
and now the text area shows up on the simulatorflutter: JavaScript execution returned a result of an unsupported type
flutter: {style: , fontName: sans-serif, fontSize: 3, font: [false, false, false], miscFont: [false, false, false], color: [rgb(0, 0, 0), ], paragraph: [false, false], align: [true, false, false, false], lineHeight: normal, direction: ltr}
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.
Oddly when clicking on the add a link icon, you can type into that box
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.
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
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!
Hi @tneotia , as shown on iOS, is there any way to remove the "done" bar on iPhone?
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)