diff --git a/.editorconfig b/.editorconfig index e48297b..e4c8a7c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,5 +8,5 @@ indent_size = 4 insert_final_newline = true trim_trailing_whitespace = true -[*.{yaml,yml}] +[*.{yaml,yml,md}] indent_size = 2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b6694d..d43785f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,12 +10,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [3.1.0] ### Added + - Guzzle is now a dependency of this project. - Added `php-cs-fixer` for code standards. - Added `php-parallel-lint` to ensure all files are actually valid PHP code. +- Added `pretttier` for consistent Markdown files. - Added RTL support (`editorSettings.rtl`) ### Changed + - Improved image upload handling, using Laravel-native libraries - Improved link metadata retrieval, using Laravel-native libraries @@ -30,33 +33,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [3.0.5] ### Fixed + - When no changes are made to the editor, the value is left as-is, instead of double-encoding it (thanks @waelelsawy) - Templates for `list`', `paragraph` and `table` to use raw-html statements on cleaned fields. ## [3.0.4] ### Fixed + - NovaEditorJsCast now properly handles JSON, not double-encoding stuff and decoding double-encoded properties. ## [3.0.3] ### Fixed + - Constructor of `NovaEditorJsData` now accepts null values and non-iterables. - PHPDoc return type of `NovaEditorJsData::toHtml()`. ## [3.0.2] ### Added + - Support for `spatie/image` version 2.x. ## [3.0.1] ### Fixed + - `composer.json` didn't require PHP 8.1+, but the codebase did. ## [3.0.0] ### Added + - Nova 4 support - `NovaEditorJsConverter` to split HTML conversion from the Nova Field - `NovaEditorJsData` model to store JSON data and allow easy HTML conversion @@ -64,6 +73,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - JS linter, EditorConfig and other tools for better development ### Changed + - **PHP version requirements changed**, now requires PHP 8.1 or higher - `NovaEditorJs` facade for better separation of concerns - Improved README and separated extending docs to separate file @@ -73,24 +83,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - More robust conversion between the model data and the Nova editor field ## Deprecated + - `NovaEditorJs::make`, use `NovaEditorJsField::make` instead ## [2.0.3] - 2020-12-07 ### Fixed + - Fix for Amazon S3 file support (#49) ## [2.0.2] - 2020-11-29 ### Changed + - Reduced minimum height of editor (#47) ### Fixed + - Fix for when using an S3 disk (#46) ## [2.0.0] - 2020-08-03 ### Added + - Added support for extending the EditorJS field with custom plugins --- diff --git a/EXTENDING.md b/EXTENDING.md index 09a493b..de3f347 100644 --- a/EXTENDING.md +++ b/EXTENDING.md @@ -21,25 +21,28 @@ The second step allows you to create a blade view file and pass it to the field * fetch any value that is contained in your laravel config file from there. */ NovaEditorJS.booting(function (editorConfig, fieldConfig) { - if (fieldConfig.toolSettings.warning.activated === true) { - editorConfig.tools.warning = { - class: require('@editorjs/warning'), - shortcut: fieldConfig.toolSettings.warning.shortcut, - config: { - titlePlaceholder: fieldConfig.toolSettings.warning.titlePlaceholder, - messagePlaceholder: fieldConfig.toolSettings.warning.messagePlaceholder, - }, - } - } + if (fieldConfig.toolSettings.warning.activated === true) { + editorConfig.tools.warning = { + class: require("@editorjs/warning"), + shortcut: fieldConfig.toolSettings.warning.shortcut, + config: { + titlePlaceholder: fieldConfig.toolSettings.warning.titlePlaceholder, + messagePlaceholder: fieldConfig.toolSettings.warning.messagePlaceholder, + }, + }; + } }); ``` `webpack.mix.js` ```js -const mix = require('laravel-mix'); +const mix = require("laravel-mix"); -mix.js('resources/js/editor-js-plugins/warning.js', 'public/js/editor-js-plugins/warning.js'); +mix.js( + "resources/js/editor-js-plugins/warning.js", + "public/js/editor-js-plugins/warning.js" +); ``` `app/Providers/NovaServiceProvider.php` @@ -78,14 +81,14 @@ return [ `resources/views/editorjs/warning.blade.php` -*CSS classes taken from [here](https://github.com/editor-js/warning/blob/master/src/index.css).* +_CSS classes taken from [here](https://github.com/editor-js/warning/blob/master/src/index.css)._ ```html