How to properly add custom blocks under 'Symbols' tab in GrapesJS Studio SDK? #6481
Unanswered
Aditya-devloper
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm using @grapesjs/studio-sdk/react and trying to add custom components like Header, Footer, etc., inside the 'Symbols' tab (not the 'Regular' tab).
I set the category like this:
function App() {
const onEditorReady = (editor) => {
// Log available categories to debug
console.log("Available categories:", editor.BlockManager.getCategories());
};
return (
<>
<StudioEditor
options={{
onReady: onEditorReady,
i18n: {
locales: {
en: {
blockManager: {
notFound: "No blocks found",
blocks: "Blocks",
add: "Add more blocks",
search: "Search...",
types: {
regular: "Regular",
symbols: "Components",
},
},
},
},
},
project: {
type: "web",
default: {
pages: [
{ name: "Home", component: "
Home page
" },{ name: "About", component: "
About page
" },{ name: "Contact", component: "
Contact page
" },],
},
},
}}
/>
</>
);
}
But still, all my custom blocks are showing under the 'Regular' tab instead of 'Symbols'.
❓How can I properly add blocks/components so they show under the 'Symbols' tab?
I'm using the onEditorReady function to add blocks through editor.BlockManager.add(...).
Please guide 🙏
Beta Was this translation helpful? Give feedback.
All reactions