Skip to content

Commit b8777de

Browse files
committed
docs: add README note about data-md-button
1 parent 434e68c commit b8777de

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@ import '@github/markdown-toolbar-element'
2828
<md-task-list>task-list</md-task-list>
2929
<md-mention>mention</md-mention>
3030
<md-ref>ref</md-ref>
31+
<button data-md-button>Custom button</button>
3132
</markdown-toolbar>
3233
<textarea id="textarea_id"></textarea>
3334
```
3435

36+
Focus management for buttons inside of the toolbar is automatically managed by the toolbar itself. The `md-*` buttons that ship with this package are automatically managed, but custom buttons needs a `data-md-button` attribute added to them, which enrolls them into focus management.
37+
3538
## Browser support
3639

3740
Browsers without native [custom element support][support] require a [polyfill][].

0 commit comments

Comments
 (0)