https://github.com/karitham/prosemirror
prosemirror implementation in go.
https://github.com/karitham/prosemirror
Last synced: 3 months ago
JSON representation
prosemirror implementation in go.
- Host: GitHub
- URL: https://github.com/karitham/prosemirror
- Owner: karitham
- License: mit
- Created: 2024-04-12T08:56:23.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-12T09:10:28.000Z (about 1 year ago)
- Last Synced: 2025-01-22T05:29:47.254Z (4 months ago)
- Language: Go
- Size: 33.2 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Prosemirror
This is a go implementation of the prosemirror document model.
It tries to map closely to the original source code.
The `examples` directory is a set of examples providing ways to get easy test data out of the original prosemirror.
We want to be 100% compliant at least on document and transformation aspects.
## Usage
```sh
go get -u github.com/karitham/prosemirror
```Then create a `Schema` and use it to build your document.
Due to how the original prosemirror implementation handles transforms and how go deals with unmarshalling, you need to globally register your marshallers for schemas. This means this library cannot handle using schemas with the same objects but different unmarshalling policies.
This might be possible since we use `github.com/go-json-experiment/json` to handle the marshalling.