Skip to content

v2.0.0 Migration Guide

Tanay Neotia edited this page Apr 21, 2021 · 1 revision

v2.0.0 Migration Guide

Here are the steps you need to perform to successfully migrate your v1.x.x widget to v2.0.0:

  1. Update the dependency and make sure you are running Flutter v2.0+, Dart v2.12+

  2. Parameters have moved around:

    • hint, initialText have moved to HtmlEditorOptions

    • height and decoration have moved to OtherOptions

    • showBottomToolbar has been removed

    • options: has been renamed to htmlEditorOptions:

    • toolbar list has moved to HtmlToolbarOptions -> defaultToolbarButtons

  3. All plugins except SummernoteAtMention have been removed, all except AdditionalTextTags and SummernoteEmoji are supported natively and enabled by default. Use defaultToolbarButtons to disable listStyles, caseConverter, otherFile, or textDirection.

  4. Toolbar constructors have been renamed:

    • Style -> StyleButtons

    • FontSetting -> FontSettingButtons

    • Font -> FontButtons

    • ColorBar -> ColorButtons

    • MiscFont has been removed (the buttons are now under FontButtons)

    • Paragraph -> ParagraphButtons

    • Insert -> InsertButtons

    • Misc -> OtherButtons

  5. Toolbar buttons are now disabled with true or false, like so: ParagraphButtons(lineHeight: false, caseConverter: false)

    • All buttons except one (otherFile) are enabled by default, it is highly recommended to disable some in your implementation to avoid overwhelming users with options.
  6. If you use the plugin on Web, you should use the flag --web-renderer=html for the time being due to Flutter #54027

If you have any further questions, feel free to file an issue!

Clone this wiki locally