# Kirby tags/ email encryption via writer

**URL:** <https://forum.getkirby.com/t/kirby-tags-email-encryption-via-writer/27017>\
**Category:** Questions\
**Tags:** v3\
**Created:** [November 15, 2022, 12:29pm UTC](https://forum.getkirby.com/t/kirby-tags-email-encryption-via-writer/27017 "2022-11-15T12:29:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nelli](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/nelli/32/13012_2.png) [@Nelli](https://forum.getkirby.com/u/Nelli)\
**Post date:** [November 15, 2022, 12:29pm UTC](https://forum.getkirby.com/t/kirby-tags-email-encryption-via-writer/27017/1 "2022-11-15T12:29:38Z")

</div>

Hello! I use the WYSIWYG writer for my text blocks and I’m asking myself if it is possible to use Kirby tags inside the writer?

Example:  
I want to add a class to a link, like this: (link:/page text:Link text class:button)

This only works if I render \<?= $page-\>text()-\>kt() ?\> instead of \<?= $page-\>text() ?\>, right?  
Are there any disadvantages to using Kirbytext for Writer content?

What I’m wondering about most is how to encrypt email addresses via writer. If I use the Kirby tag (email:…) here, the email address is rendered as kt() and automatically encrypted. If I use the email function in the writer, it’s not happening.

Glad about some input! 🙂

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [November 15, 2022, 1:02pm UTC](https://forum.getkirby.com/t/kirby-tags-email-encryption-via-writer/27017/2 "2022-11-15T13:02:55Z")

</div>

Hm, if you want to use KirbyTags, why don’t you use a textarea/markdown field in the first place.

Having said that, I’m not aware of issues with using Kirbytags in a writer field.

---

<div class="post-metadata">

**Author:** ![helloanselm](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/helloanselm/32/11487_2.png) [@helloanselm](https://forum.getkirby.com/u/helloanselm)\
**Post date:** [November 16, 2022, 7:24am UTC](https://forum.getkirby.com/t/kirby-tags-email-encryption-via-writer/27017/3 "2022-11-16T07:24:02Z")

</div>

> [@Nelli](#):
>
> This only works if I render \<?= $page-\>text()-\>kt() ?\> instead of \<?= $page-\>text() ?\>, right?  
> Are there any disadvantages to using Kirbytext for Writer content?

If this works as @texnixe assumes, you’d need to use the `kt()` function to convert it properly, yes.

[quote=“Nelli, post:1, topic:27017”]  
What I’m wondering about most is how to encrypt email addresses via writer. If I use the Kirby tag (email:…) here, the email address is rendered as kt() and automatically encrypted. If I use the email function in the writer, it’s not happening.[/quote]

What do you mean by encrypted? Usually, Kirby does nothing else than setting this as a `mailto:` link but no encryption. That is because Kirby doesn’t interfere with the frontend and an base64 encrypted string needs to be decrypted via JavaScript in the client again.

Maybe a better idea would be to extend the writer by adding one of these plugins:

- [GitHub - coralic/kirby-extended-writer: ✏️ Extended Writer supercharges Kirby's built-in Writer field with useful marks, nodes and features you wish were built-in](https://github.com/coralic/kirby-extended-writer)
- [GitHub - johannschopplich/kirby-writer-marks: Custom marks for Kirby's writer field – footnote mark included](https://github.com/johannschopplich/kirby-writer-marks)  
Disclaimer: I have no idea if they’re compatible with latest Kirby.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [November 16, 2022, 9:32am UTC](https://forum.getkirby.com/t/kirby-tags-email-encryption-via-writer/27017/4 "2022-11-16T09:32:53Z")

</div>

> [@helloanselm](#):
>
> What do you mean by encrypted?

If you use the email KirbyTag, Kirby encodes (Str::encode()) the email address, not really encryption, rather obfuscation.
