aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/static/js
diff options
context:
space:
mode:
Diffstat (limited to 'pydis_site/static/js')
-rw-r--r--pydis_site/static/js/wiki/load_editor.js21
1 files changed, 0 insertions, 21 deletions
diff --git a/pydis_site/static/js/wiki/load_editor.js b/pydis_site/static/js/wiki/load_editor.js
index 69730b14..dfa087d9 100644
--- a/pydis_site/static/js/wiki/load_editor.js
+++ b/pydis_site/static/js/wiki/load_editor.js
@@ -17,28 +17,8 @@
title: "Insert image",
};
- const TOCAction = {
- name: "toc",
- action: insertTOC,
- className: "fa fa-stream",
- title: "Insert Table of Contents"
- };
-
let elements = document.getElementsByClassName("simple-mde");
- function insertTOC(editor) {
- let doc = editor.codemirror.getDoc(),
- cursor = doc.getCursor(),
- line = doc.getLine(cursor.line),
- position = {"line": cursor.line, "ch": 0};
-
- if (line.length === 0) {
- doc.replaceRange(TOCText, position);
- } else {
- doc.replaceRange(TOCText + "\n", position)
- }
- }
-
for (let element of elements) {
window.editors[element.id] = new SimpleMDE({
"element": element,
@@ -67,7 +47,6 @@
"bold", "italic", "strikethrough", headingAction, "|",
"code", "quote", "unordered-list", "ordered-list", "|",
"link", imageAction, "table", "horizontal-rule", "|",
- TOCAction, "|",
"preview", "side-by-side", "fullscreen", "|",
"guide"
],