diff --git a/assets/controllers/nostr/nostr_publish_controller.js b/assets/controllers/nostr/nostr_publish_controller.js index 8c0ee50..9ef585a 100644 --- a/assets/controllers/nostr/nostr_publish_controller.js +++ b/assets/controllers/nostr/nostr_publish_controller.js @@ -536,5 +536,11 @@ export default class extends Controller { if (this.hasStatusTarget) { this.statusTarget.innerHTML = `
${message}
`; } + // Clear status after 10 seconds + setTimeout(() => { + if (this.hasStatusTarget) { + this.statusTarget.innerHTML = ''; + } + }, 10000); } } diff --git a/assets/controllers/publishing/quill_controller.js b/assets/controllers/publishing/quill_controller.js index 1b64149..86d9c7c 100644 --- a/assets/controllers/publishing/quill_controller.js +++ b/assets/controllers/publishing/quill_controller.js @@ -51,7 +51,7 @@ export default class extends Controller { '
', '', '', - 'Insert', + '', 'Cancel', '
', ].join(''); @@ -126,6 +126,21 @@ export default class extends Controller { const options = { theme: 'snow', + formats: [ + 'bold', + 'strike', + 'italic', + 'link', + 'blockquote', + 'code-block', + 'code', + 'header', + 'list', + 'image', + 'video', + 'imageAlt', + 'formula' + ], modules: { toolbar: toolbarOptions, }, diff --git a/assets/styles/03-components/form.css b/assets/styles/03-components/form.css index 2a04fea..bf6f335 100644 --- a/assets/styles/03-components/form.css +++ b/assets/styles/03-components/form.css @@ -83,7 +83,6 @@ input:focus, textarea:focus, select:focus { #editor { margin: 0; - min-height: 300px; font-size: 120%; } diff --git a/assets/styles/05-utilities/utilities.css b/assets/styles/05-utilities/utilities.css index f410c2a..88545f1 100644 --- a/assets/styles/05-utilities/utilities.css +++ b/assets/styles/05-utilities/utilities.css @@ -37,6 +37,8 @@ .align-items-center{align-items:center!important} .align-items-start{align-items:flex-start!important} +.flex-grow{flex-grow: 1} + /* Lists */ .list-unstyled{list-style:none;padding-left:0;margin:0} diff --git a/assets/styles/editor-layout.css b/assets/styles/editor-layout.css index b1d2b91..5b1d027 100644 --- a/assets/styles/editor-layout.css +++ b/assets/styles/editor-layout.css @@ -197,9 +197,10 @@ main.editor-layout { .editor-pane--edit .ql-toolbar { flex-shrink: 0; - border-left: none; - border-right: none; - border-top: none; + position: sticky; + top: -16px; + background: white; + z-index: 100; } .editor-pane--edit .ql-container { @@ -217,7 +218,6 @@ main.editor-layout { .editor-pane--edit #editor { flex: 1; overflow-y: auto; - min-height: 300px; } /* Preview pane */ @@ -564,10 +564,6 @@ main.editor-layout { overflow: visible; } - .editor-pane { - overflow: visible; - } - .editor-sidebar { display: none !important; } diff --git a/src/Form/EditorType.php b/src/Form/EditorType.php index eca37ae..f3b3235 100644 --- a/src/Form/EditorType.php +++ b/src/Form/EditorType.php @@ -43,8 +43,9 @@ class EditorType extends AbstractType ->add('content_html', QuillType::class, [ 'required' => false, 'mapped' => false, - 'label' => 'HTML Content (Quill)', - 'attr' => ['placeholder' => 'Write content', 'class' => 'form-control editor-quill-pane'] + 'label' => false, + 'attr' => ['placeholder' => 'Write content', 'class' => 'form-control editor-quill-pane'], + 'row_attr' => ['class' => 'd-flex flex-grow'] ]) ->add('image', UrlType::class, [ 'required' => false, diff --git a/templates/editor/layout.html.twig b/templates/editor/layout.html.twig index b1bbe8f..a80c3bf 100644 --- a/templates/editor/layout.html.twig +++ b/templates/editor/layout.html.twig @@ -63,7 +63,7 @@ data-mode="edit" data-action="editor--layout#switchMode" > - Editor + Rich Text