mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-07-06 01:41:48 +02:00
#175 - Simplified snippets
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
export interface SnippetField {
|
||||
name: string;
|
||||
value: string;
|
||||
type: 'text' | 'textarea' | 'select';
|
||||
tmString: string;
|
||||
options?: string[];
|
||||
}
|
||||
@@ -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
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user