From 54ccfd70098f696cda61b85cd48838688053df67 Mon Sep 17 00:00:00 2001 From: Daniel Lautzenheiser Date: Wed, 26 Oct 2022 14:59:09 -0400 Subject: [PATCH] Remove unused editor config items --- core/src/interface.ts | 5 ----- core/src/widgets/markdown/index.ts | 4 ---- core/src/widgets/markdown/schema.ts | 27 ------------------------ website/content/docs/widget-markdown.mdx | 4 ---- 4 files changed, 40 deletions(-) delete mode 100644 core/src/widgets/markdown/schema.ts diff --git a/core/src/interface.ts b/core/src/interface.ts index 42a65fe0..d402279b 100644 --- a/core/src/interface.ts +++ b/core/src/interface.ts @@ -621,11 +621,6 @@ export interface MarkdownField extends BaseField { widget: 'markdown'; default?: string; - minimal?: boolean; - buttons?: MarkdownWidgetButton[]; - editor_components?: string[]; - - sanitize_preview?: boolean; media_library?: MediaLibrary; media_folder?: string; public_folder?: string; diff --git a/core/src/widgets/markdown/index.ts b/core/src/widgets/markdown/index.ts index fbb1fe46..357ee4bb 100644 --- a/core/src/widgets/markdown/index.ts +++ b/core/src/widgets/markdown/index.ts @@ -1,6 +1,5 @@ import controlComponent from './MarkdownControl'; import previewComponent from './MarkdownPreview'; -import schema from './schema'; import type { MarkdownField, WidgetParam } from '../../interface'; @@ -9,9 +8,6 @@ const MarkdownWidget = (): WidgetParam => { name: 'markdown', controlComponent, previewComponent, - options: { - schema, - }, }; }; diff --git a/core/src/widgets/markdown/schema.ts b/core/src/widgets/markdown/schema.ts deleted file mode 100644 index 86ffd377..00000000 --- a/core/src/widgets/markdown/schema.ts +++ /dev/null @@ -1,27 +0,0 @@ -export default { - properties: { - minimal: { type: 'boolean' }, - buttons: { - type: 'array', - items: { - type: 'string', - enum: [ - 'bold', - 'italic', - 'code', - 'link', - 'heading-one', - 'heading-two', - 'heading-three', - 'heading-four', - 'heading-five', - 'heading-six', - 'quote', - 'bulleted-list', - 'numbered-list', - ], - }, - }, - editor_components: { type: 'array', items: { type: 'string' } }, - }, -}; diff --git a/website/content/docs/widget-markdown.mdx b/website/content/docs/widget-markdown.mdx index cc46293b..8f815ce2 100644 --- a/website/content/docs/widget-markdown.mdx +++ b/website/content/docs/widget-markdown.mdx @@ -13,10 +13,6 @@ The markdown widget provides a full fledged text editor allowing users to format * **Options:** * `default`: accepts markdown content - * `minimal`: accepts a boolean value, `false` by default. Sets the widget height to minimum possible. - * `buttons`: an array of strings representing the formatting buttons to display (all shown by default). Buttons include: `bold`, `italic`, `code`, `link`, `heading-one`, `heading-two`, `heading-three`, `heading-four`, `heading-five`, `heading-six`, `quote`, `bulleted-list`, and `numbered-list`. - * `editor_components`: an array of strings representing the names of editor components to display (all shown by default). Static CMS includes `image` and `code-block` editor components by default, and custom components may be [created and registered](/docs/custom-widgets/#registereditorcomponent). - * `sanitize_preview`: accepts a boolean value, `false` by default. Sanitizes markdown preview to prevent XSS attacks - might alter the preview content. * **Example:** ```yaml