How to use the prosemirror-markdown.defaultMarkdownSerializer function in prosemirror-markdown

To help you get started, we’ve selected a few prosemirror-markdown 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 pubpub / pubpub-editor / packages / pubpub-prose / dist / prosemirror-setup / editors / simpleEditor.js View on Github external
exports.createSimpleEditor = function (place, doc) {
  var _require = require('../pubpubSetup'),
      pubpubSetup = _require.pubpubSetup;

  var _require2 = require('prosemirror-state'),
      EditorState = _require2.EditorState;

  var _require3 = require('prosemirror-view'),
      EditorView = _require3.EditorView;

  var _require4 = require("prosemirror-markdown"),
      defaultMarkdownParser = _require4.defaultMarkdownParser,
      defaultMarkdownSerializer = _require4.defaultMarkdownSerializer;

  // const {clipboardParser, clipboardSerializer} = require('./proseEditor/clipboardSerializer');

  /*
  const state = EditorState.create({
    // doc: pubSchema.nodeFromJSON(this.collab.doc.contents),
  	plugins: [pubpubSetup({schema: pubSchema})],
  });
  */


  var view = void 0;
  try {
    view = new EditorView(place, {
      state: EditorState.create({ schema: _schema.schema }),
      onAction: function onAction(action) {