Markdown toolbar inserts code blocks
What does this MR do?
Adds the ability to insert code blocks with the markdown toolbar buttons. This is done by selecting the block & then clicking the code button.
What are the relevant issue numbers?
Closes #19173 (closed)
Merge request reports
Activity
Reassigned to @iamphill
Reassigned to @jschatz1
10 10 gl.text.selectedText = (text, textarea) -> 11 11 text.substring(textarea.selectionStart, textarea.selectionEnd) 12 12 13 gl.text.insertText = (textArea, text, tag, selected, wrap) -> 13 gl.text.lineBefore = (text, textarea) -> 14 split = text.substring(0, textarea.selectionStart).trim().split('\n') 15 split[split.length - 1] 16 17 gl.text.lineAfter = (text, textarea) -> 18 text.substring(textarea.selectionEnd).trim().split('\n')[0] @iamphill Let's watch this one to make sure it is stable over time. Try it out on dev often.
mentioned in commit 9c2fbcb0
Please register or sign in to reply