bustle / mobiledoc-kit

A toolkit for building WYSIWYG editors with Mobiledoc
https://bustle.github.io/mobiledoc-kit/demo/
MIT License
1.55k stars 150 forks source link

Should an attribute change trigger `inputModeDidChange` lifecycle hook? #693

Closed YoranBrondsema closed 2 years ago

YoranBrondsema commented 5 years ago

It's a bit unclear for me what the semantics are behind "input mode". Should a change in attributes, e.g. when centering a section, trigger inputModeDidChange?

NOTE TO PERSON FIXING THIS: If so, the conditions in https://github.com/bustle/mobiledoc-kit/blob/v0.12.0-0/src/js/editor/edit-state.js#L48 must be adapted accordingly.

gpoitch commented 2 years ago

A change in attributes does trigger inputModeDidChange. The demo now utilizes this to show active toolbar button states for text alignment