Lines Matching full:view

155     function insertParagraphAfterSelectedVisualIndex(view) {  argument
156 if (!view || !view.state) return false;
157 const selected = findVisualIndexAtSelection(view.state);
160 const {schema} = view.state;
165 let tr = view.state.tr.insert(insertPos, paragraph).scrollIntoView();
166 view.dispatch(tr);
170 const SelectionClass = view.state.selection.constructor;
171 const $target = view.state.doc.resolve(insertPos + 1);
173 view.dispatch(view.state.tr.setSelection(selection).scrollIntoView());
178 view.focus();
213 function insertVisualIndexBlock(view, pluginNode) { argument
214 const state = view.state;
219 view.dispatch(state.tr.replaceSelectionWith(pluginNode));
226 view.dispatch(state.tr.insert(insertPos, pluginNode));
295 constructor(node, view, getPos) { argument
297 this.view = view;
341 const replacement = createVisualIndexNode(this.view.state.schema, syntax);
345 … this.view.dispatch(this.view.state.tr.replaceWith(pos, pos + this.node.nodeSize, replacement));
346 this.view.focus();
383 command: (state, dispatch, view) => { argument
385 if (!dispatch || !view) return true;
399view.dispatch(view.state.tr.replaceWith(existing.pos, existing.pos + existing.node.nodeSize, plugi…
400 } else if (!insertVisualIndexBlock(view, pluginNode)) {
401 const endPos = view.state.doc.content.size;
402 view.dispatch(view.state.tr.insert(endPos, pluginNode));
405 view.focus();
417 …w.Prosemirror.pluginNodeViews.visualindex = (node, view, getPos) => new VisualIndexNodeView(node, argument
420 window.Prosemirror.pluginNodeViews.dwplugin_inline = (node, view, getPos) => { argument
421 if (isLegacyVisualIndexPluginNode(node)) return new VisualIndexNodeView(node, view, getPos);
422 … return typeof originalInline === 'function' ? originalInline(node, view, getPos) : undefined;
426 window.Prosemirror.pluginNodeViews.dwplugin_block = (node, view, getPos) => { argument
427 if (isLegacyVisualIndexPluginNode(node)) return new VisualIndexNodeView(node, view, getPos);
428 return typeof originalBlock === 'function' ? originalBlock(node, view, getPos) : undefined;
434 const view = window.Prosemirror && window.Prosemirror.view;
435 if (!view || !view.state) return;
436 if (!selectionIsVisualIndex(view.state)) return;
441 insertParagraphAfterSelectedVisualIndex(view);