Comments (12)
There are also other alternatives like:
- https://github.com/code-farmer-i/vue-markdown-editor
- https://github.com/cloudacy/vue-markdown-render
- https://github.com/ymmooot/markduck
from vue-markdown.
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.
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.
There's also this:
https://github.com/michaelmyc/vue-markdown-plus
from vue-markdown.
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.
@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.
@MarvinKweyu Thanks, I have updated the repo.
from vue-markdown.
@milindsingh Thanks for forking this! Switched on to your package to get rid of the security vulnerabilities!
from vue-markdown.
Thanks @ricardoboss, https://github.com/cloudacy/vue-markdown-render was a drop in replacement for my use case
from vue-markdown.
@milindsingh Glad to hear, thanks for sharing!
from vue-markdown.
Thanks @milindsingh Yes I'm happy to contribute to maintaining that
from vue-markdown.
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)
- Add an example of using with Prism.js HOT 4
- Incorrect c++ code class HOT 2
- Custom classes for extra styling HOT 18
- performance issue HOT 1
- How to enable code highliting? HOT 1
- Only images, emoji's and weblinks are displayed in MarkDown, everything else is just plain text on VueJS 2
- Does vue-markdown sanitize the input before rendering HTML?
- The separator is not displayed
- Upgrade highlight.js HOT 1
- is it possible to disable katex HOT 1
- 代码块里的注释#会被解析为标题
- Dead project. Check out https://github.com/adapttive/vue-markdown/ HOT 2
- Is this project dead? HOT 2
- Idea : Styling HOT 1
- 如何实现 source 和 渲染结果 一起滚动
- 加粗文本内的 * 符号会被错误解析
- vue3 错误提示使用时 报错 createElement is not a function HOT 2
- 启动项目时控制台报错 HOT 2
- Vue 3 Compatibility
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-markdown.