Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

postit-js-core

pinussilvestrus49SEE LICENSE IN LICENSE1.1.0

Netlify Status Build Status

diagram-js, toolkit, web modeler, post-it, brainstorming

readme

postit-js

Netlify Status Build Status

Create post-it brainstorming boards - built with diagram-js.

Screencast

Checkout the Demo or the Experiments Page to get some inspiration.

Features

  • Create resizable Post-its on the Canvas (squared and circled) via
    • Palette
    • Double Click (latest element type will be respected)
  • Change the color of Post-its
  • Create simple Text Boxes on the Canvas
  • Create grouping frame elements on the Canvas
  • Add external image resources on the Canvas

Installation

Install the package to include it into your web application

$ npm install postit-js-core --save

Usage

To get started, create a postit-js instance and render a post-it board into your web application

import 'postit-js-core/assets/postit-js.css';

import PostItModeler from 'postit-js-core/lib/Modeler';

let xml; // my post-it xml 

const modeler = new PostItModeler({
  container: '#canvas',
  keyboard: {
    bindTo: window,
  }
});

modeler.importXML(xml).then(function() {
  console.log('board rendered');
}).catch(function(error) {
  console.error('could not import postit board', err);
});

For using postit-js inside your web application you'll need a source code bundler, e.g. webpack. Checkout the example for getting inspiration.

Development Setup

Spin up the application for development, all strings attached:

$ npm install
$ cd  example
$ npm install
$ npm run dev

Extensions

Since diagram-js and also this project is extendable by design, there exist a couple of great community maintained extensions

License

MIT

Contains parts of (bpmn-io) released under the bpmn.io license.

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

_Note: Yet to be released changes appear here._

  • ...

1.1.0

  • DEPS: use fonts via packages (946beda4)
  • DEPS: update to diagram-js@11(fc3eb84d)

1.0.1

  • FIX: remove empty text boxes on cancel editing (#20)
  • FIX: add missing moddle descriptors to published package (#95)
  • CHORE: various dependency updates

1.0.0

  • FEAT: switch from callbacks to Promises (bf699810)
  • CHORE: add basic tests infrastructure (1ea64c90)
  • CHORE: migrate CI to GitHub actions (b512c6c4)
  • CHORE: remove unused global connect tool (5016d943)
  • CHORE: rename default branch to main
  • CHORE: bump to `diagram-js@7.2`
  • CHORE: bump to moddle-xml@9

Breaking Changes

  • APIs don't accept callbacks anymore, instead, they return a Promise now
    • viewer#importXML
    • viewer#importDefinitions
    • viewer#open
    • viewer#saveXML
    • viewer#saveSVG
    • modeler#createDiagram
    • importer#importPostitDiagram

0.6.2

  • CHORE: fix travis

0.6.1

  • CHORE: remove examples from package

0.6.0

  • FEAT: improve image selection (#17)
  • CHORE: examples cleanups

0.5.0

  • FEAT: delete empty text boxes (#6)
  • FIX: transparent background when editing post-it elements (#4)

0.4.0

  • FEAT: ability to re-configure image source (#18)
  • CHORE: update bpmn.io logo

0.3.0

  • FEAT: add image element support (#11)

0.2.0

  • CHORE: first npm release, add integration instructions

0.1.1

  • FIX: ability to delete elements created directly on canvas (#12)

0.1.0

Initial release