All Projects → jhuix → vue-showdowns-editor

jhuix / vue-showdowns-editor

Licence: MIT license
A markdown editor using codemirror and previewer using @jhuix/showdowns for Vue.js.

Programming Languages

Vue
7211 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
stylus
462 projects

Projects that are alternatives of or similar to vue-showdowns-editor

Markdown Preview Enhanced
One of the 'BEST' markdown preview extensions for Atom editor!
Stars: ✭ 3,478 (+12781.48%)
Mutual labels:  plantuml, toc, katex, mermaid
Editor.md
The open source embeddable online markdown editor (component).
Stars: ✭ 11,741 (+43385.19%)
Mutual labels:  codemirror, toc, katex
vuepress-theme-cool
A custom vuepress theme with mermaid and plantuml, katex and vue components.
Stars: ✭ 57 (+111.11%)
Mutual labels:  plantuml, mermaid
vuepress-theme-gungnir
A blog theme for VuePress 2.
Stars: ✭ 160 (+492.59%)
Mutual labels:  katex, mermaid
plant erd
ERD exporter with PlantUML and mermaid format
Stars: ✭ 126 (+366.67%)
Mutual labels:  plantuml, mermaid
Jekyll Spaceship
🚀 A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.
Stars: ✭ 196 (+625.93%)
Mutual labels:  plantuml, katex
Asciidocfx
Asciidoc Editor and Toolchain written with JavaFX 16 (Build PDF, Epub, Mobi and HTML books, documents and slides)
Stars: ✭ 1,533 (+5577.78%)
Mutual labels:  plantuml, mermaid
showdown-katex
Math typesetting for showdown
Stars: ✭ 32 (+18.52%)
Mutual labels:  katex, showdown
ecto erd
A mix task for generating Entity Relationship Diagram from Ecto schemas available in your project.
Stars: ✭ 173 (+540.74%)
Mutual labels:  plantuml, mermaid
Plantuml Editor
PlantUML online demo client
Stars: ✭ 313 (+1059.26%)
Mutual labels:  codemirror, plantuml
vscode-markdown-editor
A vscode extension to make your vscode become a full-featured WYSIWYG markdown editor
Stars: ✭ 249 (+822.22%)
Mutual labels:  katex, mermaid
ink
The flexible TypeScript Markdown editor that powers https://octo.app
Stars: ✭ 82 (+203.7%)
Mutual labels:  codemirror, mde
compose plantuml
Generate Plantuml graphs from docker-compose files
Stars: ✭ 77 (+185.19%)
Mutual labels:  plantuml
codemirror-autosuggest
CodeMirror autosuggest addon
Stars: ✭ 44 (+62.96%)
Mutual labels:  codemirror
gouml
Automatically generate PlantUML from Go Code.
Stars: ✭ 96 (+255.56%)
Mutual labels:  plantuml
clojure-mode
Clojure/Script mode for CodeMirror 6
Stars: ✭ 105 (+288.89%)
Mutual labels:  codemirror
macos-snippets
Snip is a lightweight snippets manager app for macOS
Stars: ✭ 238 (+781.48%)
Mutual labels:  codemirror
TW5-CodeMirror-Enhanced
An enhanced for CodeMirror framework in TiddlyWiki, including TW5 highlight, WikiLink auto-completion, expandable hint, snippets, etc.
Stars: ✭ 24 (-11.11%)
Mutual labels:  codemirror
codemirror-buttons
CodeMirror buttons addon
Stars: ✭ 30 (+11.11%)
Mutual labels:  codemirror
codemirror-plugin
Emmet plugin for CodeMirror web editor
Stars: ✭ 55 (+103.7%)
Mutual labels:  codemirror

Vue-Showdowns-Editor

A markdown editor using codemirror and previewer using @jhuix/showdowns for Vue.js.

The Vue-Showdowns-Editor once used a name MDSE:MarkDown-Showdowns-Editor.

intro

If you think the markdown showdowns editor can help you or also hope to encourage the author, please click on the top right corner to give me a Star⭐️. Thanks for your star.

Live Demo Editor —— showdowns-editor

Check a live demo editor here https://jhuix.github.io/vue-showdowns-editor

Markdown editor

Markdown editor of vue-showdowns-editor, edit markdown text using vue-codemirror to access codemirror.

CodeMirror is a versatile text editor implemented in JavaScript for the browser. It is specialized for editing code, and comes with over 100 language modes and various addons that implement more advanced editing functionality. Every language comes with fully-featured code and syntax highlighting to help with reading and editing complex code. You can find more information (and the manual) on the codemirror project page.

Markdown previewer

Markdown previewer of vue-showdowns-editor, preview markdown content with HTML using the showdowns (npm package refer to @jhuix/showdowns) to converte it.

Showdowns is a lib that make markdown to html with some extensions of showdown.js. And Showdown is a Javascript Markdown to HTML converter, based on the original works by John Gruber. Showdown can be used client side (in the browser) or server side (with NodeJs). For more information, refer to the following document:

Supporting some markdown extension features

See more information, refer to the following document:

Extensions Syntax and Examples

Extensions Demo Preview

Table of Contents

toc

LaTeX math and AsciiMath

math

Mermaid

gantt

Plantuml

plantuml

Flowchart

plantuml

Network Sequence

plantuml

Graphviz's dot

plantuml

Railroad diagrams

plantuml

WaveDrom

plantuml

Vega and Vega-Lite

plantuml

Usage In VUE

See mainview.vue source file of examples.

  • Import all components
import Vue from 'vue';
import VueMDSE from '../src';

Vue.use(VueMDSE);
  • Import specified component
<script>
  import { ShowdownsEditor, Showdowns, Editor } from '../src';

  export default {
    components: {
      [ShowdownsEditor.name]: ShowdownsEditor,
      [Showdowns.name]: Showdowns,
      [Editor.name]: Editor,
    }
  }
</script>

OR

import { ShowdownsEditor, Showdowns, Editor } from '../src';

Vue.component(ShowdownsEditor.name, ShowdownsEditor);
Vue.component(Showdowns.name, Showdowns);
Vue.component(Editor.name, Editor);
  • Set CodeMirror Theme (mdn-like's theme) and add outside menu
<template>
  <mdse-showdowns-editor
    @toolClick="handlerToolClick"
    ref="mdse"
  ></mdse-showdowns-editor>
</template>

<script>
import { ShowdownsEditor } from '@jhuix/vue-showdowns-editor';

function getOutsideMenu(locale) {
  return [
    {
      type: 'theme:mdn-like',
      text: 'mdn-like',
      menu: true,
      disabled: false
    }
}

export default {
  name: 'mainview',
  components: {
    [ShowdownsEditor.name]: ShowdownsEditor
  },
  methods: {
    handlerToolClick(type) {
      if (type.startsWith('theme:')) {
        // click menu which type is theme:mdn-like 
        type = type.substr(6);
        if (editor_themes.indexOf(type) != -1) {
          // Set CodeMirror Theme
          this.$refs.mdse.setEditorTheme(type);
        }
      }
    },
  },
  created() {
    this.$nextTick(function() {
      // add outside menu
      this.$refs.mdse.addOutsideMenu(getOutsideMenu);
      // Set CodeMirror Theme
      this.$refs.mdse.setEditorTheme('mdn-like');
    }
  }
}
</script>

// import mdn-like theme css style
<style lang="stylus">
@import ('~@/../node_modules/codemirror/theme/mdn-like.css');
</style>

Development

  • Project setup
npm install
  • Compiles and hot-reloads for development
npm run serve
  • Compiles and minifies for production
npm run build

License

MIT

Copyright (c) 2019-present, Jhuix (Hui Jin)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].