ExecCommand on div in Dart M8


As of Dart M8 the Element.document field has been removed. In a rich editor (as in Chris Buckett’s editor example) we used to do the following for changing the weight of some text to bold:

var el = query("#editme");
el.contentEditable = "true";

How do you call execCommand on a element with the contenteditable attribute set to true?


Node.document was renamed to Node.ownerDocument

Answered By – Jenny Messerly

Answer Checked By – David Goodson (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *