{"id":23690003,"url":"https://github.com/murdercode/nova4-tinymceeditor","last_synced_at":"2025-08-02T03:39:12.611Z","repository":{"id":50493661,"uuid":"483732682","full_name":"murdercode/Nova4-TinymceEditor","owner":"murdercode","description":"A TinyMCE Field for Laravel Nova 4 \u0026 5","archived":false,"fork":false,"pushed_at":"2025-07-18T12:05:26.000Z","size":5497,"stargazers_count":16,"open_issues_count":3,"forks_count":17,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-27T03:03:16.348Z","etag":null,"topics":["laravel","laravel-nova","nova-extension","tinymce"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/murdercode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-04-20T16:33:47.000Z","updated_at":"2025-07-18T12:04:42.000Z","dependencies_parsed_at":"2024-12-30T01:58:21.437Z","dependency_job_id":"e0bc35e3-6916-42b5-a410-7e1e31712b78","html_url":"https://github.com/murdercode/Nova4-TinymceEditor","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":"0.13043478260869568","last_synced_commit":"4ef9b6b6923780e8ad27a4d4d26aaa8a8b2cca00"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/murdercode/Nova4-TinymceEditor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murdercode%2FNova4-TinymceEditor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murdercode%2FNova4-TinymceEditor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murdercode%2FNova4-TinymceEditor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murdercode%2FNova4-TinymceEditor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/murdercode","download_url":"https://codeload.github.com/murdercode/Nova4-TinymceEditor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murdercode%2FNova4-TinymceEditor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268331526,"owners_count":24233277,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","nova-extension","tinymce"],"created_at":"2024-12-30T01:58:16.245Z","updated_at":"2025-08-02T03:39:12.575Z","avatar_url":"https://github.com/murdercode.png","language":"PHP","readme":"# Nova TinyMCE Editor\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/murdercode/Nova4-TinymceEditor/raw/HEAD/art/banner.svg\" width=\"100%\" \nalt=\"Logo Nova4 TinyMce\"\u003e\u003c/p\u003e\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/murdercode/nova4-tinymce-editor.svg?style=flat-square)](https://packagist.org/packages/murdercode/nova4-tinymce-editor)\n[![Code Style](https://img.shields.io/github/actions/workflow/status/murdercode/Nova4-TinymceEditor/fix-php-code-style-issues.yml?label=Code%20Style)](https://github.com/murdercode/Nova4-TinymceEditor/actions?query=workflow%3A\"Fix+PHP+code+style+issues\"+branch%3Amain)\n[![Analyze](https://github.com/murdercode/Nova4-TinymceEditor/actions/workflows/phpstan.yml/badge.svg)](https://github.com/murdercode/Nova4-TinymceEditor/actions/workflows/phpstan.yml)\n[![Maintainability](https://api.codeclimate.com/v1/badges/a6b48b887c69a5f91ee5/maintainability)](https://codeclimate.com/github/murdercode/Nova4-TinymceEditor/maintainability)\n[![Total Downloads](https://img.shields.io/packagist/dt/murdercode/nova4-tinymce-editor.svg?style=flat-square)](https://packagist.org/packages/murdercode/nova4-tinymce-editor)\n![License Mit](https://img.shields.io/github/license/murdercode/Nova4-TinymceEditor)\n\u003c!--[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/murdercode/nova4-tinymce-editor/run-tests?label=tests)](https://github.com/murdercode/nova4-tinymce-editor/actions?query=workflow%3Arun-tests+branch%3Amain)--\u003e\n\n## Introduction\n\nUnleash creativity within Laravel Nova using the TinyMCE plugin, making content creation a breeze with its user-friendly\nand dynamic editing capabilities.\n\n## Features\n\n* 📷 Upload images support *(BETA)*\n* 🌙 Dark mode support\n* 🔀 Switch between 5 or 6 versions of TinyMCE\n* ❌ Can be disabled (by passing readonly() to make method)\n\n## Extra\n\n\u003e [!IMPORTANT]\n\u003e Want some steroids for your TinyMCE? [Check out](https://github.com/The-3Labs-Team/tinymce-chatgpt-plugin) our new *\n*ChatGTP for TinyMCE** plugin! 🚀🚀🚀\n\n## Demo \u0026 Screenshots\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/murdercode/Nova4-TinymceEditor/raw/HEAD/art/demo1.gif\" width=\"100%\" \nalt=\"Demo Nova4 TinyMce\"\u003e\u003c/p\u003e\n\n## Versioning\n\nThis package follows the following versioning scheme:\n\n* **v2.x** - Nova 5 - TinyMCE 5 or 6\n* **v1.x** - Nova 4 - TinyMCE 5 or 6\n* **v0.x** - TinyMCE version 5 (deprecated)\n\n## Prerequisites\n\n- Laravel \u003e= 9\n- PHP \u003e= 8.0\n- Laravel Nova \u003e= 4\n- TinyMCE API Key ([get one here](https://www.tiny.cloud/))\n\n# How to install\n\nIn the root of your Laravel installation launch:\n\n```bash\ncomposer require murdercode/nova4-tinymce-editor\n```\n\nThen publish the config:\n\n```bash\nphp artisan vendor:publish --provider=\"Murdercode\\TinymceEditor\\FieldServiceProvider\"\n```\n\nA file in `config/nova_tinymce_editor.php` will appear as follows (you can change the default values):\n\n```php\n\u003c?php\n\nreturn [\n    'cloudChannel' =\u003e '6', // 5 or 6\n\n    /**\n     * Get your API key at https://www.tiny.cloud and put it here or in your .env file\n     */\n    'apiKey' =\u003e env('TINYMCE_API_KEY', ''),\n\n    /**\n     * The default skin to use.\n     */\n    'skin' =\u003e 'oxide-dark',\n\n    /**\n     * The default options to send to the editor.\n     * See https://www.tiny.cloud/docs/configure/ for all available options (check for 5 or 6 version).\n     */\n    'init' =\u003e [\n        'menubar' =\u003e false,\n        'autoresize_bottom_margin' =\u003e 40,\n        'branding' =\u003e false,\n        'image_caption' =\u003e true,\n        'paste_as_text' =\u003e true,\n        'autosave_interval' =\u003e '20s',\n        'autosave_retention' =\u003e '30m',\n        'browser_spellcheck' =\u003e true,\n        'contextmenu' =\u003e false,\n        //'images_upload_url' =\u003e '/nova-vendor/murdercode/tinymce/upload', // Uncomment to enable image upload\n    ],\n    'plugins' =\u003e [\n        'advlist',\n        'anchor',\n        'autolink',\n        'autosave',\n        'fullscreen',\n        'lists',\n        'link',\n        'image',\n        'media',\n        'table',\n        'code',\n        'wordcount',\n        'autoresize',\n    ],\n    'toolbar' =\u003e [\n        'undo redo restoredraft | h2 h3 h4 |\n                 bold italic underline strikethrough blockquote removeformat |\n                 align bullist numlist outdent indent | link anchor table | code fullscreen spoiler',\n    ],\n\n    /**\n     * Extra configurations for the editor.\n     */\n    'extra' =\u003e [\n        'upload_images' =\u003e [\n            'enabled' =\u003e false, // Uncomment to enable\n            'folder' =\u003e 'images',\n            'maxSize' =\u003e 2048, // KB\n            'disk' =\u003e 'public',\n        ],\n    ],\n];\n```\n\nIn your `.env` file please add the key (get one [here](https://www.tiny.cloud/)):\n\n```\nTINYMCE_API_KEY=[YOUR_PRECIOUS_PRIVATE_KEY]\n```\n\nPlease make sure that you have added domain in your tiny.cloud account list or you will get an error notice message.\n\n## Register the Field\n\nIn your Nova/Resource.php add the field as following:\n\n```php\n\u003c?php\n\nuse Murdercode\\TinymceEditor\\TinymceEditor;\n\nclass Article extends Resource\n{\n    //...\n    public function fields(NovaRequest $request)\n    {\n        return [\n            TinymceEditor::make(__('Content'), 'content')\n                -\u003erules(['required', 'min:20'])\n                -\u003efullWidth()\n                -\u003ehelp(__('The content of the article.')),\n        ];\n    }\n}\n                //...\n```\n\n## Enable Image Upload\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/murdercode/Nova4-TinymceEditor/raw/HEAD/art/demo2.png\" width=\"100%\" \nalt=\"Demo Nova4 TinyMce\"\u003e\u003c/p\u003e\n\n\u003e [!WARNING]\n\u003e This feature is in BETA and can be unstable or contain bugs/security flaws. We provide it as is, without any warranty.\n\u003e For this reason, is disabled by default.\n\nTo enable image upload, you must publish the configuration file\nwith:\n\n```bash\nphp artisan vendor:publish --provider=\"Murdercode\\TinymceEditor\\FieldServiceProvider\"\n```\n\nthen in your config\nfile `config/nova-tinymce-editor.php`:\n\n```php\n\u003c?php\n\n// Uncomment the following line\n'images_upload_url' =\u003e '/nova-vendor/murdercode/tinymce/upload',\n\n// Set the following to true\n    'extra' =\u003e [\n        'upload_images' =\u003e [\n            'enabled' =\u003e false, // Uncomment to enable\n            'folder' =\u003e 'images',\n            'maxSize' =\u003e 2048, // KB\n            'disk' =\u003e 'public',\n        ],\n    ],\n```\n\nPlease be sure that `image` plugin and toolbar button are enabled in your config file.\n\n## Protect code\n\nYou can to control what contents [should be protected](https://www.tiny.cloud/docs/tinymce/6/content-filtering/#protect)\nfrom editing while it gets passed\ninto the editor. This is useful for example when you want to protect PHP code from been formatted.\n\nTo do this, you must publish the configuration file and add the following line:\n\n```php\n\u003c?php\n\nreturn [\n'init' =\u003e [\n        // ... Your awesome init config ...\n         /**\n         * Set what content should be protected while editing\n         * This should be a regular expression\n         * E.g \"/\u003c\\?php.*?\\?\u003e/g\" - Protect PHP code from been formatted\n         */\n         'protect' =\u003e []\n];\n//...\n```\n\n## Use Alternative CDN / Self Hosted scripts\n\nTinyMCE allows you to use an alternative mirror for scripts. It will be useful if you want to use a non-cloud version (and avoid the new mechanism pricing of Tiny.cloud).\n\nYou can simply add in `app/Providers/NovaServiceProvider.php`:\n\n```php\n\nclass NovaServiceProvider extends NovaApplicationServiceProvider\n{\n    /**\n     * Bootstrap any application services.\n     */\n    public function boot(): void\n    {\n        parent::boot();\n\n        // TinyMCE Mirror\n        Nova::script('custom', 'https://cdn.jsdelivr.net/npm/tinymce@6/tinymce.min.js');\n\n        // ...\n    }\n}\n```\n\nTinyMCE will automatic check if there's a script and I'll ignore his script from tiny cloud.\n\n## Upgrade from 1.0.x to 1.1.x\n\nThe transition to 1.1 involves the use of a new configuration layout compatible with the previous version.\n\nHowever, if you want to use the new image upload and version change features, it is recommended that you make a\nnew `php artisan vendor:publish`.\n\n## Upgrade from 0.x to 1.x\n\nIn `composer.json` change the version of the package to\n\n`\"murdercode/nova4-tinymce-editor\": \"^1.0\"`\n\nand run `composer update`.\n\nAlso, you must change the format of the plugin snippet in `nova-tinymce-editor` as follows:\n\n*0.x*\n\n```php\n'plugins' =\u003e [\n            'anchor advlist autolink autoresize autosave code fullscreen link lists image imagetools media\n            paste wordcount',\n        ],\n```\n\n*1.x*\n\n```php\n'plugins' =\u003e [\n            'anchor',\n            'advlist',\n            // etc...\n        ],\n```\n\n## Upgrade from Nova 4 to Nova 5\n\nTo upgrade this package for use with Nova 5, update your composer.json to use version 2:\n\n```bash\ncomposer require murdercode/nova4-tinymce-editor:^2.0\n```\n\nThe v2.x branch is fully compatible with Nova 5 while maintaining all the features from v1.x. No additional configuration changes are needed.\n\n## Feedback and Support\n\nTest, PR (also of this doc) are welcome.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmurdercode%2Fnova4-tinymceeditor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmurdercode%2Fnova4-tinymceeditor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmurdercode%2Fnova4-tinymceeditor/lists"}