Browse Source

Update docs for richTextEditor config. Closes #2241

pull/2253/head
Artur Arseniev 7 years ago
parent
commit
6e7a38140f
  1. 2
      src/editor/config/config.js
  2. 18
      src/rich_text_editor/index.js

2
src/editor/config/config.js

@ -166,7 +166,7 @@ export default {
storageManager: {},
//Configurations for Rich Text Editor
rte: {},
richTextEditor: {},
//Configurations for DomComponents
domComponents: {},

18
src/rich_text_editor/index.js

@ -5,7 +5,7 @@
* You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/rich_text_editor/config/config.js)
* ```js
* const editor = grapesjs.init({
* rte: {
* richTextEditor: {
* // options
* }
* })
@ -52,20 +52,20 @@ export default () => {
*/
name: 'RichTextEditor',
getConfig() {
return config;
},
/**
* Initialize module. Automatically called with a new instance of the editor
* @param {Object} opts Options
* @private
*/
init(opts = {}) {
config = opts;
for (let name in defaults) {
if (!(name in config)) {
config[name] = defaults[name];
}
}
config = {
...defaults,
...opts
};
const ppfx = config.pStylePrefix;
if (ppfx) {

Loading…
Cancel
Save