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.
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: