Srdjan Djenader edited this page Nov 30, 2017 · 3 revisions

Provides a pencil tool for freehand drawing.


Enabling the Plugin

plugins: [
    'Pencil',
    'BrushSize'
]

Configuration

pluginsConfig: {
    'Pencil': {
        cursorUrl: 'pencil',
        brushSize: 3
    }
}
  • cursorUrl:
    • 'pencil' is a default icon built into DrawerJs.
    • You can also specify a custom cursor URL in CSS format: 'url(assets/eraser_cursor.cur), default'
    • Note the word default at the end: that is the name of the cursor that will be used when the specified URL is unavailable.
      The Mozilla Developer Network has more information on the CSS cursor property.
  • brushSize:
    • Sets the default brush size.
    • If you want the user to be able to set their own brush size, the BrushSize plugin must be included, too.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.