(languageId: false | string)
| 372 | } |
| 373 | |
| 374 | setLanguage(languageId: false | string) { |
| 375 | if (languageId) { |
| 376 | this.options.enableToggle('wrap', false); |
| 377 | monaco.editor.setModelLanguage(unwrap(this.editor.getModel()), languageId); |
| 378 | this.editor.setValue(''); |
| 379 | this.fontScale.setTarget(this.editor); |
| 380 | $(this.plainContentRoot).hide(); |
| 381 | $(this.editorContentRoot).show(); |
| 382 | } else { |
| 383 | this.options.enableToggle('wrap', true); |
| 384 | this.plainContentRoot.empty(); |
| 385 | this.fontScale.setTarget('.content'); |
| 386 | $(this.editorContentRoot).hide(); |
| 387 | $(this.plainContentRoot).show(); |
| 388 | } |
| 389 | } |
| 390 | |
| 391 | clickableUrls(text: string) { |
| 392 | return text.replace( |
no test coverage detected