Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 60c7ef0

Browse files
docs: property
1 parent 764415e commit 60c7ef0

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

webcomponents/inline-editor/src/components.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ export namespace Components {
103103
* Actions to modify the selection font-size enabled?
104104
*/
105105
"fontSize": boolean;
106+
/**
107+
* Handle the selection change "manually". See chapter "Usage within shadow dom"
108+
*/
106109
"handleGlobalEvents": boolean;
107110
/**
108111
* The type of element to attach the image toolbar
@@ -336,6 +339,9 @@ declare namespace LocalJSX {
336339
* Actions to modify the selection font-size enabled?
337340
*/
338341
"fontSize"?: boolean;
342+
/**
343+
* Handle the selection change "manually". See chapter "Usage within shadow dom"
344+
*/
339345
"handleGlobalEvents"?: boolean;
340346
/**
341347
* The type of element to attach the image toolbar

webcomponents/inline-editor/src/components/inline-editor/deckdeckgo-inline-editor.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ export class DeckdeckgoInlineEditor {
179179
@Prop()
180180
customActions: string; // Comma separated list of additional action components
181181

182+
/**
183+
* Handle the selection change "manually". See chapter "Usage within shadow dom"
184+
*/
182185
@Prop()
183186
handleGlobalEvents: boolean = true;
184187

webcomponents/inline-editor/src/components/inline-editor/readme.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ document.addEventListeners('selectionchange', (event) => {
8888
| `containers` | `containers` | A comma separated list of containers where the inline editor should/could be use. Used in order to allow the component to detect some information like the current style or color | `string` | `'h1,h2,h3,h4,h5,h6,div'` |
8989
| `customActions` | `custom-actions` | You might to display and add further actions to the component ? Use this property to provide a comma separated list of actions | `string` | `undefined` |
9090
| `fontSize` | `font-size` | Actions to modify the selection font-size enabled? | `boolean` | `true` |
91+
| `handleGlobalEvents` | `handle-global-events` | Handle the selection change "manually". See chapter "Usage within shadow dom" | `boolean` | `true` |
9192
| `imgAnchor` | `img-anchor` | The type of element to attach the image toolbar | `string` | `'img'` |
9293
| `imgEditable` | `img-editable` | Per default, the component will not consider images as editable. Turn this option to true to activate the edition of images | `boolean` | `false` |
9394
| `imgPropertyCssFloat` | `img-property-css-float` | In case you would like to use a specific property to specify the float on your image | `string` | `'float'` |
@@ -97,8 +98,6 @@ document.addEventListeners('selectionchange', (event) => {
9798
| `palette` | -- | In case you would like to define a custom list of colors for the palette of colors. See @deckdeckgo/color for the default list of colors | `DeckdeckgoPalette[]` | `DEFAULT_PALETTE` |
9899
| `stickyDesktop` | `sticky-desktop` | Use a sticky footer toolbar on desktop | `boolean` | `false` |
99100
| `stickyMobile` | `sticky-mobile` | Use a sticky footer toolbar on mobile. The sticky bar is positioned bottom except on iOS for which it will be positioned top | `boolean` | `false` |
100-
| `handleGlobalEvents` | `handle-global-events` | If the component should register global event handler to detect selection change. Set it to false if you want to invoke the displayTools method directly (eg. when selection originates in a different shadow dom) | `boolean` | `true` |
101-
102101
103102
104103
## Events
@@ -114,6 +113,16 @@ document.addEventListeners('selectionchange', (event) => {
114113
115114
## Methods
116115
116+
### `displayTools(selection?: Selection) => Promise<void>`
117+
118+
119+
120+
#### Returns
121+
122+
Type: `Promise<void>`
123+
124+
125+
117126
### `reset(clearSelection: boolean, blurActiveElement?: boolean) => Promise<void>`
118127
119128
Reset the inline editor (= hide it) and optionally clear its selection.

0 commit comments

Comments
 (0)