How to use the prosemirror-model.Mark.sameSet function in prosemirror-model

To help you get started, we’ve selected a few prosemirror-model 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 ProseMirror / prosemirror-state / src / transaction.js View on Github external
ensureMarks(marks) {
    if (!Mark.sameSet(this.storedMarks || this.selection.$from.marks(), marks))
      this.setStoredMarks(marks)
    return this
  }
github tinacms / tinacms / packages / tinacms / fields / src / Wysiwyg / Translator / MarkdownTranslator / from_markdown.ts View on Github external
function maybeMerge(a: any, b: any) {
  if (a.isText && b.isText && Mark.sameSet(a.marks, b.marks))
    return a.copy(a.text + b.text)
}
github ProseMirror / prosemirror-markdown / src / from_markdown.js View on Github external
function maybeMerge(a, b) {
  if (a.isText && b.isText && Mark.sameSet(a.marks, b.marks))
    return a.withText(a.text + b.text)
}