Moving Focus Outside the Editor

Release 2.15.0 and above.

When you press the Alt + , or Alt + . shortcut during editor editing to remove focus from within the editor,

if there is an Element where focus should move to before or after the editor, you can configure the selector of that Element so that focus moves to that position.

If the selector is not configured, only focus is removed from the editor.

Setting

Previous Element Setting

const synapEditorConfig = {
    ...
    'editor.removeFocus.prev.selector': '',
    ...
};

Next Element Setting

const synapEditorConfig = {
    ...
    'editor.removeFocus.next.selector': '',
    ...
};

Configuration Example

const synapEditorConfig = {
    'editor.removeFocus.prev.selector': '#titleInput',
    'editor.removeFocus.next.selector': '#saveButton',
};
<table> <thead> <tr><th><code>Alt + ,</code> shortcut</th><th><code>Alt + .</code> shortcut</th></tr> </thead> <tbody> <tr> <td>Focus moves to the configured selector, the title input box.</td> <td>Focus moves to the configured selector, the Save button.</td> </tr> <tr> <td>

Alt + , focus shift

</td> <td>

Alt + . focus shift

</td> </tr> </tbody> </table>