diff --git a/docs/api/component.md b/docs/api/component.md index cb5a09197..09e4cba0d 100644 --- a/docs/api/component.md +++ b/docs/api/component.md @@ -48,6 +48,7 @@ component.get('tagName'); * `selectable` **[Boolean][3]?** Allow component to be selected when clicked. Default: `true` * `hoverable` **[Boolean][3]?** Shows a highlight outline when hovering on the element if `true`. Default: `true` * `void` **[Boolean][3]?** This property is used by the HTML exporter as void elements don't have closing tags, eg. `
`, `
`, etc. Default: `false` +* `style` **[Object][2]?** Component default style, eg. `{ width: '100px', height: '100px', 'background-color': 'red' }` * `styles` **[String][1]?** Component related styles, eg. `.my-component-class { color: red }` * `content` **[String][1]?** Content of the component (not escaped) which will be appended before children rendering. Default: `''` * `icon` **[String][1]?** Component's icon, this string will be inserted before the name (in Layers and badge), eg. it can be an HTML string ''. Default: `''` @@ -632,8 +633,9 @@ Return HTML string of the component * `opts` **[Object][2]** Options (optional, default `{}`) * `opts.tag` **[String][1]?** Custom tagName - * `opts.attributes` **([Object][2] | [Function][4])** You can pass an object of custom attributes to replace - with the current one or you can even pass a function to generate attributes dynamically (optional, default `null`) + * `opts.attributes` **([Object][2] | [Function][4])** You can pass an object of custom attributes to replace with the current ones or you can even pass a function to generate attributes dynamically. (optional, default `null`) + * `opts.withProps` **[Boolean][3]?** Include component properties as `data-gjs-*` attributes. This allows you to have re-importable HTML. + * `opts.altQuoteAttr` **[Boolean][3]?** In case the attribute value contains a `"` char, instead of escaping it (`attr="value ""`), the attribute will be quoted using single quotes (`attr='value "'`). #### Examples @@ -662,6 +664,16 @@ component.toHTML({ Returns **[String][1]** HTML string +### getInnerHTML + +Get inner HTML of the component + +#### Parameters + +* `opts` **[Object][2]** Same options of `toHTML` (optional, default `{}`) + +Returns **[String][1]** HTML string + ### getChangedProps Return an object containing only changed props diff --git a/docs/api/editor.md b/docs/api/editor.md index feaf0e701..041cfbe68 100644 --- a/docs/api/editor.md +++ b/docs/api/editor.md @@ -119,6 +119,7 @@ Returns CSS built inside canvas * `opts.component` **Component?** Return the CSS of a specific Component * `opts.json` **[Boolean][18]** Return an array of CssRules instead of the CSS string (optional, default `false`) * `opts.avoidProtected` **[Boolean][18]** Don't include protected CSS (optional, default `false`) + * `opts.onlyMatched` **[Boolean][18]** Return only rules matched by the passed component. (optional, default `false`) Returns **([String][16] | [Array][19]\)** CSS string or array of CssRules diff --git a/docs/api/parser.md b/docs/api/parser.md index 20ef335d1..2044693af 100644 --- a/docs/api/parser.md +++ b/docs/api/parser.md @@ -51,6 +51,8 @@ Parse HTML string and return the object containing the Component Definition * `options` **[Object][5]?** Options (optional, default `{}`) * `options.htmlType` **[String][6]?** [HTML mime type][7] to parse + * `options.allowScripts` **[Boolean][8]** Allow `