UNPKG

superpowers-game-ftext-plugin

Version:

Generic text asset for the Superpowers Game system of Superpowers, the extensible HTML5 2D+3D game engine.

28 lines (23 loc) 820 B
/// <reference path="../typings/codemirror/codemirror.d.ts" /> /// <reference path="./operational-transform.d.ts" /> interface EditCallback { (text: string, origin: string): void; } interface SendOperationCallback { (operation: OperationData): void; } interface TextEditorWidgetOptions { extraKeys?: { [name: string]: string|Function }; editCallback?: EditCallback; mode: string; sendOperationCallback: SendOperationCallback; saveCallback: Function; } declare class fTextEditorWidget { codeMirrorInstance: CodeMirror.EditorFromTextArea; clientId: number; constructor(projectClient: SupClient.ProjectClient, clientId: number, textArea: HTMLTextAreaElement, options: TextEditorWidgetOptions); setText(text: string): void; receiveEditText(operationData: OperationData): void; clear(): void; }