From 7f6c4f623697c7838013c6d66c3cf5b8f1e48ca8 Mon Sep 17 00:00:00 2001 From: thomas girod Date: Mon, 8 Jul 2024 17:04:18 +0200 Subject: [PATCH] change sup and sub in mde editor --- core/templates/core/markdown_textarea.jinja | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/templates/core/markdown_textarea.jinja b/core/templates/core/markdown_textarea.jinja index 5d769011..c33a45a0 100644 --- a/core/templates/core/markdown_textarea.jinja +++ b/core/templates/core/markdown_textarea.jinja @@ -74,7 +74,7 @@ name: "superscript", action: function customFunction(editor){ let cm = editor.codemirror; - cm.replaceSelection('' + cm.getSelection() + ''); + cm.replaceSelection('^' + cm.getSelection() + '^'); }, className: "fa fa-superscript", title: "{{ translations.superscript }}" @@ -83,7 +83,7 @@ name: "subscript", action: function customFunction(editor){ let cm = editor.codemirror; - cm.replaceSelection('' + cm.getSelection() + ''); + cm.replaceSelection('~' + cm.getSelection() + '~'); }, className: "fa fa-subscript", title: "{{ translations.subscript }}"