You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RichText.Config.Command.namedCommandListFromKeyboardEvent calls keyboardEventToDictKey internally which sorts the keys before converting the short key to __Short__ whereas the command mapping setup code converts first and then sorts. This causes redo to not work (at least on Mac) in the examples, e.g. in https://mweiss.github.io/elm-rte-toolkit/#/examples/markdown. I have a vendored fork that changes keyboardEventToDictKey to be
keyboardEventToDictKey:String->KeyboardEvent->ListStringkeyboardEventToDictKey shortKey keyboardEvent =([ keyboardEvent.key ]|> addShiftKey keyboardEvent
|> addMetaKey keyboardEvent
|> addCtrlKey keyboardEvent
|> addAltKey keyboardEvent
)|>List.map
(\v ->if v == shortKey then
short
else
v
)|>List.sort
which fixes the problem. I'll try and make a PR later, but wanted to document it so I don't forget.
The text was updated successfully, but these errors were encountered:
RichText.Config.Command.namedCommandListFromKeyboardEvent
callskeyboardEventToDictKey
internally which sorts the keys before converting the short key to__Short__
whereas the command mapping setup code converts first and then sorts. This causes redo to not work (at least on Mac) in the examples, e.g. in https://mweiss.github.io/elm-rte-toolkit/#/examples/markdown. I have a vendored fork that changeskeyboardEventToDictKey
to bewhich fixes the problem. I'll try and make a PR later, but wanted to document it so I don't forget.
The text was updated successfully, but these errors were encountered: