How to use the easymde function in easymde

To help you get started, we’ve selected a few easymde examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github getgridea / gridea / src / components / MarkdownEditor.vue View on Github external
}, 1)
          return 'Loading...'
        },
      }, this.configs)
      // 同步 value 和 initialValue 的值 \ Synchronize the values of value and initialValue
      if (configs.initialValue) {
        this.$emit('input', configs.initialValue)
      }
      // 判断是否开启代码高亮 \ Determine whether to enable code highlighting
      if (this.highlight) {
        configs.renderingConfig.codeSyntaxHighlighting = true
      }
      // 设置是否渲染输入的html \ Set whether to render the input html
      // marked.setOptions({ sanitize: this.sanitize })
      // 实例化编辑器 \ Instantiated editor
      this.easymde = new EasyMDE(configs)
      // 添加自定义 previewClass \ Add a custom previewClass
      const className = this.previewClass || ''
      this.addPreviewClass(className)
      // 绑定事件 \ Binding event
      this.bindingEvents()
    },
    bindingEvents() {
github astralapp / astral / resources / assets / js / components / Dashboard / NotesEditor.vue View on Github external
mounted() {
    this.editor = new EasyMDE({
      element: this.$refs.editor,
      initialValue: this.notes,
      forceSync: true,
      autoDownloadFontAwesome: false,
      renderingConfig: {
        codeSyntaxHighlighting: true
      },
      spellChecker: false,
      hideIcons: ['side-by-side', 'guide'],
      showIcons: ['code'],
      status: false,
      toolbar: [
        {
          name: 'bold',
          action: EasyMDE.toggleBold,
          className: 'fas fa-bold',
github CTFd / CTFd / CTFd / themes / admin / assets / js / styles.js View on Github external
$("textarea.markdown").each(function(_i, e) {
    if (e.hasOwnProperty("mde") === false) {
      let mde = new EasyMDE({
        autoDownloadFontAwesome: false,
        toolbar: [
          "bold",
          "italic",
          "heading",
          "|",
          "quote",
          "unordered-list",
          "ordered-list",
          "|",
          "link",
          "image",
          "|",
          "preview",
          "guide"
        ],
github polonel / trudesk / src / client / components / EasyMDE / index.jsx View on Github external
componentDidMount () {
    this.easymde = new Easymde({
      element: this.element,
      forceSync: true,
      minHeight: this.props.height,
      toolbar: EasyMDE.getMdeToolbarItems(),
      autoDownloadFontAwesome: false,
      status: false,
      spellChecker: false
    })

    this.easymde.codemirror.on('change', () => {
      this.onTextareaChanged(this.easymde.value())
    })

    if (this.easymde && this.props.allowImageUpload) {
      if (!this.props.inlineImageUploadUrl) return Log.error('Invalid inlineImageUploadUrl Prop.')

easymde

A simple, beautiful, and embeddable JavaScript Markdown editor that easy to use. Features include autosaving and spell checking.

MIT
Latest version published 2 years ago

Package Health Score

64 / 100
Full package analysis