I am encountering an issue with buttons in the textarea field, from Kirby panel. When I select text, click the “link” button and add the URL to add, the link simply doesn’t work and instead it returns the plain text with the following format
(link: https://facebook.com text: my text)
Same with the other buttons, like bold, which returns **mytext**
As additional information, this textarea is placed inside a data-attribute and it appears on a lightbox (lightgallery.js). Here’s the code <img src="my image.jpg" data-sub-html="<?= $project->info() ?>">
This is the second small site that I build with Kirby, so I apologize if the solution for this is just behind the corner
@texnixe there was a problem on my side which consisted simply in MAMP not updating. Now the buttons work, but the link still returns the same plain text value. I’ll show you input and output.
data attribute may be a problem, but some of them like italics work good so I don’t quite understand. May it be a problem with the double strings inside the <a href=""></a>, and if yes how could I change the formatting into <a href=' '></a>?
Yes, that’s why I wrote above that you have to either replace or escape the quotes (double strings).
Theoretically, you could also use single quotes for your data attribute and leave the embedded text alone. In any case, this is all a bit fragile, I think, and I wonder if there isn’t a better alternative than embedding the caption via JS.