Issue #2144💬 AnsweredOpened July 17, 2019by mohammed-gaber-ramadan1 reactions

How to create custom element

快速解答by mohammed-gaber-ramadan1

yes, i will do the following : I will use the news letter plugin https://github.com/artf/grapesjs-preset-newsletter and i will use ckeditor plugin https://github.com/artf/grapesjs-plugin-ckeditor and I will add a custom drop down list contains the dynamic fields names in the ckeditor configuration.

Read full answer below ↓

Question

Hi guys,

I'm new in this so I'm sorry for my question.

I'm trying to use grapesjs to edit email templates.

Is it possible to have dynamic fields in the editor ? for example [first name], [last name], [email address] ..etc.

so before I send the email, I will replace those dynamic fields to the real data.

I need somehow to allow the user to use dynamic fields inside the editor.

I appreciate your help.

Thanks

Answers (3)

alikabeer32July 17, 2019

Can you give a short example of a mail that uses it so I can better understand what you mean by a "dynamic field"?

mohammed-gaber-ramadanJuly 17, 2019

For example we have 5 dynamic fields (first name, last name, email,phone, company name) Our user will go to the page to create an email template to be used for example to welcome his clients.

So he will start using the builder to design his email template and while he is doing that he want to drop some of those dynamic fields in hos email template.

For example he will drop text component and write “Dear” and after that he want to drop the dynamic fields (first name , last name)

Thats it, then my application before send this email template to the user clients, will replace those dynamic fields with the real values from database.

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.