on-codemerge
Version:
A WYSIWYG editor for on-codemerge is a user-friendly interface that allows users to edit and view their code in real time, exactly as it will appear in the final product
24 lines (23 loc) • 710 B
TypeScript
import { Command } from '../../../core/commands/Command';
import { HTMLEditor } from '../../../core/HTMLEditor';
export interface BlockCommandData {
type?: 'text' | 'container' | 'split';
content?: string;
direction?: 'horizontal' | 'vertical';
}
export declare class BlockCommand implements Command {
name: string;
private editor;
private previousContent;
private insertedBlock;
constructor(editor: HTMLEditor);
execute(data?: BlockCommandData): void;
undo(): void;
redo(): void;
private createTextBlock;
private createContainerBlock;
private createSplitContainer;
private createRangeAtEnd;
private insertBlockAtRange;
private focusBlock;
}