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 }}"