{"id":13810006,"url":"https://github.com/Vivify-Ideas/vue-simple-markdown","last_synced_at":"2025-05-14T10:31:35.526Z","repository":{"id":24042149,"uuid":"100459531","full_name":"Vivify-Ideas/vue-simple-markdown","owner":"Vivify-Ideas","description":"A Simple and Highspeed Markdown Parser for Vue","archived":false,"fork":false,"pushed_at":"2023-01-04T11:06:46.000Z","size":333,"stargazers_count":83,"open_issues_count":48,"forks_count":17,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-23T01:36:37.784Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vivify-Ideas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-16T07:12:48.000Z","updated_at":"2024-08-30T19:50:12.000Z","dependencies_parsed_at":"2023-01-14T07:45:17.408Z","dependency_job_id":null,"html_url":"https://github.com/Vivify-Ideas/vue-simple-markdown","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vivify-Ideas%2Fvue-simple-markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vivify-Ideas%2Fvue-simple-markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vivify-Ideas%2Fvue-simple-markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vivify-Ideas%2Fvue-simple-markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vivify-Ideas","download_url":"https://codeload.github.com/Vivify-Ideas/vue-simple-markdown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254120624,"owners_count":22018024,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T02:00:42.295Z","updated_at":"2025-05-14T10:31:35.110Z","avatar_url":"https://github.com/Vivify-Ideas.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","UI组件","Components \u0026 Libraries","UI Components","UI Components [🔝](#readme)"],"sub_categories":["降价","UI Components","Markdown"],"readme":"# VueSimpleMarkdown\n\n[![npm](https://img.shields.io/npm/v/vue-simple-markdown.svg)](https://www.npmjs.com/package/vue-simple-markdown) [![vue2](https://img.shields.io/badge/vue-2.x-brightgreen.svg)](https://vuejs.org/)\n\n\u003e A Simple and Highspeed Markdown Parser for Vue\n\n## Installation\n\n```bash\nnpm install --save vue-simple-markdown\n```\n\n## Usage\n\n### Bundler (Webpack, Rollup)\n\n```js\nimport Vue from 'vue'\nimport VueSimpleMarkdown from 'vue-simple-markdown'\n// You need a specific loader for CSS files like https://github.com/webpack/css-loader\nimport 'vue-simple-markdown/dist/vue-simple-markdown.css'\n\nVue.use(VueSimpleMarkdown)\n```\n\n### Browser\n\n```html\n\u003c!-- Include after Vue --\u003e\n\u003c!-- Local files --\u003e\n\u003clink rel=\"stylesheet\" href=\"vue-simple-markdown/dist/vue-simple-markdown.css\"\u003e\u003c/link\u003e\n\u003cscript src=\"vue-simple-markdown/dist/vue-simple-markdown.js\"\u003e\u003c/script\u003e\n\n\u003c!-- From CDN --\u003e\n\u003clink rel=\"stylesheet\" href=\"https://unpkg.com/vue-simple-markdown/dist/vue-simple-markdown.css\"\u003e\u003c/link\u003e\n\u003cscript src=\"https://unpkg.com/vue-simple-markdown\"\u003e\u003c/script\u003e\n```\n\n### Syntax\n```\n\u003cvue-simple-markdown :source=\"source\"\u003e\u003c/vue-simple-markdown\u003e\n```\n### Props\n\n| Prop | Type | Default | Describe |\n| ---- | ---- | ------- | ------- |\n| source | String | '' | The markdown source code |\n| emoji | Boolean | `true` | `:)` =\u003e `😃` |\n| heading | Boolean | `true` | `#` =\u003e `\u003ch1\u003e`, `##` =\u003e `\u003ch2\u003e`... |\n| highlight | Boolean | `true` | SyntaxHighlighter ([highlightjs](https://www.npmjs.com/package/highlightjs)) |\n| horizontal-line | Boolean | `true` | `***` or `___` or `---` =\u003e `\u003chr /\u003e` |\n| image | Boolean | `true` | `![imageName.png](imageLocation)` |\n| inline-code | Boolean | `true` | \\`someCode\\` =\u003e `someCode` |\n| italic | Boolean | `true` | `*text*` or `_text_` =\u003e *text* |\n| linkify | Boolean | `true` | Autoconvert URL-like text to link |\n| link | Boolean | `true` | `[Github](https://github.com/)` =\u003e [Github](https://github.com/) |\n| lists | Boolean | `true` | Lists, see [here](#lists) |\n| strong | Boolean | `true` | `**text**` or `__text__` =\u003e __text__ |\n| blockquote | Boolean | `true` | Blockquotes, see [here](#blockquotes) |\n| table | Boolean | `true` | Tables, see [here](#tables) |\n| prerender | Function | `(source) =\u003e return { source }` | Function executed before rendering process |\n| postrender | Function | `(html) =\u003e { return html }` | Function executed after rendering process |\n\n### Lists\n#### Unordered list\n\nStart list with characters `*`, `+` or `-`  \nNumber of spaces before that character =\u003e nesting level\n\n```\n* First nesting level\n * Second nesting level\n   * Third nesting level\n          * Tenth nesting level\n   * Again third nesting level\n```\n#### Ordered list\n\nStart list with number and dot. At example `1.`  \nNumber of spaces before that character =\u003e nesting level\n\n```\n1. First nesting level\n 1. Second nesting level\n   1. Third nesting level\n          1. Tenth nesting level\n   2. Again third nesting level\n```\n\n### Blockquotes\n```\n\u003e First nesting level\n\u003e\u003e Second nesting level\n\u003e\u003e\u003e Third nesting level\n\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e Tenth nesting level\n\u003e\u003e\u003e Again third nesting level\n```\n\n### Tables\nA table is an arrangement of data with rows and columns, consisting of a single header row, a delimiter row separating the header from the data, and zero or more data rows.\nEach row must start and end with pipes (`|`) and it consists of cells containing arbitrary text, in which inlines are parsed, separated by pipes (`|`). Spaces between pipes and cell content are trimmed. Block-level elements cannot be inserted in a table.\nExample:\n```\n| Foo | Bar |\n|-----|-----|\n| Bam | Baz |\n```\n| Foo | Bar |\n|-----|-----|\n| Baz | Bim |\n\nYou can use colon (`:`) in the delimiter row to determine content alignment of the corresponding column.\nExample:\n```\n| Align left | Align Right | Align Center | Default |\n|:-----------|-:|:---:|--|\n| Some text| Some text | Some | alignment |\n| aligned to|  aligned to | text |\n| the left side| the right side| in the center |\n```\n| Align left | Align Right | Align Center | Default |\n|:-----------|-:|:---:|--|\n| Some text| Some text | Some | alignment |\n| aligned to|  aligned to | text |\n| the left side| the right side| in the center |\n\nNumber of columns in each row in the body of the table may vary.\nExample:\n```\n| Column A | Column B | Column C |\n|-|-|-|\n| You can have | | empty cells |\n| This row | is too short |\n| This row | has | too many | cells |\n```\n| Column A | Column B | Column C |\n|-|-|-|\n| You can have | | empty cells |\n| This row | is too short |\n| This row | has | too many | cells |\n\n\n## Development\n\n### Launch visual tests\n\n```bash\nnpm run dev\n```\n\n### Launch Karma with coverage\n\n```bash\nnpm run dev:coverage\n```\n\n### Build\n\nBundle the js and css of to the `dist` folder:\n\n```bash\nnpm run build\n```\n\n\n## Publishing\n\nThe `prepublish` hook will ensure dist files are created before publishing. This\nway you don't need to commit them in your repository.\n\n```bash\n# Bump the version first\n# It'll also commit it and create a tag\nnpm version\n# Push the bumped package and tags\ngit push --follow-tags\n# Ship it 🚀\nnpm publish\n```\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVivify-Ideas%2Fvue-simple-markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FVivify-Ideas%2Fvue-simple-markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVivify-Ideas%2Fvue-simple-markdown/lists"}