mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-25 18:44:23 +00:00
change sup and sub in mde editor
This commit is contained in:
parent
30948f1701
commit
7f6c4f6236
@ -74,7 +74,7 @@
|
||||
name: "superscript",
|
||||
action: function customFunction(editor){
|
||||
let cm = editor.codemirror;
|
||||
cm.replaceSelection('<sup>' + cm.getSelection() + '</sup>');
|
||||
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('<sub>' + cm.getSelection() + '</sub>');
|
||||
cm.replaceSelection('~' + cm.getSelection() + '~');
|
||||
},
|
||||
className: "fa fa-subscript",
|
||||
title: "{{ translations.subscript }}"
|
||||
|
Loading…
Reference in New Issue
Block a user