Issue #637💬 AnsweredOpened December 14, 2017by frank-tenzing1 reactions

Add new block without any hard coding

Quick answerby hoainam12k1

hi @frank-tenzing, I think you should do it on server side, not in the Grapes editor. For example create a manage form for merge tags and send it to Grapes with API-Rich-Text-Editor. This way you can make some merge tags are available for some template only.

Read full answer below ↓

Question

Hi @artf , We are gonna to embed this grapes editor into our portal as an Email editor. As the Email will be sent by the batch process to customers, merge tags will be implemented in order to replace the variables in the template by the actual values such as names, ages, addresses of the customers. At the moment, the merge tags are hardcoded in the code with the approach in https://github.com/artf/grapesjs/issues/481. Because the end users of the editor are non-technical people and as the business is growing more templates will be created with new variables (merge tags), we need to make the m...

Answers (3)

hoainam12kDecember 14, 2017

hi @frank-tenzing, I think you should do it on server side, not in the Grapes editor. For example create a manage form for merge tags and send it to Grapes with API-Rich-Text-Editor. This way you can make some merge tags are available for some template only.

artfDecember 14, 2017

we need to make the merge tags can be added from a button on the panel and then save the added tags to a config file or DB Well, this is up to you building such a thing. The user creates a tag using your New Merge Tags panel and update stuff on your server, then, as already mentioned by @hoainam12k...

lock[bot]September 18, 2019

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.

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 →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.