UNPKG

sussudio

Version:

An unofficial VS Code Internal API

21 lines (20 loc) 1.19 kB
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { IKeyboardEvent } from "./keyboardEvent.mjs"; import { IMouseEvent } from "./mouseEvent.mjs"; import { DisposableStore } from "../common/lifecycle.mjs"; export interface IContentActionHandler { callback: (content: string, event: IMouseEvent | IKeyboardEvent) => void; readonly disposables: DisposableStore; } export interface FormattedTextRenderOptions { readonly className?: string; readonly inline?: boolean; readonly actionHandler?: IContentActionHandler; readonly renderCodeSegments?: boolean; } export declare function renderText(text: string, options?: FormattedTextRenderOptions): HTMLElement; export declare function renderFormattedText(formattedText: string, options?: FormattedTextRenderOptions): HTMLElement; export declare function createElement(options: FormattedTextRenderOptions): HTMLElement;