tneotia/html-editor-enhanced

Disable Copy and Paste Buttons

Zamaruu opened this issue · 1 comments

Hi, my question would be how to disable the copy and paste buttons in the editor, cause on Flutter Web they seem kind of useless and out of position.

Widget htmlEditor = HtmlEditor(
  controller: controller, //required
  //other options
  toolbarOptions: HtmlToolbarOptions(
    defaultToolbarButtons: [
        //add any other buttons here otherwise only a few buttons will show up!
        OtherButtons(copy: false, paste: false),
    ]
  )
);

See more details at https://github.com/tneotia/html-editor-enhanced#toolbar. You can also view the source to see the default button code and copy paste that with this change.

By the way in v2.2.0 those buttons are removed by default (I was trying to reduce the clutter on initial setup), if you want to upgrade your version.