ng2-prism
Version:
An Angular2 codeblock highlighting component using Prismjs.
54 lines (53 loc) • 1.62 kB
TypeScript
import { AfterViewChecked, AfterContentChecked, ElementRef } from 'angular2/core';
import 'prismjs/prism';
import { OnSourceChanged, OnSourceError, OnSourceReceived, Response } from 'ng2-src-directive/src';
export declare class CodeblockComponent implements AfterViewChecked, AfterContentChecked, OnSourceChanged, OnSourceError, OnSourceReceived {
private _elementRef;
contentEl: any;
codeRenderer: any;
constructor(_elementRef: ElementRef);
ngAfterContentChecked(): void;
ngAfterViewChecked(): void;
content: string;
code: string;
lineNumbers: boolean;
shouldDisplayLineNumbers(): boolean;
language: string;
theme: string;
static THEMES: Array<string>;
DEFAULT_THEME: string;
DEFAULT_SHELL_THEME: string;
_sourced: boolean;
sourceChanged(url: string): void;
sourceReceived(res: Response): void;
sourceError(error: any): void;
static EXTENSION_MAP: {
'js': string;
'ts': string;
'html': string;
'svg': string;
'xml': string;
'md': string;
'py': string;
'rb': string;
'ps1': string;
'psm1': string;
};
shell: string;
isShell(): boolean;
static SHELL_TYPES: Array<string>;
prompt: string;
outputLines: string;
output: string;
message(text: string): void;
bind(text: string): string;
_code: string;
_language: string;
_showingMessage: boolean;
_languageSet: boolean;
_lineNumbers: boolean;
_theme: string;
_changed: boolean;
_shellType: string;
_replaceTagsInMultiline(text: string): string;
}