Skip to content

Conversation

@zatteo
Copy link

@zatteo zatteo commented Jan 15, 2026

Hello @robert-virkus and thank you for the work.

setText is not working because in this commit fb99d59 the API used to load HTML has been changed from loadHtmlString to evaluateJavascript instead of loadData.

It raises errors like this one below because we send HTML string to JS handler.

Uncaught SyntaxError: Unexpected token '<'

To reproduce

Use example app (using Flutter 3.16.0 and Java 11 for me) and add in example/lib/main.dart at line 102:

PlatformTextButton(
  onPressed: () => _editorApi?.setText('New text set via setText'),
  child: const Text('Set Text'),
),

Before

Screen.Recording.2026-01-19.at.10.38.53.mov

After

Screen.Recording.2026-01-19.at.10.39.32.mov

setText is not working because in this commit Enough-Software@fb99d59 the API used to load HTML has been changed from `loadHtmlString` to `evaluateJavascript` instead of `loadData`.


It raises errors like this one because we send HTML string to JS handler :
`Uncaught SyntaxError: Unexpected token '<'`
zatteo added a commit to linagora/tmail-flutter that referenced this pull request Jan 15, 2026
@dab246
Copy link
Contributor

dab246 commented Jan 16, 2026

Is there a detailed video demonstrating how to reproduce this error?

zatteo added a commit to linagora/tmail-flutter that referenced this pull request Jan 16, 2026
- Fix Scribe replace on mobile when opened from menu bar (to be complete
this fix needs this PR Enough-Software/enough_html_editor#37)
- Ensure all mobile editor call are awaited
- Do not clear text if a selection has been restored (which mean we replace a selection)
- Avoid collapseToEnd crash
@zatteo
Copy link
Author

zatteo commented Jan 19, 2026

Is there a detailed video demonstrating how to reproduce this error?

I updated the description to add a way to reproduce and two videos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants