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
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)