quasarframework / quasar-ui-qmarkdown

A Quasar UI App Extension to display inline markdown
https://quasarframework.github.io/quasar-ui-qmarkdown/
MIT License
157 stars 29 forks source link

No refresh in dev mode? #398

Open garyo opened 2 months ago

garyo commented 2 months ago

I managed to get QMarkdown installed using a boot file, and it renders OK in dev mode, but it doesn't hot-reload on save. Changes to the rest of my SFC file refresh, but just changing the markdown content doesn't. Not sure why.

Boot file:

import { boot } from 'quasar/wrappers';
import { QMarkdown } from '@quasar/quasar-ui-qmarkdown';
import '@quasar/quasar-ui-qmarkdown/dist/index.css'

export default boot(({ app }) => {
  app.component('QMarkdown', QMarkdown);
});

(and note, it is registered in the quasar config)

Source file IndexPage.vue:

<template>
  <q-page padding>
    <!-- eslint-disable vue/html-indent -->
    <q-markdown no-heading-anchor-links=1>
      <pre>
# This is **markdown**!!

Here's some paragraph text.
And some more. bla bla bla
      </pre>
    </q-markdown>
    <!-- eslint-enable vue/html-indent -->
  </q-page>
</template>

<script setup lang="ts">

defineOptions({
  name: 'IndexPage'
});

</script>

I also note that I need to wrap the text with <pre>...</pre> or it gets rendered as a single line of text. Separate issue I guess.