html-editor-enhanced icon indicating copy to clipboard operation
html-editor-enhanced copied to clipboard

[QUESTION] Editor don't work after flutter build web

Open dospringer opened this issue 3 years ago • 12 comments

First, thanks for the editor, this package mean a lot for me :) My problem is, when I build the app with flutter build web or flutter build web --web-renderer html the editor is not visible.

Link to app: https://signature.volt.link/#/

dospringer avatar Mar 22 '22 15:03 dospringer

I have tried some things, and now the toolbar works, but not the other content, I will try to find a solution and then post it here

dospringer avatar Mar 22 '22 15:03 dospringer

Hi Dominik, I see these errors in web console:

image

In your deployment repo do you see this file at that path?

tneotia avatar Mar 22 '22 21:03 tneotia

The thing is, that I have first thought too, that this is the problem, but I have found the same warning in my development environment and the editor works. So I think there is another issue, to answer your question: I can't find the file summernote-lite.min.js.map in both environments, not even in other directories.

P.S. Thank you so much for your fast reply, I really know to appreciate that 🙏

dospringer avatar Mar 23 '22 11:03 dospringer

@dospringer I just checked the internal HTML code, and actually we don't even try to load summernote-lite.min.js.map. Are you using some custom HTML or an older version of the package?

tneotia avatar Mar 23 '22 21:03 tneotia

Actually I think the issue is related to the PR #233. I have merged this into master - can you point your dependency to the git master branch and see if the issue is gone?

tneotia avatar Mar 23 '22 22:03 tneotia

I use the newest version 2.4.0+1 @tneotia

dospringer avatar Mar 24 '22 20:03 dospringer

When you want to take a look at the code, you can see it at https://github.com/voltbonn/signature.volt.link

dospringer avatar Mar 24 '22 20:03 dospringer

I have tried to load the master branch with the following code in my pubspec.yaml: html_editor_enhanced: git: https://github.com/tneotia/html-editor-enhanced.git

Sadly, this has not solved the problem :/

dospringer avatar Mar 24 '22 21:03 dospringer

Just cloned the repo and ran flutter build web, then opened the build/web directory in VSCode to open index.html in browser, and all seems to work fine:

image

Are you able to reproduce the issue when running the build files locally (not hosted to a server)?

tneotia avatar Mar 24 '22 21:03 tneotia

I try it, give me a moment

dospringer avatar Mar 24 '22 21:03 dospringer

Yes it works, you are right, interesting

dospringer avatar Mar 24 '22 21:03 dospringer

When you want, I try to find the solution and then post it here for other users

dospringer avatar Mar 24 '22 21:03 dospringer