Skip to content
Snippets Groups Projects
Commit d409a824 authored by chris's avatar chris
Browse files

set inclusive option in schema service

parent f25fdb97
No related branches found
No related tags found
1 merge request!108show comments as one in plugin
......@@ -56,7 +56,7 @@ export default {
PmPlugins: [columnResizing(), tableEditing(), invisibles([hardBreak()])],
// Always load first CommentsService and LinkService,
// Always load first TrackChangeService,
//as it matters on how PM treats nodes and marks
services: [
new TrackChangeService(),
......
......@@ -6,6 +6,8 @@ import { DocumentHelpers } from "wax-prosemirror-utilities";
const activeComment = new PluginKey("activeComment");
const getComment = state => {
if (state.selection.from !== state.selection.to) return;
const commentMark = state.schema.marks["comment"];
const commentOnSelection = DocumentHelpers.findMark(state, commentMark);
if (commentOnSelection) {
......
......@@ -6,6 +6,7 @@ const comment = {
conversation: []
},
inclusive: false,
excludes: "",
parseDOM: [
{
tag: "span.comment",
......
......@@ -10,6 +10,7 @@ export default class Mark {
group = "";
content = "";
draggable = false;
inclusive = true;
_attrs = {};
_parseRules = [];
......@@ -60,6 +61,7 @@ export default class Mark {
group: this.group,
content: this.content,
draggable: this.draggable,
inclusive: this.inclusive,
attrs: this._attrs,
parseDOM: this._parseRules.map(rule => rule.combineRules()),
toDOM: node => {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment