PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Solved

MarkdownX image insert not working

Solved
leehilton

Jul 4th, 2023 11:26 AM

Hello,

I installed MarkdownX following the steps in the install instructions and video. This includes using a fresh laravel install based on the TALL preset per the video. When trying to attach an image, I get the following non-working situation:

https://the.unexpectedreboot.com/1688494763

There are no console errors in the browser. The images I attempt to use DO get uploaded into my ./storage/app/public/images folder. I cannot find anywhere that an error is being generated.

This is using all the current versions of the TALL stack and MarkdownX v1.0.6

Report
1
bobbyiliev

Jul 4th, 2023 11:44 AM

Best Answer

Hi there,

Indeed this seems to be a problem with Firefox. Document.execCommand() has been depreciated by Mozilla and they still don't have a working alternative.

For the moment, what you could do is:

  • Edit this file:
resources/views/livewire/markdown-x.blade.php
  • On line 1205 add this:
            if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1){
                editor.focus();
                editor.value = updatedText;
                return;
            }

Let me know how it goes!

Report
1
leehilton

Jul 4th, 2023 12:47 PM

Thank you for the response, this has it working in Firefox. Thank you for the assist!

bobbyiliev

Jul 4th, 2023 09:38 PM

No problem at all! Happy to hear that it is working with that fix!