From 2fb885175ace8096797c1aa497bd712c3534e314 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Sun, 9 Aug 2020 23:25:43 -0400 Subject: [PATCH] update: forum/components/TextEditor --- js/src/forum/components/TextEditor.js | 36 +++++++++++---------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/js/src/forum/components/TextEditor.js b/js/src/forum/components/TextEditor.js index 3d952bd3a..6b5b9699a 100644 --- a/js/src/forum/components/TextEditor.js +++ b/js/src/forum/components/TextEditor.js @@ -30,11 +30,23 @@ export default class TextEditor extends Component { } view() { + const configTextArea = () => { + const handler = () => { + this.onsubmit(); + m.redraw(); + }; + + $(element).bind('keydown', 'meta+return', handler); + $(element).bind('keydown', 'ctrl+return', handler); + + this.attrs.composer.editor = new SuperTextarea(element); + }; + return (