Issue #2730💬 AnsweredOpened April 22, 2020by Lerdouille0 reactions

Update Traits properties on a plugin

Quick answerby artf

You should be able to do it via i18n module

Read full answer below ↓

Question

Hi,

is it possible to change easily some properties in the Traits configuration of a plugin ? I"m trying to translate some strings in the grapesjs-echarts plugin, and i kindy stucked after reading your documentation and looking for the functions to do so...

Could please tell me if it's possible to change some options plugins when it's not implemented by default ?

Regards

Answers (3)

artfApril 23, 2020

You should be able to do it via i18n module

editor.I18n.addMessages({
        en: {
          traitManager: {
            labels: {
				title: 'My Title', // `title` is the name of the trait
			}
          },
        }
      });
LerdouilleApril 24, 2020

Hi, thank you for the answer. I agree with you, it changes indeed the default labels on Traits (. But what about a plugin, or a component not added in the i18n module ? For example, the type "map" include in your initial javascript, how can i update without override your plugin it's properties defi...

LerdouilleApril 27, 2020

Hi again,

any idea to help me to update traits default properties after the plugin initialization ? In my previous sampe, i have a hard coded type 'map' in my grapes.js , i would like to update some traits properties in my html page with some translation and custom values.

Best regards

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.