Issue #2241Opened September 4, 2019by adriangroch0 reactions

[QUESTION] Is this the expected behaviour of the RichTextEditor?

Question

When the rte section of the editor config is defined, I'm assuming that the defined default actions should reflect the actions array:

const editor = grapesjs.init({
  // ...
  rte: {
    actions: ['bold']
  }
});

Meaning that this should should only render the bold action

Instead all default actions are instantiated: 'bold', 'italic', 'underline', 'strikethrough', 'link' See: https://codesandbox.io/s/pedantic-sky-qs5qj

Additionally, I've cloned the branch locally, and have replaced the actions array in src/rich_text_editor/config/config.js:

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']
  actions: []
};

And the same behavior is present.

Is this the expected default behavior, or am I missing something?

Answers (1)

artfSeptember 6, 20190 reactions

mmm wrong key in docs... it should be

const editor = grapesjs.init({
  // ...
  richTextEditor: {
    actions: ['bold']
  }
});

thanks for the report

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.