I am still new to TiddlyWiki macros.
Browser : Chrome
OS: Windows 11
TiddlyWiki version: 5.3.5
I tried to make macro that can copy the text with WikiText formatting or any HTML code into clipboard.
But the copied output should be plain text.
<!------------------ MACROS DEFINITION ----------------->
\define text-to-copy(sentence)
<!-- I want to `$sentence$` variable to be plain text when copy even the text has style formatting-->
<<copy-to-clipboard """$sentence$""" style="position;relative; float:right;">>
<div style="background-color: #f5f5f5; border: 1px solid #8D8D8D;">
$sentence$
</div>
\end
<!------------------------------------------------------------>
<!------------------ EXAMPLE ----------------->
<<text-to-copy """This is @@color:red;red@@ and ''bold''.""">>
<!------------------------------------------------------------>
The appearance is like below image.
My desired output when copied to clipboard is only plain text This is red and bold
NOT includes the WikiText like This is @@color:red;red@@ and ''bold''.
Can anyone help me on this or any reference that I can try? Thanks!