()
| 88 | // its element so CodeBlockContent.update() can sync rows without a |
| 89 | // querySelector per keystroke. |
| 90 | createCopyNode() { |
| 91 | const { i18n, options } = this.muya; |
| 92 | const withLineNumbers = options.codeBlockLineNumbers && this._withLineNumbers; |
| 93 | let html = toHTML(renderCopyButton(i18n)); |
| 94 | if (withLineNumbers) |
| 95 | html += lineNumbersWrapperHTML(); |
| 96 | this.domNode!.innerHTML = html; |
| 97 | this.lineNumbersWrapper = withLineNumbers |
| 98 | ? this.domNode!.querySelector<HTMLElement>(`.${LINE_NUMBERS_ROWS_CLASS}`) |
| 99 | : null; |
| 100 | } |
| 101 | |
| 102 | listen() { |
| 103 | const { editor } = this.muya; |
no test coverage detected