Editor wikimarkup transformer
Wiki markup transformer for JIRA and Confluence
yarn add @atlaskit/editor-wikimarkup-transformer
11.15.1
Patch Changes
- Updated dependencies
Note: This component is designed for internal Atlassian development.
External contributors will be able to use this component but will not be able to submit issues.
This package provides a transformer for ProseMirror Node <-> Wikimarkup conversion.
Usage
Use the component in your React app as follows to encode ProseMirror node to Wikimarkup:
import { WikiMarkupTransformer } from '@atlaskit/editor-wikimarkup-transformer';
const transformer = new WikiMarkupTransformer(schema);
const wikimarkupString = transformer.encode(pmNode); // A Wikimarkup string representing the Prosemirror node output
Use the component in your React app as follows to parse Wikimarkup to ProseMirror node:
import { WikiMarkupTransformer } from '@atlaskit/editor-wikimarkup-transformer';
const transformer = new WikiMarkupTransformer(schema);
const pmNode = transformer.parse(wikiMarkup); // A prosemirror node is output