v8.78.1

Decorate plugin

Use the Decorate plugin to draw and add shapes in the crop context.

This means that if the image is flipped or rotated the added decorations stay in place, as the are positioned relatively to the crop. If the crop rectangle is adjusted the decorations will be moved along with it.

Alternatively use the Annotate plugin to draw and add shapes to the image context.

When both plugins are used at the same time, annotations are drawn first and decorations are layered on top.

Property Default value Description
decorateTools
undefined
Markup editor toolbar to show in the decorate view.
decorateToolShapes
undefined
Markup editor tool styles to use.
decorateActiveTool
'sharpie'
Which tool to select in the toolbar.
decorateEnableButtonFlipVertical
false
Enable the vertical flip button in the Markup Editor shape control bar.
decorateEnableDropImagePreset
true
Set to false to prevent dropping images on the canvas.
decorateEnableSelectImagePreset
false
Set to true to show the image browse button.
decorateShapeControls
undefined
Style controls available to change shape appearance.
decoratePresets
[]
An array of annotation presets to render in the "stickers" tab. See stickers for more information.
decorateGridSize
undefined
The size of the grid cells in the decorate util.
decorateSnapToContext
undefined
Should we snap to context in the decorate util.
decorateWillRenderShapePresetToolbar
undefined
Set to a function that receives the node tree for the preset toolbar. Should synchronously return the node tree. See willRenderShapePresetToolbar for details.
decorateWillRenderShapeStyleControls
undefined
Set to a function that receives the shape controls node tree. Should synchronously return the node tree.

Decorate plugin exports

The core editor module exports the following Decorate plugin objects.

Export Description
plugin_decorate The decorate util view.
plugin_decorate_locale_en_gb The decorate util locales.