Livewire and ckEditor

Solved
habetech

Nov 24th, 2022 01:59 AM

Hi, i have question is posible integrate ckeditor in livewire model? specifically to upload images using ckeditor

bobbyiliev

Nov 24th, 2022 04:52 AM

Hi there,

I've not tested this myself but I just found this example on GitHub on how to integrate the ckeditor with Livewire:

Add CKEDITOR in Laravel-Livewire

An alternative option is to use the MarkdownX editor rather than the ckeditor:

MarkdownX

Hope that this helps!

habetech

Nov 24th, 2022 05:42 AM

Ok thnx, i try to integrate markdownX following documentation and get this error.

TypeError in_array(): Argument #2 ($haystack) must be of type array, null given (View: /home2/ekosep/public_html/resources/views/livewire/markdown-x.blade.php)

bobbyiliev

Nov 25th, 2022 01:28 AM

Hi there,

Did you run php artisan livewire:discover after you added the files?

Also what version of Laravel are you using?

habetech

Nov 25th, 2022 01:35 AM

yes, I'm, i cleared the cache, and showing now. But don't have all functionality.

for example, i type for commanands "/" and there is no nothing happens.

Screenshot_3.png

do i need include some libraries?

I already using livewire and tailwind css on the project.

bobbyiliev

Nov 25th, 2022 01:44 AM

It sounds like that the Livewire styles and scripts might not be included. As per the Livewire docs, can you verify if you have the following in your main blade file:

...
    @livewireStyles
</head>
<body>
    ...
 
    @livewireScripts
</body>
</html>
bobbyiliev

Nov 25th, 2022 01:45 AM

Best Answer

On an additional note, you could take a look at this video here where Tony installs the MarkdownX editor step by step:

Report
1