Nascent Personality Manifestation

    @guardian/prosemirror-invisibles
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/guardian__prosemirror-invisibles package

    1.3.1 • Public • Published

    prosemirror-invisibles

    A simple implementation of invisible characters in ProseMirror.


    Install

    npm install @guardian/prosemirror-invisibles

    Usage

    Add the plugin to the state and pass the invisibles you would like to display in the document.

    import invisibles, { space, hardBreak, paragraph } from 'prosemirror-invisibles';
    
    new EditorView(document.querySelector("#editor"), {
      state: EditorState.create({
        doc: DOMParser.fromSchema(mySchema).parse(
          document.querySelector("#content")
        ),
        plugins: [
          invisibles([space(), hardBreak(), paragraph()])
        ]
      })
    });

    And import the css from prosemirror-invisibles/dist/invisibles.css.

    Keywords

    none

    Install

    npm i @guardian/prosemirror-invisibles

    DownloadsWeekly Downloads

    169

    Version

    1.3.1

    License

    MIT

    Unpacked Size

    1.06 MB

    Total Files

    36

    Last publish

    Collaborators

    • unmesh_malvankar
    • zekehg
    • rtyley
    • dlawes
    • ghaberis
    • jsherbert
    • david.furey.gu
    • tonymccraeguardian
    • jlieb10
    • guardian-developers
    • simonadcock-gu
    • maxspencer
    • akash1810
    • reetta
    • ajwl
    • tomrf1
    • mchv
    • itsibitzi
    • justinpinner
    • jranks123
    • nicl
    • philmcmahon
    • tjmw
    • thaliasilver
    • sndrs
    • sam.hession
    • jfsoul
    • 0x101
    • frankie_hammond
    • aoifemcl15
    • ioanna0
    • mxdvl
    • mark.addis
    • rhysmills
    • jamie-lynch
    • amyhughes-gu
    • oliverlloyd
    • jacobwinch
    • dskamiotis
    • marjank
    • annabeddow
    • fweddi
    • michaelclapham_gnm
    • olly.namey.guardian