# Templating functionality

**URL:** <https://forum.bubble.io/t/templating-functionality/143826>\
**Category:** Questions\
**Created:** [March 29, 2021, 11:27pm UTC](https://forum.bubble.io/t/templating-functionality/143826 "2021-03-29T23:27:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![italogmoura](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/italogmoura/32/102621_2.png) [@italogmoura](https://forum.bubble.io/u/italogmoura)\
**Post date:** [March 29, 2021, 11:27pm UTC](https://forum.bubble.io/t/templating-functionality/143826/1 "2021-03-29T23:27:50Z")

</div>

Is it possible to create document templates on Bubble? As observed by @zelus_pudding, the new Rich Text Editor theoretically can do this because is based on Quill.

There is any way to create document templates on Bubble without the Text Editor?

This would open a lot of possibilities: Invoice/Receipt generation, Email templates, Invitations and more that an end user can customize. It would enable the creation of applications like [Hubspot]].

![](https://cdn2.hubspot.net/hub/2832391/hubfs/Conversations/Templates/sales-email-template-create-new-template.png?width=700&name=sales-email-template-create-new-template.png)

 ![](https://us1.discourse-cdn.com/bubble/original/3X/a/d/ad9b34555ebd60d2fc3d8781ec80580e6ea34f03.png)

---

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [March 30, 2021, 12:08am UTC](https://forum.bubble.io/t/templating-functionality/143826/2 "2021-03-30T00:08:18Z")

</div>

Hey @italogmoura 👋

I have done this before using tags like $firstName$ $lastName$ and then when sending the email you can do a find and replace for the actual information. It does work. I can imagine you can make it more user friendly by adding colors or using a plugin too. Might be worth looking at some tag plugins to see what they can do. Like this maybe? [Tagger Plugin | Bubble](https://bubble.io/plugin/tagger-1507658968231x782106515828375600)

If Bubble can open the Rich Text Editor to do this, it would be really helpful. Maybe add it to the [idea board](https://bubble.io/ideaboard).

Hope that helps! 😊

@j805 [www.NoCodeMinute.com](http://www.nocodeminute.com/)

For All Your No-Code Education Needs:

- One-on-One Tutoring
- eLearning Hub
- Video Tutorials

---

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [March 30, 2021, 6:14am UTC](https://forum.bubble.io/t/templating-functionality/143826/3 "2021-03-30T06:14:04Z")

</div>

Check out the example linked in this thread to see something like this in action

> [@\[UPDATE v2.3.1\] Sudsy Page (meets the urge to merge)](http://forum.bubble.io/t/update-v2-3-1-sudsy-page-meets-the-urge-to-merge/142508):
>
> Greetings, Bubblonians! wink [icon-sudsy-page\_500] Just wanted to announce an update to my flagship plug-in, [Sudsy Page](https://tech-tonic.co/solution/sudsy-page/). It’s been serving me well since [it was introduced](http://forum.bubble.io/t/updated-v2-2-0-sudsy-page-router-for-seo-friendly-clean-urls-by-tech-tonic/52350), but a recent project presented an opportunity to extend its capabilities. Sudsy has always automatically recognized Bubble’s native Link elements, but now it can be configured to recognize any links on the page. This is quite handy if you want to trigger intra-page workflows (with no page reload) from links located inside…

---

<div class="post-metadata">

**Author:** ![sudsy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sudsy/32/114637_2.png) [@sudsy](https://forum.bubble.io/u/sudsy)\
**Post date:** [March 30, 2021, 2:31pm UTC](https://forum.bubble.io/t/templating-functionality/143826/4 "2021-03-30T14:31:33Z")

</div>

> [@italogmoura](#):
>
> There is any way to create document templates on Bubble without the Text Editor?

Yes, it’s totally possible. It can work with the Rich Text Editor (RTE) with **no plugins required** ; and it can be done in **pure native Bubble**. The contents of any input (including a RTE) can be saved to the DB. And as @J805 points out, it’s just a simple find and replace operation. You define the token, so you just search for it and replace it with whatever text you want.

My [Dynamic Data Merge](https://tt-examples.bubbleapps.io/dynamic-data-merge) example (thanks for the mention, @boston85719) takes this to the next level by updating the merged result in real time with content pulled from the DB. A plug-in IS used to enable link clicks to display a popup without reloading the page, but that’s it. Actually saving the new text (or selected option) is again handled in pure Bubble by simply looping through the tokens and replacing them. (Yes, it’s possible to loop/iterate over a list of things using pure Bubble despite what you might read elsewhere on the forum.) This allows the user to replace content directly in the merged result.

This functionality was originally developed as a proof-of-concept for a copywriting app, but it has potential uses well beyond that. If I get a chance, I’ll share the technique I used.

-Steve

---

<div class="post-metadata">

**Author:** ![italogmoura](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/italogmoura/32/102621_2.png) [@italogmoura](https://forum.bubble.io/u/italogmoura)\
**Post date:** [March 30, 2021, 3:21pm UTC](https://forum.bubble.io/t/templating-functionality/143826/5 "2021-03-30T15:21:19Z")

</div>

Can you share an editable Bubble link? I would like to study how do you implement this example.
