@@ -55,9 +55,13 @@ if (!window.customElements.get('md-header')) {
5555class MarkdownBoldButtonElement extends MarkdownButtonElement {
5656 constructor ( ) {
5757 super ( )
58- this . setAttribute ( 'hotkey' , 'b' )
5958 styles . set ( this , { prefix : '**' , suffix : '**' , trimFirst : true } )
6059 }
60+
61+ connectedCallback ( ) {
62+ super . connectedCallback ( )
63+ this . setAttribute ( 'hotkey' , 'b' )
64+ }
6165}
6266
6367if ( ! window . customElements . get ( 'md-bold' ) ) {
@@ -68,9 +72,13 @@ if (!window.customElements.get('md-bold')) {
6872class MarkdownItalicButtonElement extends MarkdownButtonElement {
6973 constructor ( ) {
7074 super ( )
71- this . setAttribute ( 'hotkey' , 'i' )
7275 styles . set ( this , { prefix : '_' , suffix : '_' , trimFirst : true } )
7376 }
77+
78+ connectedCallback ( ) {
79+ super . connectedCallback ( )
80+ this . setAttribute ( 'hotkey' , 'i' )
81+ }
7482}
7583
7684if ( ! window . customElements . get ( 'md-italic' ) ) {
@@ -105,9 +113,13 @@ if (!window.customElements.get('md-code')) {
105113class MarkdownLinkButtonElement extends MarkdownButtonElement {
106114 constructor ( ) {
107115 super ( )
108- this . setAttribute ( 'hotkey' , 'k' )
109116 styles . set ( this , { prefix : '[' , suffix : '](url)' , replaceNext : 'url' , scanFor : 'https?://' } )
110117 }
118+
119+ connectedCallback ( ) {
120+ super . connectedCallback ( )
121+ this . setAttribute ( 'hotkey' , 'k' )
122+ }
111123}
112124
113125if ( ! window . customElements . get ( 'md-link' ) ) {
@@ -142,9 +154,13 @@ if (!window.customElements.get('md-ordered-list')) {
142154class MarkdownTaskListButtonElement extends MarkdownButtonElement {
143155 constructor ( ) {
144156 super ( )
145- this . setAttribute ( 'hotkey' , 'L' )
146157 styles . set ( this , { prefix : '- [ ] ' , multiline : true , surroundWithNewlines : true } )
147158 }
159+
160+ connectedCallback ( ) {
161+ super . connectedCallback ( )
162+ this . setAttribute ( 'hotkey' , 'L' )
163+ }
148164}
149165
150166if ( ! window . customElements . get ( 'md-task-list' ) ) {
0 commit comments