From 2512744fb0f43789b08b3eda6c9afb26e103d7d3 Mon Sep 17 00:00:00 2001 From: Robert Mariano Schwindaman Date: Wed, 14 Apr 2021 15:21:39 -0600 Subject: [PATCH] Added README & Improved TinyMCE Documentation (#1) * Added README & Improved TinyMCE Documentation * Improved Default TinyMCE Configuration (MSWord formatting) * Added Publish Command to Installation Steps in README --- README.md | 9 +++++++++ config/nova-tinymce-field.php | 14 +++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..fbc5a6c --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# nova-tinymce-field +This package is a Nova WYSIWIG Field that uses TinyMCE, which has an extensive set of configuration/plugins. + +### Installation +- `composer require bythepixel/nova-tinymce-field` +- `php artisan vendor:publish --provider="Bythepixel\\NovaTinymceField\\FieldServiceProvider"` + +### Configuration +See: https://www.tiny.cloud/docs/configure/ diff --git a/config/nova-tinymce-field.php b/config/nova-tinymce-field.php index 0ddb12c..58d8d6f 100644 --- a/config/nova-tinymce-field.php +++ b/config/nova-tinymce-field.php @@ -1,13 +1,21 @@ [ 'init' => [ - 'menubar' => false, + 'allow_html_in_named_anchor' => false, 'branding' => false, + 'extended_valid_elements' => 'a[href]', 'image_caption' => true, - 'paste_as_text' => true, - 'paste_word_valid_elements' => 'b,strong,i,em,h1,h2', + 'menubar' => false, + 'paste_as_text' => false, + 'paste_retain_style_properties' => false, + 'valid_elements' => '*', ], 'plugins' => [ 'advlist autolink lists link image imagetools media',