Skip to content

Inline base64 image rendering not working #138

@NewGHUser4321

Description

@NewGHUser4321

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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions