GithubHelp home page GithubHelp logo

Comments (6)

tneotia avatar tneotia commented on August 31, 2024 1

I had another thought about this - if you want to display the output in WYSIWYG format with Flutter widgets, I recommend you use flutter_html like this:

initialize editor:

HtmlEditorController controller = HtmlEditorController();

HtmlEditor(
   controller: controller
)

get text:

String? txt = await controller.getText();
setState(() {
   htmlString = txt;
});

widget:

Html(data: htmlString ?? "No data!")

I don't want to add this as an option in the package because it is quite a heavy dependency, but the option is there if you want to use it.

from html-editor-enhanced.

tneotia avatar tneotia commented on August 31, 2024 1

Yep I found the issue and it is fixed on master. the stream.drain() line in the getText() code was causing the issue, it did the same thing for mobile height detection. Thanks for the report!

from html-editor-enhanced.

tneotia avatar tneotia commented on August 31, 2024

Check the example app, it works on Flutter Web. TLDR:

initialize editor:

HtmlEditorController controller = HtmlEditorController();

HtmlEditor(
   controller: controller
)

get text:

String? txt = await controller.getText();
setState(() {
   textToDisplay = txt;
});

widget:

Text(textToDisplay)

Let me know if you have any issues with this.

from html-editor-enhanced.

Sammy-iiitb avatar Sammy-iiitb commented on August 31, 2024

String? txt = await controller.getText();
setState(() {
htmlString = txt;
});

submit button it's not able to set the state in the latest version on web, can you check

from html-editor-enhanced.

tneotia avatar tneotia commented on August 31, 2024

Do you get any errors in the console?

from html-editor-enhanced.

Sammy-iiitb avatar Sammy-iiitb commented on August 31, 2024

there are no errors on the console, the state is not set, when I am trying to print the txt, the console is just stuck there, no response in the console.

from html-editor-enhanced.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.