diff --git a/src/rich_text_editor/config/config.js b/src/rich_text_editor/config/config.js deleted file mode 100644 index 2c24c3c40..000000000 --- a/src/rich_text_editor/config/config.js +++ /dev/null @@ -1,10 +0,0 @@ -export default { - stylePrefix: 'rte-', - - // If true, moves the toolbar below the element when the top canvas - // edge is reached - adjustToolbar: 1, - - // Default RTE actions - actions: ['bold', 'italic', 'underline', 'strikethrough', 'link', 'wrap'], -}; diff --git a/src/rich_text_editor/config/config.ts b/src/rich_text_editor/config/config.ts new file mode 100644 index 000000000..ea0d0341d --- /dev/null +++ b/src/rich_text_editor/config/config.ts @@ -0,0 +1,27 @@ +export interface RichTextEditorConfig { + /** + * Class name prefix for styles + * @default 'rte-' + */ + stylePrefix?: string; + + /** + * If true, moves the toolbar below the element when the top canvas edge is reached. + * @default true + */ + adjustToolbar?: boolean; + + /** + * Default RTE actions. + * @default ['bold', 'italic', 'underline', 'strikethrough', 'link', 'wrap'] + */ + actions?: string[]; +} + +const config: RichTextEditorConfig = { + stylePrefix: 'rte-', + adjustToolbar: true, + actions: ['bold', 'italic', 'underline', 'strikethrough', 'link', 'wrap'], +}; + +export default config;