#175 - Simplified snippets

This commit is contained in:
Elio Struyf
2022-03-11 13:53:33 +01:00
parent f77dce3566
commit 6ab6dda1da
16 changed files with 153 additions and 1116 deletions
-7
View File
@@ -1,7 +0,0 @@
export interface SnippetField {
name: string;
value: string;
type: 'text' | 'textarea' | 'select';
tmString: string;
options?: string[];
}
+20
View File
@@ -0,0 +1,20 @@
import { Field } from "./PanelSettings";
export interface Snippets {
[snippetName: string]: Snippet;
}
export interface Snippet {
description: string;
body: string[] | string;
fields: SnippetField[];
openingTags?: string;
closingTags?: string;
}
export type SnippetSpecialPlaceholders = "FM_SELECTED_TEXT" | string;
export interface SnippetField extends Field {
default?: SnippetSpecialPlaceholders;
value?: any;
}
+1 -1
View File
@@ -10,7 +10,7 @@ export * from './DraftField';
export * from './Framework';
export * from './MediaPaths';
export * from './PanelSettings';
export * from './SnippetField';
export * from './Snippets';
export * from './SortOrder';
export * from './SortType';
export * from './SortingSetting';