Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support using "clipboard" as argument for text and header manipulation functions #183

Closed
RealRaven2000 opened this issue May 15, 2022 · 5 comments
Assignees

Comments

@RealRaven2000
Copy link
Owner

New feature to set headers based on the clipboard contents, for example:

%header.set(to,clipboard)%
%header.append(to,clipboard)%

it could also be useful like this:

%replaceText(regularExpression,clipboard)%
%replaceQuotedText(regularExpression,clipboard)%
@RealRaven2000 RealRaven2000 self-assigned this May 15, 2022
@RealRaven2000 RealRaven2000 changed the title Support using "clipboard" as argument for header manipulation functions Support using "clipboard" as argument for text and header manipulation functions May 15, 2022
@RealRaven2000
Copy link
Owner Author

Here is a first test version:

smartTemplate-fx-3.11.1pre8.zip

To tryout this version, download the zip file and then drag it into Thunderbird Add-ons Manager (without extracting)

@RealRaven2000
Copy link
Owner Author

There was a problem parsing the clipboard parameter and it got lost so here is a working version:

smartTemplate-fx-3.11.1pre9.zip

To test this version, download the zip file and then drag it into Thunderbird Add-ons Manager (without extracting)

Here is a test template file I used. This is meant to be used with any email address in the clipboard, replying to (or forwarding) an email. The email I replied to contained also the text "Hello Daily!" which will be with "Hello (clipboard-contents)!" in the quoted portion of the mail.

%replaceText("email-here",clipboard)%
%replaceQuotedText("Daily",clipboard)%
<h1> Clipboard Functions </h1>
%header.append(to,clipboard)%
<p>Enter email here: email-here</p>

@gregbythebeach
Copy link

gregbythebeach commented May 16, 2022

The https://smarttemplate-fx-3.11.1pre9.zip/ worked perfect for me, only tested it a few times so far, but I used %header.set(to,clipboard)%

@RealRaven2000
Copy link
Owner Author

Implemented in 3.12.1 on 28/06/2022

@RealRaven2000
Copy link
Owner Author

Please also see issue #210, which fixes issues when using clipboard multiple times. it would be great if you could download the prerelease to test if it still works as expected after modifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants