update: add vertical spacing around quote bbcode

Makes it significantly easier to read the raw bbcode.
This commit is contained in:
Roardom
2025-09-27 08:18:57 +00:00
parent 074892c5d2
commit dfb9507d29
3 changed files with 11 additions and 5 deletions
@@ -109,9 +109,12 @@
x-on:click="
document.getElementById('forum_reply_form').style.display = 'block';
input = document.getElementById('bbcode-content');
input.value += '[quote={{ \htmlspecialchars('@' . $post->user->username) }}]';
if (input.value !== '') {
input.value += '\n\n';
}
input.value += '[quote={{ \htmlspecialchars('@' . $post->user->username) }}]\n';
input.value += decodeURIComponent(escape(atob('{{ base64_encode($post->content) }}')));
input.value += '[/quote]';
input.value += '\n[/quote]\n\n';
input.dispatchEvent(new Event('input'));
input.focus();
"
@@ -325,7 +325,7 @@
this.insert('\n[right]\n', '\n[/right]\n');
},
insertQuote() {
this.insert('[quote]', '[/quote]');
this.insert('\n[quote]\n', '\n[/quote]\n');
},
insertCode() {
this.insert('[code]', '[/code]');
+5 -2
View File
@@ -28,9 +28,12 @@
input = document.getElementById(
'{{ $comment->isParent() ? 'new-comment__textarea' : 'reply-comment' }}'
);
input.value += '[quote={{ $comment->anon ? 'Anonymous' : '@' . $comment->user->username }}]';
if (input.value !== '') {
input.value += '\n\n';
}
input.value += '[quote={{ $comment->anon ? 'Anonymous' : '@' . $comment->user->username }}]\n';
input.value += decodeURIComponent(escape(atob('{{ base64_encode($comment->content) }}')));
input.value += '[/quote]';
input.value += '\n[/quote]\n\n';
input.dispatchEvent(new Event('input'));
input.focus();
"