@blinkk/editor
Version:
Structured content editor with live previews.
44 lines (43 loc) • 1.55 kB
TypeScript
import { BasePart, Part } from '..';
import { EditorConfig, SelectiveEditor, TemplateResult } from '@blinkk/selective-edit';
import { DataStorage } from '../../../utility/dataStorage';
import { EditorState } from '../../../editor/state';
import { LiveEditor } from '../../editor';
export declare const STORAGE_CONTENT_SECTION = "live.content.section";
export interface ContentSectionPartConfig {
/**
* Is this section the default visible?
*/
isDefaultSection?: boolean;
/**
* Configuration for creating the selective editor.
*/
selectiveConfig: EditorConfig;
/**
* State class for working with editor state.
*/
state: EditorState;
/**
* Storage class for working with settings.
*/
storage: DataStorage;
}
export declare class ContentSectionPart extends BasePart implements Part {
config: ContentSectionPartConfig;
isProcessing?: boolean;
isVisible?: boolean;
selective: SelectiveEditor;
constructor(config: ContentSectionPartConfig);
get canChangeSection(): boolean;
classesForAction(): Record<string, boolean>;
classesForPart(): Record<string, boolean>;
handleAction(evt: Event): void;
get isActionDisabled(): boolean;
get label(): string;
labelForAction(editor: LiveEditor): string;
get section(): string;
template(editor: LiveEditor): TemplateResult;
templateAction(editor: LiveEditor): TemplateResult;
templateContent(editor: LiveEditor): TemplateResult;
templateStatus(editor: LiveEditor): TemplateResult;
}