-
Notifications
You must be signed in to change notification settings - Fork 9
/
highlight.component.d.ts
64 lines (64 loc) · 2 KB
/
highlight.component.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import { AfterViewInit, ElementRef, EventEmitter, Renderer2, ChangeDetectorRef, AfterViewChecked } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
import { MatTooltip } from '@angular/material/tooltip';
import { ICopyCodeTooltips } from '.';
export declare class TdHighlightComponent implements AfterViewInit, AfterViewChecked {
private _renderer;
private _elementRef;
private _domSanitizer;
private cdr;
private _initialized;
private _content;
private _lang;
/**
* content?: string
*
* Code content to be parsed as highlighted html.
* Used to load data dynamically.
*
* e.g. `.html`, `.ts` , etc.
*/
set content(content: string);
/**
* copyCodeToClipboard?: boolean
*
* Display copy button on code snippets to copy code to clipboard.
*/
copyCodeToClipboard: boolean;
/**
* copyCodeTooltips?: ICopyCodeTooltips
*
* Tooltips for copy button to copy and upon copying.
*/
copyCodeTooltips: ICopyCodeTooltips;
/**
* lang?: string
*
* Language of the code content to be parsed as highlighted html.
* Defaults to `typescript`
*
* e.g. `typescript`, `html` , etc.
*/
set codeLang(lang: string);
/** @deprecated - removed completely @4.0.0 */
set lang(lang: string);
copyContent: string;
/**
* contentReady?: function
* Event emitted after the highlight content rendering is finished.
*/
contentReady: EventEmitter<void>;
highlightComp: ElementRef;
copyComp: ElementRef;
tooltip: MatTooltip;
constructor(_renderer: Renderer2, _elementRef: ElementRef, _domSanitizer: DomSanitizer, cdr: ChangeDetectorRef);
ngAfterViewChecked(): void;
ngAfterViewInit(): void;
setLanguage(lang: string): void;
/**
* General method to parse a string of code into HTML Elements and load them into the container
*/
private _loadContent;
private _elementFromString;
private _render;
}