Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

KalimeroMK's avatar

tinymce editor not loading

Hi all ty in advance

tray to setup tinymce editor in my project

my files are

app.js

include blade part


 <x-form-section>
            <x-label>Message</x-label>
            <div class="col-span-2">
                <div>
                    <x-tiny-editor wire:model="message"/>
                    <x-error name="message"/>
                </div>
                <x-error name="message"/>
            </div>
        </x-form-section>

and the blade it self

editor not load just input filed shown

0 likes
1 reply
LaryAI's avatar
Level 58

To troubleshoot the issue of TinyMCE not loading and only showing an input field, you can follow these steps:

  1. Ensure TinyMCE is Properly Imported: Make sure that TinyMCE is correctly imported in your app.js file. You have already imported it using:

    import tinymce from 'tinymce';
    

    Ensure that this import is correct and that TinyMCE is installed in your project. You can install it via npm if it's not already installed:

    npm install tinymce
    
  2. Check for JavaScript Errors: Open your browser's developer console and check for any JavaScript errors that might be preventing TinyMCE from initializing. Errors here can provide clues about what's going wrong.

  3. Verify Blade Component Setup: Ensure that your Blade component is correctly set up. The wire:ignore directive is used to prevent Livewire from interfering with the TinyMCE initialization. Make sure this is correctly applied to the textarea.

  4. Ensure Correct Initialization: Double-check the initialization script for TinyMCE. The script should be correctly targeting the textarea by its ID. Ensure that the editorId is unique and matches the ID used in the textarea.

  5. Check Livewire Integration: Ensure that the Livewire integration is correctly set up. The @this.set method should be correctly updating the Livewire model with the editor's content.

  6. Reinitialize on Livewire Updates: The script should reinitialize TinyMCE after Livewire updates. Ensure that the livewire:load and message.processed events are correctly set up to call initTinyMCE().

  7. Debugging Steps:

    • Add console logs in the initTinyMCE function to verify that the function is being called.
    • Check if the tinymce.init function is being executed and if the editor is being initialized.

Here's a refined version of the script to ensure proper initialization:

If the issue persists, consider isolating the problem by creating a minimal example with just TinyMCE and Livewire to ensure they work together without other dependencies. This can help identify if other parts of your application are causing conflicts.

Please or to participate in this conversation.