Skip to content

Commit

Permalink
doc: update markdown.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ygj6 committed Dec 2, 2021
1 parent 4937828 commit 2a6fa04
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 24 deletions.
19 changes: 7 additions & 12 deletions doc/cn/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
> [更多设置参考markdown-it...](https://github.com/markdown-it/markdown-it)
### 简单示例
仅使用mavonEditor的markdown渲染功能。

> 注意:`class="markdown-body"` 是必要的,否则CSS样式会于预览的不一样
Expand All @@ -49,23 +50,17 @@

<script>
import { mavonEditor } from 'mavon-editor';
import "mavon-editor/dist/css/index.css";
import 'mavon-editor/dist/css/index.css';
export default {
name: 'Example',
data() {
return {
rawHtml: '',
};
},
props: {
markdown: String,
},
  computed: {
    rawHtml: function() {
      return mavonEditor.mixins[0].data().markdownIt.render(this.markdown);
    }
  },
computed: {
rawHtml: function() {
return mavonEditor.mixins[0].data().markdownIt.render(this.markdown);
}
},
};
</script>
```
19 changes: 7 additions & 12 deletions doc/en/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
> [markdown-it API](https://github.com/markdown-it/markdown-it)
### Simple example
Only use the markdown rendering function of mavonEditor.

> Notice:`class="markdown-body"` is necessary, or the CSS style will be different from the preview
Expand All @@ -49,23 +50,17 @@

<script>
import { mavonEditor } from 'mavon-editor';
import "mavon-editor/dist/css/index.css";
import 'mavon-editor/dist/css/index.css';
export default {
name: 'Example',
data() {
return {
rawHtml: '',
};
},
props: {
markdown: String,
},
  computed: {
    rawHtml: function() {
      return mavonEditor.mixins[0].data().markdownIt.render(this.markdown);
    }
  },
computed: {
rawHtml: function() {
return mavonEditor.mixins[0].data().markdownIt.render(this.markdown);
}
},
};
</script>
```

0 comments on commit 2a6fa04

Please sign in to comment.