diff --git a/docs/modules/Canvas.md b/docs/modules/Canvas.md index 9e6cd733e..107af37bc 100644 --- a/docs/modules/Canvas.md +++ b/docs/modules/Canvas.md @@ -108,17 +108,136 @@ The `spacing` type is used to show component offsets like paddings and margins ( ### Disable built-in types +You can disable the rendering of built-in canvas spots (some or all of them) during the editor initialization. + ```js -canvas: { - customSpots: { - select: true, - hover: true, - spacing: true, - target: true, - // resize: true, - }, -}, +grapesjs.init({ + // ... + canvas: { + // Disable only the hover type spot + customSpots: { + hover: true, + }, + // Disable all built-in spots + customSpots: true, + }, +}) ``` +In the next section, we'll see how it's possible to reuse the built-in spots and create your own. + + + + +### Spots customization + +In the example below we'll see how to reuse the built-in `hover` canvas spot to render our custom highlighting rectangle (we'll disable the rendering of the default one) and create a new one in order to render a button below the selected `text` components. + + + +