Closed RealRaven2000 closed 2 weeks ago
New parameters that are supported:
plain, text, rtf, unicode, html
for example:%clipboard(text)%
this will make sure that just the visible text is inserted from the clipboard even if there are multiple formats in the clipboard. Without the parameter, the old behavior will try to show the formats in this order or priority:
"text/html", "text/unicode", "text/plain"
This is to ensure background compatibility and to easily support the *clipboard*
inline text when you are using it in a layout snippet, because you may want to have html injected inside this syntax. If the requested flavor in the passed parameter is not available, SmartTemplates will try to retrieve the next one as fallback. So in the case of using
%clipboard(rtf,text,plain)%
it will try for the flavor "text/rtf" first, then "text/univoce", then "text/plain" and then "text/html". It returns the clipboard data wherever it finds content first.
Preview version:
To install version above download zip file and drag the file into Thunderbird Add-ons Manager (do not extract contents, it won't install like that)
Implemented in 4.9 - published 11/11/2024
When reading the clipboard we can have multiple formats, e.g. when copying an email address from an open Composer from the editor we can end up creating a string like this:
Therefore we we need a way to force %clipboard% to return the plain text value instead. At the moment the order of preference is: ["text/html","text/unicode","text/plain"];
Instead I propose adding an optional parameter: "html", "unicode" or "plain" / "text" which would force reading that flavor expolicitely.