@@ -55,9 +55,13 @@ if (!window.customElements.get('md-header')) {
55
55
class MarkdownBoldButtonElement extends MarkdownButtonElement {
56
56
constructor ( ) {
57
57
super ( )
58
- this . setAttribute ( 'hotkey' , 'b' )
59
58
styles . set ( this , { prefix : '**' , suffix : '**' , trimFirst : true } )
60
59
}
60
+
61
+ connectedCallback ( ) {
62
+ super . connectedCallback ( )
63
+ this . setAttribute ( 'hotkey' , 'b' )
64
+ }
61
65
}
62
66
63
67
if ( ! window . customElements . get ( 'md-bold' ) ) {
@@ -68,9 +72,13 @@ if (!window.customElements.get('md-bold')) {
68
72
class MarkdownItalicButtonElement extends MarkdownButtonElement {
69
73
constructor ( ) {
70
74
super ( )
71
- this . setAttribute ( 'hotkey' , 'i' )
72
75
styles . set ( this , { prefix : '_' , suffix : '_' , trimFirst : true } )
73
76
}
77
+
78
+ connectedCallback ( ) {
79
+ super . connectedCallback ( )
80
+ this . setAttribute ( 'hotkey' , 'i' )
81
+ }
74
82
}
75
83
76
84
if ( ! window . customElements . get ( 'md-italic' ) ) {
@@ -105,9 +113,13 @@ if (!window.customElements.get('md-code')) {
105
113
class MarkdownLinkButtonElement extends MarkdownButtonElement {
106
114
constructor ( ) {
107
115
super ( )
108
- this . setAttribute ( 'hotkey' , 'k' )
109
116
styles . set ( this , { prefix : '[' , suffix : '](url)' , replaceNext : 'url' , scanFor : 'https?://' } )
110
117
}
118
+
119
+ connectedCallback ( ) {
120
+ super . connectedCallback ( )
121
+ this . setAttribute ( 'hotkey' , 'k' )
122
+ }
111
123
}
112
124
113
125
if ( ! window . customElements . get ( 'md-link' ) ) {
@@ -142,9 +154,13 @@ if (!window.customElements.get('md-ordered-list')) {
142
154
class MarkdownTaskListButtonElement extends MarkdownButtonElement {
143
155
constructor ( ) {
144
156
super ( )
145
- this . setAttribute ( 'hotkey' , 'L' )
146
157
styles . set ( this , { prefix : '- [ ] ' , multiline : true , surroundWithNewlines : true } )
147
158
}
159
+
160
+ connectedCallback ( ) {
161
+ super . connectedCallback ( )
162
+ this . setAttribute ( 'hotkey' , 'L' )
163
+ }
148
164
}
149
165
150
166
if ( ! window . customElements . get ( 'md-task-list' ) ) {
0 commit comments