From eb7b30acd6678f267d7844493e04793016b77828 Mon Sep 17 00:00:00 2001 From: Bogdanova Olga Date: Sun, 28 Mar 2021 21:04:04 +0300 Subject: [PATCH] Issues-491: handle ApplyQuoteText event --- js/topcodereditor.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/topcodereditor.js b/js/topcodereditor.js index 6ebc133..b94f6c4 100644 --- a/js/topcodereditor.js +++ b/js/topcodereditor.js @@ -610,4 +610,10 @@ MathJax.typeset(); } }); + + // Comment with quotes + $(document).on('ApplyQuoteText',function(ev, quoteText) { + var text = editor.value(); + editor.value(quoteText + '\n' + text + '\n'); + }); }(jQuery));