Browse Source

Move RTE config to TS

pull/4746/head
Artur Arseniev 4 years ago
parent
commit
c004423eae
  1. 10
      src/rich_text_editor/config/config.js
  2. 27
      src/rich_text_editor/config/config.ts

10
src/rich_text_editor/config/config.js

@ -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'],
};

27
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;
Loading…
Cancel
Save