From 9c2389af886947e7ec90df2dddc79dc1c0ffb629 Mon Sep 17 00:00:00 2001 From: Carter Date: Tue, 14 Nov 2023 21:05:11 -0500 Subject: [PATCH 1/3] Add spoiler tag functionality to CodeMirror --- lib/helpers/codemirror.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/helpers/codemirror.ts b/lib/helpers/codemirror.ts index 67b56b9e4..04e7528ea 100644 --- a/lib/helpers/codemirror.ts +++ b/lib/helpers/codemirror.ts @@ -23,7 +23,9 @@ const toggleCodeBlock: Command = ({ state, dispatch }) => { } const toggleSpoiler: Command = ({ state, dispatch }) => { - return toggleAround(state, dispatch, '||', '||') + // Insert details tag with a summary tag at the start + const detailsTags = ['\n
\nSpoiler\n\n', '\n\n
\n\n'] + return toggleAround(state, dispatch, detailsTags[0], detailsTags[1]) } const toggleHeader: Command = ({ state, dispatch }) => { From cc7b5032df3368c94c36afb963ce3a59a5a27ec4 Mon Sep 17 00:00:00 2001 From: Carter Date: Tue, 14 Nov 2023 21:05:16 -0500 Subject: [PATCH 2/3] Refactor image insertion logic in MarkdownEditor.vue --- lib/components/base/MarkdownEditor.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/components/base/MarkdownEditor.vue b/lib/components/base/MarkdownEditor.vue index 94a9d14bc..12036a40f 100644 --- a/lib/components/base/MarkdownEditor.vue +++ b/lib/components/base/MarkdownEditor.vue @@ -135,7 +135,7 @@