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