How to use the prosemirror-transform.Step.fromJSON function in prosemirror-transform

To help you get started, we’ve selected a few prosemirror-transform 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 / src / addons / Collaborative / collaborativePlugin.js View on Github external
const uncompressedSteps = compressedStepsJSON.map((compressedStepJSON)=> {
					return Step.fromJSON(this.view.state.schema, uncompressStepJSON(compressedStepJSON));
				});
				steps.push(...uncompressedSteps);
github pubpub / pubpub-editor / src / plugins / collaborativeold.js View on Github external
const uncompressedSteps = compressedStepsJSON.map((compressedStepJSON) => {
						return Step.fromJSON(
							this.view.state.schema,
							uncompressStepJSON(compressedStepJSON),
						);
					});
					steps.push(...uncompressedSteps);
github pubpub / pubpub-editor / stories / stepTestingPanelsStories.js View on Github external
const fixedSteps = hydratedSteps.map((step) => {
		return Step.fromJSON(schema, step.toJSON());
	});
	const adjustedSteps = adjustSteps2(empty, schema, fixedSteps, divergeKey);
github chanzuckerberg / czi-prosemirror / demo / EditorConnection.js View on Github external
        let tr = receiveTransaction(this.state.edit, data.steps.map(j => Step.fromJSON(EditorSchema, j)), data.clientIDs)
        this.dispatch({type: "transaction", transaction: tr, requestDone: true})
github pubpub / pubpub-editor / packages / pubpub-prose / src / collab / doc-changes.js View on Github external
					const steps = [diff].map(jIndex => Step.fromJSON(pubSchema, jIndex));
					const clientIds = [diff].map(jIndex => jIndex.client_id);
github pubpub / pubpub-editor / packages / pubpub-editor / src / addons / CollaborativeAddon / FirebasePlugin.js View on Github external
function compressedStepJSONToStep(compressedStepJSON) {
    return Step.fromJSON(view.state.schema, uncompressStepJSON(compressedStepJSON)) }
github pubpub / pubpub / tools / 5to6 / v5 / changes.js View on Github external
const steps = Object.values(compressedStepsJson).map((stepJson) => {
		const uncompressedStepsJson = uncompressStepJSON(stepJson);
		return Step.fromJSON(editorSchema, uncompressedStepsJson);
	});
	return new Change(steps, clientId, timestamp, draftBranchId);
github scrumpy / tiptap / examples / Components / Routes / Collaboration2 / index.vue View on Github external
        steps.map(step => Step.fromJSON(schema, step)),
        steps.map(step => step.clientID),
github pubpub / pubpub-editor / src / plugins / collaborativeold.js View on Github external
const newSteps = compressedStepsJSON.map((compressedStepJSON) => {
				return Step.fromJSON(
					this.view.state.schema,
					uncompressStepJSON(compressedStepJSON),
				);
			});
			const newStepsClientIds = new Array(newSteps.length).fill(clientId);
github pubpub / pubpub-editor / src / plugins / collaborative / authority.js View on Github external
const steps = compressedSteps.map((cs) =>
		Step.fromJSON(prosemirrorSchema, uncompressStepJSON(cs)),
	);