diff --git a/files/assets/js/formatting.js b/files/assets/js/formatting.js deleted file mode 100644 index 8271ae463a..0000000000 --- a/files/assets/js/formatting.js +++ /dev/null @@ -1,57 +0,0 @@ - -function makeBold(form) { - var text = document.getElementById(form); - var startIndex = text.selectionStart, - endIndex = text.selectionEnd; - var selectedText = text.value.substring(startIndex, endIndex); - - const format = '**' - - if (selectedText.includes('**')) { - text.value = selectedText.replace(/\*/g, ''); - } - else if (selectedText.length == 0) { - text.value = text.value.substring(0, startIndex) + selectedText + text.value.substring(endIndex); - } - else { - text.value = text.value.substring(0, startIndex) + format + selectedText + format + text.value.substring(endIndex); - } -} - -function makeItalics(form) { - var text = document.getElementById(form); - var startIndex = text.selectionStart, - endIndex = text.selectionEnd; - var selectedText = text.value.substring(startIndex, endIndex); - - const format = '*' - - if (selectedText.includes('*')) { - text.value = selectedText.replace(/\*/g, ''); - } - else if (selectedText.length == 0) { - text.value = text.value.substring(0, startIndex) + selectedText + text.value.substring(endIndex); - } - else { - text.value = text.value.substring(0, startIndex) + format + selectedText + format + text.value.substring(endIndex); - } -} - -function makeQuote(form) { - var text = document.getElementById(form); - var startIndex = text.selectionStart, - endIndex = text.selectionEnd; - var selectedText = text.value.substring(startIndex, endIndex); - - const format = '>' - - if (selectedText.includes('>')) { - text.value = text.value.substring(0, startIndex) + selectedText.replace(/\>/g, '') + text.value.substring(endIndex); - } - else if (selectedText.length == 0) { - text.value = text.value.substring(0, startIndex) + selectedText + text.value.substring(endIndex); - } - else { - text.value = text.value.substring(0, startIndex) + format + selectedText + text.value.substring(endIndex); - } -} \ No newline at end of file diff --git a/files/templates/comments.html b/files/templates/comments.html index ea110c5d99..ed81aafa81 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -262,13 +262,6 @@