Git Product home page Git Product logo

prosemirror-elements's Introduction

@guardian/prosemirror-elements

This Prosemirror plugin adds the ability to add custom 'elements' to a document.

Why does this exist?

Modelling non-text content in Prosemirror can be tricky. prosemirror-elements provides an abstraction that makes it easy to write custom elements that:

  • contain user-defined fields that model many different kinds of content, including rich text fields and arbitrary data
  • are first class citizens of the Prosemirror schema (for example, nested rich text fields play nicely with collaborative editing)
  • are renderer-agnostic (we use React as a default)

Setup

yarn installs and sets up the project dependencies.

Run

yarn start builds the project locally, spins up a webserver on http://localhost:7890, and watches for file changes.

Testing

  • Run the unit tests via Jest with yarn test:unit.
  • Run the integration tests via Cypress with yarn test:integration.
    • You'll need to be running the application via yarn start simultaneously for the tests to work โ€“ make sure the server is responding on http://localhost:7890 before running the tests.
    • For reasons we're not yet able to determine, Cypress won't run your tests immediately when you select them in the GUI. Hit the 'refresh' button and they should run normally.

prosemirror-elements's People

Contributors

dependabot[bot] avatar jonathonherbert avatar rhystmills avatar richieahb avatar shession avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.