diff --git a/assets/brain.js b/assets/brain.js index 4cabf21..90c88c3 100644 --- a/assets/brain.js +++ b/assets/brain.js @@ -39,6 +39,14 @@ const editorInit = () => { "width": 800, "height": 500 }); + + const descEditor = Jodit.make('#post_description', { + "enter": "P", + "theme": 'dark', + "disablePlugins": "ai-assistant,about", + "width": 800, + "height": 200 + }); } if (document.querySelector('#page_text')) { @@ -49,6 +57,14 @@ const editorInit = () => { "width": 800, "height": 500 }); + + const descEditoreditor = Jodit.make('#page_description', { + "enter": "P", + "theme": 'dark', + "disablePlugins": "ai-assistant,about", + "width": 800, + "height": 200 + }); } if (document.querySelector('#photos_text')) { @@ -59,6 +75,14 @@ const editorInit = () => { "width": 800, "height": 500 }); + + const descEditoreditor = Jodit.make('#photos_description', { + "enter": "P", + "theme": 'dark', + "disablePlugins": "ai-assistant,about", + "width": 800, + "height": 200 + }); } } diff --git a/src/Form/PageType.php b/src/Form/PageType.php index 34d0020..48e6931 100644 --- a/src/Form/PageType.php +++ b/src/Form/PageType.php @@ -15,6 +15,7 @@ class PageType extends AbstractType { $builder ->add('title') + ->add('description') ->add('text') ->add('url') ->add('published') diff --git a/src/Form/PhotosType.php b/src/Form/PhotosType.php index f377131..f72d800 100644 --- a/src/Form/PhotosType.php +++ b/src/Form/PhotosType.php @@ -27,6 +27,7 @@ class PhotosType extends AbstractType ->add('date', DateType::class) ->add('category', CategoryAutocompleteField::class) ->add('tags', TagAutocompleteField::class, ['required' => false]) + ->add('description') ->add('text') ->add('thumbnail', FileType::class, [ 'label' => 'Thumbnail', diff --git a/src/Form/PostType.php b/src/Form/PostType.php index 9a283b5..7fc9069 100644 --- a/src/Form/PostType.php +++ b/src/Form/PostType.php @@ -22,6 +22,7 @@ class PostType extends AbstractType $builder ->add('title', TextType::class) ->add('date', DateType::class) + ->add('description') ->add('text', TextareaType::class) ->add('category', CategoryAutocompleteField::class) ->add('tags', TagAutocompleteField::class, ['required' => false]) diff --git a/templates/brain/page/create.html.twig b/templates/brain/page/create.html.twig index 9b244ab..508667c 100644 --- a/templates/brain/page/create.html.twig +++ b/templates/brain/page/create.html.twig @@ -15,6 +15,9 @@