Skip to content

Commit

Permalink
Add a shortcut to all richtext editor instances to add Ctrl-Enter as …
Browse files Browse the repository at this point in the history
…a shortcut for form submission.

Fixes #136
  • Loading branch information
Arantor committed Jan 6, 2018
1 parent a9d28ef commit 555bc94
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Themes/default/partials/control_richedit.hbs
Expand Up @@ -55,6 +55,9 @@ style="width: {{editor_context.width}}; height: {{editor_context.height}};{{#if
,
toolbar: "",
{{/if}}
});
$("#{{editor_id}}").data("sceditor").addShortcut('ctrl+enter', function () {
$("#{{editor_id}}").closest("form").submit();
});
$("#{{editor_id}}").data("sceditor").createPermanentDropDown();{{#unless editor_context.rich_active}}
$("#{{editor_id}}").data("sceditor").toggleSourceMode();{{/unless}}{{#if (or context.post_error.no_message context.post_error.long_message)}}
Expand Down

0 comments on commit 555bc94

Please sign in to comment.