import { ChildrenLike, VirtualDOM, CSSAttribute } from '@youwol/rx-vdom'; /** * Represents a text view. * * The text provided is interpreted as MarkDown and can include latex equations. * * * display(new Views.Text('**a simple example**')) * display(new Views.Text(String.raw`**including latex inlined**: \(ax^2 + bx + c = 0\)`)) * display(new Views.Text(String.raw`**including latex**: $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$`)) * * * Fine-tuning of element's class & style is also possible. */ export declare class Text implements VirtualDOM<'div'> { readonly tag = "div"; /** * Classes associated to the view. * Can be completed from constructor. */ readonly class: string; readonly children: ChildrenLike; /** * Style elements. * Can be completed from constructor. */ readonly style: {}; connectedCallback: (e: HTMLElement) => void; /** * * @param text Text to be displayed, can include Latex equation. * @param options Style & class attributes to append to the defaults. */ constructor(text: string, options?: { style: CSSAttribute; class: string; }); }