diff --git a/app/Domains/Vault/ManageJournals/Web/ViewHelpers/JournalShowViewHelper.php b/app/Domains/Vault/ManageJournals/Web/ViewHelpers/JournalShowViewHelper.php index 3b06cb50be5..953c5cd7712 100644 --- a/app/Domains/Vault/ManageJournals/Web/ViewHelpers/JournalShowViewHelper.php +++ b/app/Domains/Vault/ManageJournals/Web/ViewHelpers/JournalShowViewHelper.php @@ -79,7 +79,7 @@ public static function postsInYear(Journal $journal, int $year, User $user): Col ->map(fn (Post $post) => [ 'id' => $post->id, 'title' => $post->title, - 'excerpt' => $post->excerpt, + 'excerpt' => Str::of($post->excerpt)->stripTags(), 'written_at_day' => Str::upper(DateHelper::formatShortDay($post->written_at)), 'written_at_day_number' => DateHelper::formatDayNumber($post->written_at), 'photo' => optional(optional($post)->files)->first() ? [ diff --git a/app/Domains/Vault/ManageJournals/Web/ViewHelpers/PostShowViewHelper.php b/app/Domains/Vault/ManageJournals/Web/ViewHelpers/PostShowViewHelper.php index 93441d42e12..3e34e491bb3 100644 --- a/app/Domains/Vault/ManageJournals/Web/ViewHelpers/PostShowViewHelper.php +++ b/app/Domains/Vault/ManageJournals/Web/ViewHelpers/PostShowViewHelper.php @@ -123,12 +123,9 @@ private static function getSections(Post $post): Collection ->whereNotNull('content') ->get() ->map(fn (PostSection $section) => [ - 'id' => $section->id, - 'label' => $section->label, - 'content' => (string) Str::of($section->content)->markdown([ - 'html_input' => 'strip', - 'allow_unsafe_links' => false, - ]), + 'id' => $section->id, + 'label' => $section->label, + 'content' => $section->content ]); } diff --git a/package.json b/package.json index f427d8f1b3c..b3bba365c96 100644 --- a/package.json +++ b/package.json @@ -64,5 +64,8 @@ "vendor/bin/pint" ] }, - "packageManager": "yarn@4.6.0" + "packageManager": "yarn@4.6.0", + "dependencies": { + "quill": "^2.0.3" + } } diff --git a/resources/js/Components/QuillEditor.vue b/resources/js/Components/QuillEditor.vue new file mode 100644 index 00000000000..aa46daa2c1b --- /dev/null +++ b/resources/js/Components/QuillEditor.vue @@ -0,0 +1,75 @@ + + + diff --git a/resources/js/Pages/Vault/Journal/Post/Edit.vue b/resources/js/Pages/Vault/Journal/Post/Edit.vue index 6693ab458eb..2aafbbffe9a 100644 --- a/resources/js/Pages/Vault/Journal/Post/Edit.vue +++ b/resources/js/Pages/Vault/Journal/Post/Edit.vue @@ -17,6 +17,7 @@ import ContactSelector from '@/Shared/Form/ContactSelector.vue'; import JetConfirmationModal from '@/Components/Jetstream/ConfirmationModal.vue'; import JetDangerButton from '@/Components/Jetstream/DangerButton.vue'; import JetSecondaryButton from '@/Components/Jetstream/SecondaryButton.vue'; +import QuillEditor from '@/Components/QuillEditor.vue'; const props = defineProps({ layoutData: Object, @@ -318,16 +319,15 @@ const destroy = () => { :maxlength="255" @esc-key-pressed="createNoteModalShown = false" /> -
- + + :label="`${section.label}`" + :max-length="65535" + :editor-height="'200px'" + />
+ diff --git a/resources/js/Pages/Vault/Journal/Post/Show.vue b/resources/js/Pages/Vault/Journal/Post/Show.vue index d46d4fb9083..6eb1d9b81eb 100644 --- a/resources/js/Pages/Vault/Journal/Post/Show.vue +++ b/resources/js/Pages/Vault/Journal/Post/Show.vue @@ -7,6 +7,7 @@ defineProps({ layoutData: Object, data: Object, }); +