almamun2s/tinymce

The Most Trusted and Feature-rich WYSIWYG Rich Text Editor

v1.1.3 2025-05-29 18:39 UTC

This package is auto-updated.

Last update: 2025-05-29 18:50:04 UTC


README

Support WYSIWYG editor in input fields

Features

  • Support Laravel 11/12

  • WYSIWYG editor

  • Works with laravel blade

  • React, VUE and Angular support are coming soon

Installation

Add the following line to the require section of composer.json:

{
    "require": {
        "almamun2s/tinymce": "1.*"
    }
}

OR

Require this package with composer:

composer require almamun2s/tinymce

Update your packages with composer update or install with composer install.

Publish Config

php artisan vendor:publish --tag=tinymce

TinyMCE WYSIWYG editor (version 7.9.1)

Edit frontend_framework in the config/tinymce.php config

file config/tinymce.php

<?php

    return [
        /**
         * API get on https://www.tiny.cloud/
         */
        'api_key' => env('TINY_MCE_API', 'no-api-key'),

        /**
         * Your frontend framework what you used to develop your website
         * By default it is laravel blade 
         * blade is available now
         * react, vue and angular are coming soon
         */
        'frontend_framework' => 'blade',
    ];

Configuration

Add TINY_MCE_API to .env file:

TINY_MCE_API=[your-api-key]

Display WYSIWYG editor

    {!! app('tinymce')->display() !!}

With your default data

    {!! app('tinymce')->display('This is from your code') !!}

With your custom name

    {!! app('tinymce')->display('This is from your code', ['name' => 'my-textarea']) !!}

Or, with your custom class

    {!! app('tinymce')->display('This is from your code', ['class' => 'my-class']) !!}

Or, with your custom id

    {!! app('tinymce')->display('This is from your code', ['id' => 'my-id']) !!}

And you can pass data attributes for sure

    {!! app('tinymce')->display('This is from your code', ['name' => 'my-product-details'], ['price' => '200', 'quantity' => '15']) !!}

Contribute

https://github.com/almamun2s/tinymce/pulls