Swiftpack.co - LambdaDigamma/swift-prosemirror as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by LambdaDigamma.
LambdaDigamma/swift-prosemirror 0.0.5
Parse and display prosemirror schema with Swift
⭐️ 6
🕓 3 weeks ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/LambdaDigamma/swift-prosemirror.git", from: "0.0.5")



A ProseMirror schema parser and renderer written in Swift using SwiftUI to render a document

This package ships with a parser which generates type-safe documents that can directly be rendered using the build-in SwiftUI renderer. Rendered documents can also be styled with


Install swift-prosemirror with Swift Package Manager

dependencies: [
    .package(name: "ProseMirror", url: "https://github.com/lambdadigamma/swift-prosemirror", .upToNextMajor(from: "0.0.1")),


Parsing ProseMirror schema with the build-in parser to retrieve a type-safe parsed document:

import ProseMirror

let proseMirrorInput = "..."

let parser = Parser()
let document = try parser.parse(proseMirrorInput)

You can render a document to a SwiftUI View using:


Currently Supported Elements

  • Text
  • Hard Break
  • Paragraph
  • Headline (Level 1 to 3)
  • Blockquote
  • Unordered List (disk and dash)
  • CodeBlock


  • ☐ Support all default mark types
  • ☐ Support links with actions
  • ☐ Implement ability to customize styling
  • ☐ Make it easily extendable
  • ☐ Headlines in ordered and unordered lists


Please see CHANGELOG.md for more information what has changed recently.


Contributions are always welcome!


swift-prosemirror is available under the MIT license. See the LICENSE.md file for more info.


Stars: 6
Last commit: 3 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics