Can't set property's name
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Read full answer below ↓Question
https://github.com/artf/grapesjs/issues/1398#issuecomment-417954677
why i can't set any property ? i try to update dog's name into 'cat', but i can't make it. but followed your example code. both set({ name: 'cat' }) and set('name', 'cat').
the only reason i have to update properties' name is because i want to change them into chinese. i read many issues about non-english language support, and you said set property new name is the only way. but it doesn't work.
thanks
`
const editor = grapesjs.init({
container: '#gjs',
components: '<div class="txt-red">Hello world!</div>',
style: '.txt-red{color: red}',
});
const styleManager = editor.StyleManager;
var sector = styleManager.addSector('mySector', {
name: 'My sector',
open: true,
properties: [{ name: 'dog' }]
});
var property = styleManager.getProperty('mySector', 'dog').set('name', 'cat')
console.log(property)
`


Answers (1)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1109
[QUESTION] Column blocks not droppable in canvas
Morning @artf :) I'm experiencing an similar problem to this issue. I can't drop any block (text, image, etc.) inside the column block from...
Issue #1391
[BUG] Property slider view default unit
Hey @artf , thanks for the enhancement! The implementation works as expected with some properties (font-size, border-radius, ...), but not...
Issue #1688
on set model content property image and text written in content is not editable in grapejs canvas.
WARNING READ and FOLLOW next 5 steps, then REMOVE them before posting the issueFollow CONTRIBUTING Guidelines https://github.com/artf/grape...
Issue #792
Script property using function don't work with blocks
In Components & JS docs there's this example: This works perfectly. But I couldn't use a function instead of a string in script, as is said...
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 →Related tutorials
In-depth guides on the same topic.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.