same as last commit

master
Aevann1 2022-11-09 19:31:53 +02:00
parent 78712da50b
commit 4bced848ee
1 changed files with 6 additions and 4 deletions

View File

@ -69,10 +69,12 @@ function ToggleReplyBox(id) {
let text = getSelection().toString().trim()
if (text)
{
text = text.split('> \n> Reply')[0]
textarea.value = '> ' + text
textarea.value = textarea.value.replace(/\n/g,"\n> ").replace(/\*/g,"\\*")
if (!textarea.value.endsWith('\n')) textarea.value += '\n'
text = '> ' + text
text = text.replace(/\n/g,"\n> ").replace(/\*/g,"\\*")
text = text.replace(/\n> \n/g,"\n \n")
if (!text.endsWith('\n')) text += '\n'
text = text.split('\n> Reply')[0]
textarea.value = text
}
textarea.focus()
}