Code Monkey home page Code Monkey logo

Comments (12)

ricardoboss avatar ricardoboss commented on July 17, 2024 11

There are also other alternatives like:

from vue-markdown.

vincerubinetti avatar vincerubinetti commented on July 17, 2024 4

Hopefully this helps someone stumbling upon this issue. I'm using Vue 3 and Typescript, and just wanted some simple markdown rendering (no need for remark/rehype plugins).

I looked into the above alternatives, as well as more I found through google, but each of them had problems... either didn't work with Vue 3 or Typescript, and/or had an unacceptably big bundle size.

I ended up using micromark and writing a simple Markdownify Vue component like this:

<template>
  <span v-html="html"></span>
</template>

<script lang="ts">
import { defineComponent } from "vue";
import { micromark } from "micromark";

// takes a string of basic markdown and renders html
export default defineComponent({
  props: { source: String },
  computed: {
    html() {
      return micromark(this.source || "");
    },
  },
});
</script>
<template>
  <Markdownify source="**Hello** _World_" />
</template>

from vue-markdown.

milindsingh avatar milindsingh commented on July 17, 2024 3

Thanks @MichaelCurrin I have enabled the issue section and now you can raise any issue in it.

Also, It would be really helpful if you can help me to main this package (I'll add you with write access).

And I have already updated all dependencies to latest and done some testing, its released in beta.

npm i @adapttive/[email protected]
Checkout:
https://www.npmjs.com/package/@adapttive/vue-markdown/v/3.0.0-beta.2

from vue-markdown.

bartburkhardt avatar bartburkhardt commented on July 17, 2024 2

There's also this:

https://github.com/michaelmyc/vue-markdown-plus

from vue-markdown.

milindsingh avatar milindsingh commented on July 17, 2024 2

I am planning to maintain this package and have already merged most of the PR in my repository. Any contribution is welcomed to the new repository.

Please check https://github.com/adapttive/vue-markdown/
master: current version (with few fixes)
next: updated dependencies and few features added.

Use:
npm install @adapttive/vue-markdown

https://www.npmjs.com/package/@adapttive/vue-markdown

from vue-markdown.

MichaelCurrin avatar MichaelCurrin commented on July 17, 2024 1

@milindsingh Your package works for me :) I can't make any issues on your repo, but it would be nice to document one of the approaches below in README.md

One needs to replace the imports to reflect the install package.

-import VueMarkdown from 'vue-markdown'
+import VueMarkdown '@adapttive/vue-markdown'

Or...

Leave the imports untouched, by installing as an alias.

npm i vue-markdown@npm:@adapttive/vue-markdown

Which gives a change something like:

{
  "dependencies": {
-  "vue-markdown": "^2.2.4
+  "vue-markdown": "npm:@adapttive/vue-markdown@^X.X.X"
  }
}

See my PR for interest, where I used the alias approach https://github.com/MichaelCurrin/badge-generator/pull/85/files

from vue-markdown.

milindsingh avatar milindsingh commented on July 17, 2024 1

@MarvinKweyu Thanks, I have updated the repo.

from vue-markdown.

juhasev avatar juhasev commented on July 17, 2024 1

@milindsingh Thanks for forking this! Switched on to your package to get rid of the security vulnerabilities!

from vue-markdown.

alexcroox avatar alexcroox commented on July 17, 2024

Thanks @ricardoboss, https://github.com/cloudacy/vue-markdown-render was a drop in replacement for my use case

from vue-markdown.

MichaelCurrin avatar MichaelCurrin commented on July 17, 2024

@milindsingh Glad to hear, thanks for sharing!

from vue-markdown.

MichaelCurrin avatar MichaelCurrin commented on July 17, 2024

Thanks @milindsingh Yes I'm happy to contribute to maintaining that

from vue-markdown.

MarvinKweyu avatar MarvinKweyu commented on July 17, 2024

Thanks @MichaelCurrin I have enabled the issue section and now you can raise any issue in it.

Also, It would be really helpful if you can help me to main this package (I'll add you with write access).

And I have already updated all dependencies to latest and done some testing, its released in beta.

npm i @adapttive/[email protected]
Checkout:
https://www.npmjs.com/package/@adapttive/vue-markdown/v/3.0.0-beta.2

@milindsingh much thanks. Amazing package. Update the npm docs though. They differ from the readme.

from vue-markdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.