zero-md icon indicating copy to clipboard operation
zero-md copied to clipboard

Inline base64 image rendering not working

Open NewGHUser4321 opened this issue 6 months ago • 0 comments

When a base64 encoded image is in the inline markdown it is not rendering. If the same markdown is in external .md file, it works fine This works

<!doctype html>

<html>
  <head>
    <script type="module">
      import ZeroMd from 'https://cdn.jsdelivr.net/npm/zero-md@3'
      customElements.define('zero-md', class extends ZeroMd {
        async load() {
          await super.load({
            katexOptions: {
              nonStandard: false
            }
          })
        }
      })
    </script>
  </head>

  <body>
     <zero-md src="example.md"></zero-md>
  </body>
</html>

example.md

This doesn't work:

<!doctype html>

<html>
  <head>
    <script type="module">
      import ZeroMd from 'https://cdn.jsdelivr.net/npm/zero-md@3'
      customElements.define('zero-md', class extends ZeroMd {
        async load() {
          await super.load({
            katexOptions: {
              nonStandard: false
            }
          })
        }
      })
    </script>
  </head>

  <body>
     <zero-md>
         <script type="text/markdown">
              <!-- Insert the markdown from example.md here -->
         </script>
     </zero-md>
  </body>
</html>

Please let me know if there is a solution for this.

Thank you,

NewGHUser4321 avatar Jul 14 '25 13:07 NewGHUser4321