Skip to content

Commit 839563f

Browse files
committed
Up API docs
1 parent 55a7a95 commit 839563f

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

docs/api/block_manager.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,13 @@ Return the Blocks container element
151151

152152
Returns **[HTMLElement][14]**
153153

154+
## getDragBlock
155+
156+
Returns currently dragging block.
157+
Updated when the drag starts and cleared once it's done.
158+
159+
Returns **([Block] | [undefined][15])**
160+
154161
## render
155162

156163
Render blocks
@@ -160,8 +167,8 @@ Render blocks
160167
* `blocks` **[Array][13]** Blocks to render, without the argument will render all global blocks
161168
* `opts` **[Object][11]** Options (optional, default `{}`)
162169

163-
* `opts.external` **[Boolean][15]?** Render blocks in a new container (HTMLElement will be returned)
164-
* `opts.ignoreCategories` **[Boolean][15]?** Render blocks without categories
170+
* `opts.external` **[Boolean][16]?** Render blocks in a new container (HTMLElement will be returned)
171+
* `opts.ignoreCategories` **[Boolean][16]?** Render blocks without categories
165172

166173
### Examples
167174

@@ -217,4 +224,6 @@ Returns **[HTMLElement][14]** Rendered element
217224

218225
[14]: https://developer.mozilla.org/docs/Web/HTML/Element
219226

220-
[15]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
227+
[15]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined
228+
229+
[16]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean

docs/api/canvas.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ Set canvas position coordinates
178178

179179
* `x` **[Number][22]** Horizontal position
180180
* `y` **[Number][22]** Vertical position
181+
* `opts` **ToWorldOption** (optional, default `{}`)
181182

182183
### Examples
183184

@@ -233,6 +234,12 @@ canvas.addFrame({
233234

234235
Returns **[Frame]**
235236

237+
## getLastDragResult
238+
239+
Get the last created Component from a drag & drop to the canvas.
240+
241+
Returns **([Component] | [undefined][23])**
242+
236243
[1]: https://github.com/GrapesJS/grapesjs/blob/master/src/canvas/config/config.ts
237244

238245
[2]: #getconfig
@@ -276,3 +283,5 @@ Returns **[Frame]**
276283
[21]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
277284

278285
[22]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
286+
287+
[23]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined

0 commit comments

Comments
 (0)