1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Comments: Added input wysiwyg for creating/updating comments

Not supporting old content, existing HTML or updating yet.
This commit is contained in:
Dan Brown
2024-01-30 14:27:09 +00:00
parent 24e6dc4b37
commit 5c92b72fdd
8 changed files with 85 additions and 12 deletions

View File

@ -4,6 +4,8 @@
option:page-comment:comment-parent-id="{{ $comment->parent_id }}"
option:page-comment:updated-text="{{ trans('entities.comment_updated_success') }}"
option:page-comment:deleted-text="{{ trans('entities.comment_deleted_success') }}"
option:page-comment:wysiwyg-language="{{ $locale->htmlLang() }}"
option:page-comment:wysiwyg-text-direction="{{ $locale->htmlDirection() }}"
id="comment{{$comment->local_id}}"
class="comment-box">
<div class="header">

View File

@ -2,6 +2,8 @@
option:page-comments:page-id="{{ $page->id }}"
option:page-comments:created-text="{{ trans('entities.comment_created_success') }}"
option:page-comments:count-text="{{ trans('entities.comment_count') }}"
option:page-comments:wysiwyg-language="{{ $locale->htmlLang() }}"
option:page-comments:wysiwyg-text-direction="{{ $locale->htmlDirection() }}"
class="comments-list"
aria-label="{{ trans('entities.comments') }}">
@ -24,7 +26,6 @@
@if(userCan('comment-create-all'))
@include('comments.create')
@if (!$commentTree->empty())
<div refs="page-comments@addButtonContainer" class="text-right">
<button type="button"
@ -34,4 +35,11 @@
@endif
@endif
@if(userCan('comment-create-all') || $commentTree->canUpdateAny())
@push('post-app-scripts')
<script src="{{ versioned_asset('libs/tinymce/tinymce.min.js') }}" nonce="{{ $cspNonce }}"></script>
@include('form.editor-translations')
@endpush
@endif
</section>

View File

@ -68,10 +68,13 @@
</div>
@yield('bottom')
@if($cspNonce ?? false)
<script src="{{ versioned_asset('dist/app.js') }}" nonce="{{ $cspNonce }}"></script>
@endif
@yield('scripts')
@stack('post-app-scripts')
@include('layouts.parts.base-body-end')
</body>