{"id":13770759,"url":"https://github.com/advoor/nova-editor-js","last_synced_at":"2026-01-16T02:06:25.446Z","repository":{"id":34446314,"uuid":"179136432","full_name":"advoor/nova-editor-js","owner":"advoor","description":"Editor JS field for Laravel Nova","archived":false,"fork":false,"pushed_at":"2025-03-08T21:36:31.000Z","size":889,"stargazers_count":92,"open_issues_count":13,"forks_count":58,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-25T12:47:42.449Z","etag":null,"topics":["laravel","laravel-nova","laravel-nova-field"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/advoor.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-02T18:31:35.000Z","updated_at":"2025-04-07T18:54:36.000Z","dependencies_parsed_at":"2023-11-18T18:23:44.449Z","dependency_job_id":"75a96b9a-ab4a-41af-b553-60202407423c","html_url":"https://github.com/advoor/nova-editor-js","commit_stats":{"total_commits":167,"total_committers":17,"mean_commits":9.823529411764707,"dds":0.6946107784431137,"last_synced_commit":"932c31d027a06b25fd7a3d7dcab0802e93672143"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/advoor%2Fnova-editor-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/advoor%2Fnova-editor-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/advoor%2Fnova-editor-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/advoor%2Fnova-editor-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/advoor","download_url":"https://codeload.github.com/advoor/nova-editor-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253514352,"owners_count":21920327,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","laravel-nova","laravel-nova-field"],"created_at":"2024-08-03T17:00:41.637Z","updated_at":"2026-01-16T02:06:25.436Z","avatar_url":"https://github.com/advoor.png","language":"PHP","funding_links":[],"categories":["Libraries"],"sub_categories":["PHP"],"readme":"# Laravel Nova Editor JS Field\n\n[![Latest Version on Github](https://img.shields.io/github/release/advoor/nova-editor-js.svg?style=flat-square)](https://packagist.org/packages/advoor/nova-editor-js)\n[![Total Downloads](https://img.shields.io/packagist/dt/advoor/nova-editor-js.svg?style=flat-square)](https://packagist.org/packages/advoor/nova-editor-js)\n\nA Laravel Nova implementation of [Editor.js](https://github.com/codex-team/editor.js)\nby [@advoor](https://github.com/advoor).\n\n## Installation\n\nInstall via composer:\n\n```\ncomposer require advoor/nova-editor-js\n```\n\nPublish the config file\n\n```\nphp artisan vendor:publish --provider=\"Advoor\\NovaEditorJs\\FieldServiceProvider\"\n```\n\n## Version Compatibility\n\nLaravel Nova 4.x isn't backwards compatible with 3.x, so we had to make a version split.\nPlease use the below table to find which versions are suitable for your installation.\n\n| Package version | Nova Version | Laravel Version | PHP version |\n| --------------- | ------------ | --------------- | ----------- |\n| `4.x`           | 4.x - 5.x    | 10.x - 12.x     | 8.2+        |\n| `3.x`           | 4.x          | 8.x - 10.x      | 8.1+        |\n| `2.x`           | 2.x - 3.x    | 5.x - 8.x       | 5.6 - 7.4   |\n\nNote that we really pushed the PHP version up. If you're staying on\nnew versions of Laravel and Nova, we're expecting your PHP version to match that behaviour.\n\n## Upgrade\n\nSee [the upgrade guide](./UPGRADING.md).\n\n## Usage\n\nTo add EditorJS to your application, you'll need to modify your Nova resource.\nFor ease-of-use we also recommend to update your models, but that's optional.\n\n### Updating your Nova resource\n\nThis package exposes a `NovaEditorJsField` that takes care of displaying the HTML contents\nand providing the user with the EditorJS field.\n\nTo use it, simply import the field,\n\n```php\nuse Advoor\\NovaEditorJs\\NovaEditorJsField;\n```\n\nuse it in your fields array,\n\n```php\nreturn [\n    // …\n    NovaEditorJsField::make('about'),\n];\n```\n\nAnd boom, you've got yourself a fancy editor.\n\n### Updating your models (optional)\n\nFor ease-of-use, we recommend you add the `NovaEditorJsCast` to the `$casts` on your models.\nThis will map the value to a `NovaEditorJsData` model, which can be returned in Blade (rendering HTML), or sent\nvia API calls (rendering JSON, unless you call `toHtml` on it or cast it to a string).\n\n```php\nuse Advoor\\NovaEditorJs\\NovaEditorJsCast;\n\nclass User extends Model {\n    protected $casts = [\n        'about' =\u003e NovaEditorJsCast::class,\n    ];\n}\n```\n\nSince the `NovaEditorJsData` model is an `Htmlable`, Blade will recognize it as\nsafe HTML. This means you don't have to use Blade \"unescaped statements\".\n\n```blade\n\u003carticle\u003e\n    \u003ch1\u003eAbout {{ $user-\u003ename }}\u003c/h1\u003e\n    {{ $user-\u003eabout }}\n\u003c/article\u003e\n```\n\n### Rendering HTML without model changes\n\nYou can also use the `NovaEditorJs` facade to render HTML from stored data.\n\n```php\nNovaEditorJs::generateHtmlOutput($user-\u003eabout);\n```\n\nThe return value of `generateHtmlOutput` is an `HtmlString`, which is treated as\nsafe by Blade. This means you don't have to use Blade \"unescaped statements\".\n\n```blade\n\u003carticle\u003e\n    \u003ch1\u003eAbout {{ $user-\u003ename }}\u003c/h1\u003e\n    {{ NovaEditorJs::generateHtmlOutput($user-\u003eabout) }}\n\u003c/article\u003e\n```\n\n## Customizing\n\nYou can configure the editor settings and what tools the Editor should use, by\nupdating the `editorSettings` and `toolSettings` property in the config file\nrespectively.\n\nFrom the config, you can define the following editor settings:\n\n- `placeholder` ([docs][placeholder-docs]) - The placeholder to show in an empty editor\n- `defaultBlock` ([docs][defaultblock-docs]) - The block that's used by default\n- `autofocus` ([docs][autofocus-docs]) - If the editor should auto-focus, only use if you never have multiple editors on\n  a page and after considering the\n  [accessibility implications][autofocus-accessibility]\n- `rtl` ([docs][rtl-docs]) - Set to true to enable right-to-left mode, for languages like Arabic and Hebrew\n\n[placeholder-docs]: https://editorjs.io/configuration#placeholder\n[defaultblock-docs]: https://editorjs.io/configuration#change-the-default-block\n[autofocus-docs]: https://editorjs.io/configuration#autofocus\n[autofocus-accessibility]: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus#accessibility_considerations\n[rtl-docs]: https://editorjs.io/i18n#rtl-support\n\nFurthermore, you can customize the tools the editor should use. The following tools are enabled by default:\n\n- [Header](https://github.com/editor-js/header)\n- [Image](https://github.com/editor-js/image)\n- [Link](https://github.com/editor-js/link)\n- [List](https://github.com/editor-js/list)\n- [Code block](https://github.com/editor-js/code)\n- [Inline code](https://github.com/editor-js/inline-code)\n- [Checklist](https://github.com/editor-js/checklist)\n- [Marker](https://github.com/editor-js/marker)\n- [Embeds](https://github.com/editor-js/embed)\u003csup\u003e†\u003c/sup\u003e\n- [Delimiter](https://github.com/editor-js/delimiter)\n- [Table](https://github.com/editor-js/table)\n- [Raw](https://github.com/editor-js/raw)\n\nYou can customize the views for each component, by changing the view in `resources/views/vendor/nova-editor-js/`.\n\n\u003csup\u003e†\u003c/sup\u003e The _Embeds_ tool is triggered by pasting URLs to embeddable\ncontent. It does not have an entry in the \"Add\" menu.\n\n### Registering custom components\n\nPlease refer to the [extending Nova EditorJS](./EXTENDING.md) guide on instructions on how to register custom\ncomponents.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadvoor%2Fnova-editor-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadvoor%2Fnova-editor-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadvoor%2Fnova-editor-js/lists"}