[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)
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.
Issue #1671
[Question] Adding html once canvas is cleared.
Hey Artur I'd like to add some default html code when users click clear button. for instance 1 section by default. for clear command, i'm d...
Issue #966
[QUESTION] How to load external CSS file into Grapes Editor?
Hey, During my editor = grapesjs.init(), I want to load an external CSS file into the canvas using @import url(...). So when I use my custo...
Issue #859
[QUESTIONS] Change canvas style
Hi there, I have some question about canvas style, in this case i have config like this. By default i use css with name builder-desktop.css...
Issue #974
[Question] Removing the deviceManager and ViewCode buttons
I'm playing with the default init to try and remove the deviceManager and ViewCode buttons... var editor = grapesjs.init({ showOffsets: 1,...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.