diff --git a/docs/api/block.md b/docs/api/block.md index 5deb19cc1..9889c9043 100644 --- a/docs/api/block.md +++ b/docs/api/block.md @@ -2,8 +2,6 @@ ## Block - - ### Properties * `label` **[String][1]** Block label, eg. `My block` @@ -17,31 +15,31 @@ * `onClick` **[Function][5]?** Custom behavior on click, eg. `(block, editor) => editor.getWrapper().append(block.get('content'))` * `attributes` **[Object][2]?** Block attributes to apply in the view element -### getId +## getId Get block id Returns **[String][1]** -### getLabel +## getLabel Get block label Returns **[String][1]** -### getMedia +## getMedia Get block media Returns **[String][1]** -### getContent +## getContent Get block content -Returns **([Object][2] | [String][1] | [Array][6]<([Object][2] | [String][1])>)** Component definition | HTML string +Returns **([Object][2] | [String][1] | [Array][6]<([Object][2] | [String][1])>)** -### getCategoryLabel +## getCategoryLabel Get block category label diff --git a/src/block_manager/model/Block.js b/src/block_manager/model/Block.js index ab3c693c6..41db00a95 100644 --- a/src/block_manager/model/Block.js +++ b/src/block_manager/model/Block.js @@ -12,6 +12,8 @@ import { isFunction } from 'underscore'; * @property {Boolean} [disable=false] Disable the block from being interacted * @property {Function} [onClick] Custom behavior on click, eg. `(block, editor) => editor.getWrapper().append(block.get('content'))` * @property {Object} [attributes={}] Block attributes to apply in the view element + * + * @module docsjs.Block */ export default class Block extends Model { defaults() { @@ -55,7 +57,7 @@ export default class Block extends Model { /** * Get block content - * @returns {Object|String|Array} Component definition | HTML string + * @returns {Object|String|Array} */ getContent() { return this.get('content');