Open dminkovsky opened 4 years ago
Slate does not support updating the model by mutating the editable area (as those tooltips do, which was explained in the prosemirror ticket). This is not currently possible. Sorry.
you can handle such events, add this to Editable
:
onDOMBeforeInput={event => {
if (event.inputType === "formatBold") {
event.preventDefault();
toggleMark(editor, "bold");
return true;
}
}}
Another option is a design accommodation. See screenshot under "Shiny Stuff" here. Basically, on iOS I place the tooltip further up to give space for native controls and add a dotted line to give user a clear idea where it belongs to. You can try it here: https://www.analog.cafe/write/draft
iOS displays formatting controls in a tooltip when text inside a contentEditable is selected. Some editor support this tooltip. For example: https://github.com/ProseMirror/prosemirror/issues/1037. Is this possible with Slate?
Slate: 0.5x.y Browser: Safari OS: iOS