Download the PHP package taylanunutmaz/nova-editor-js without Composer
On this page you can find all versions of the php package taylanunutmaz/nova-editor-js. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package nova-editor-js
Laravel Nova Editor JS Field
A Laravel Nova implementation of Editor.js by @advoor.
Installation
Install via composer:
Publish the config file
Upgrade
If upgrading from v0.4.0, re-publish the config file!
Usage:
Add this use
statement to the top of the your nova resource file:
Use the field as below:
And boom!
You can configure what tools the Editor should use in the config file along with some other settings so make sure to have a look :)
You can use the built in function to generate the response for the frontend:
Each 'block' has it's own view which can be overwritten in resources/views/vendor/nova-editor-js/
Tools included
- https://github.com/editor-js/header
- https://github.com/editor-js/image
- https://github.com/editor-js/code
- https://github.com/editor-js/link
- https://github.com/editor-js/list
- https://github.com/editor-js/inline-code
- https://github.com/editor-js/checklist
- https://github.com/editor-js/marker
- https://github.com/editor-js/embed
- https://github.com/editor-js/delimiter
- https://github.com/editor-js/table
- https://github.com/editor-js/raw
Extending
For the purpose of this section, we will use editor-js/warning
as an example of extensibility.
There are two steps to extending the editor. The first consists of creating a JavaScript file and passing it onto Nova.
The second step allows you to create a blade view file and pass it to the field to allow your block to render in the Nova show
page.
Creating the Javascript file
resources/js/editor-js-plugins/warning.js
webpack.mix.js
app/Providers/NovaServiceProvider.php
config/nova-editor-js.php
Creating the blade view file
resources/views/editorjs/warning.blade.php
CSS classes taken from here.
app/Providers/NovaServiceProvider.php
That's it for extending the Nova EditorJS package!
All versions of nova-editor-js with dependencies
ext-exif Version *
ext-json Version *
taylanunutmaz/editorjs-php Version ^v2.0.8
laravel/nova Version ^2.0 || ^3.0
spatie/image Version ^1.7