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 #3218
How to add new HTML element with inline styles?
I would like to add a new HTML element, with inline styles, around the rte.selection(). With the following example, the HTML is OK, but pro...
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 #5914
SVG containing mask and image doesn't render correctly
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Microsoft Edge 125.0.2535.51 Reproducible...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.