View Full Version : FormattedTextControl - Copy & Paste with formatting - Anyone interested?
jharp
August 10th, 2021, 04:08
OBSOLETE - Version 4.2.2 of FGU now performs these functions natively.
Hello everyone,
I've added an extension to forge that allows copy and paste between formattedtextcontrols with the formatting preserved.
Available at: https://forge.fantasygrounds.com/shop/items/185/view
By default the tool copies the entire source formattedtextcontrol and appends the data at the end of the destination formattedtextcontrol. All of this is hot key triggered. The focus must be in the source when you copy and in the destination when you paste.
Due to the lack of selection support for formattedtextcontrol you can do subsections but it requires the use of some marker text to accomplish. I happen to use:
#FTS# - start position
#FTE# - end position
#FTI# - insert position (if you want it somewhere other than the end of the destination formattedtextcontrol
Releases
v1.0.7
Fix: Now finds formattedtextcontrols in refmanual builder.
Change: Added recursion check to finding of formattedtextcontrol with focus. FTCP aborts search path once it hits 5-levels deep.
v1.0.6
Changed: Moved the configuration of FTCopyPaste to the options menu under Ma's Tools.
v1.0.5
Fix: Focus unable to be found in certain cases.
v1.0.0
Initial release
jharp
August 27th, 2021, 23:52
Confirmed compatible with TEST channel ruleset changes along with new refmanual builder.
Confirmed compatible with v4.1.9
Confirmed compatible with v4.1.5
damned
August 28th, 2021, 01:57
Hah! Very good.
I do something like that in MoreCore and Player Agency but I never thought of using it for this purpose.
jharp
August 28th, 2021, 03:28
From you I take that as a great complement. Thank you.
Jiminimonka
October 31st, 2021, 15:28
Can you give a better example of "how to" please.
jharp
October 31st, 2021, 18:18
Can you give a better example of "how to" please.
1. Setup your hot keys by typing /FTCP copy in the chat panel. Then drag that text to a hot key. Do the same with /FTCP paste
2. With your focus and cursor in a Formatted Text Control that you wish to copy from, press the hot key that is set for /FTCP copy
3. With your focus and cursor now in a Formatted Text Control that you to copy to, press the hot key that is set for /FTCP paste
Bingo done. The copied area is appended to the paste area.
However, if you need to only copy a portion of the source then you must modify the source Formatted Text Control text area by inserting some markers. So in the source Formatted Text Control, insert #FTS# on a line by itself above the area you wish to copy. Insert #FTE# on a line by itself below the area you wish to copy. So it will copy the area between the two markers. Paste as normal.
If you wish to paste in a specific location then insert the marker #FTI# on a line by itself to indicate where the paste should occur. Paste hotkey and it will remove the marker and insert the text from the copy.
There are two convenience functions that you can set to hotkeys if you wish. They are
/FTCP itop - inserts a newline at the top of the control to aid in placing markers
/FTCP ibot - inserts a newline at the bottom of the control to aid in placing markers
These let you get a newline to place markers if required.
Let me know if you need anything else,
Jason
Jiminimonka
November 1st, 2021, 20:46
1. Setup your hot keys by typing /FTCP copy in the chat panel. Then drag that text to a hot key. Do the same with /FTCP paste
2. With your focus and cursor in a Formatted Text Control that you wish to copy from, press the hot key that is set for /FTCP copy
3. With your focus and cursor now in a Formatted Text Control that you to copy to, press the hot key that is set for /FTCP paste
Bingo done. The copied area is appended to the paste area.
However, if you need to only copy a portion of the source then you must modify the source Formatted Text Control text area by inserting some markers. So in the source Formatted Text Control, insert #FTS# on a line by itself above the area you wish to copy. Insert #FTE# on a line by itself below the area you wish to copy. So it will copy the area between the two markers. Paste as normal.
If you wish to paste in a specific location then insert the marker #FTI# on a line by itself to indicate where the paste should occur. Paste hotkey and it will remove the marker and insert the text from the copy.
There are two convenience functions that you can set to hotkeys if you wish. They are
/FTCP itop - inserts a newline at the top of the control to aid in placing markers
/FTCP ibot - inserts a newline at the bottom of the control to aid in placing markers
These let you get a newline to place markers if required.
Let me know if you need anything else,
Jason
Cool, thanks.
Jiminimonka
November 2nd, 2021, 21:07
Confirmed compatible with TEST channel ruleset changes.
Confirmed compatible with v4.1.9
Confirmed compatible with v4.1.5
Update to work with latest TEST build coming soon? Especially with the Reference Manual Tools :)
jharp
November 2nd, 2021, 21:14
I can't see why it wouldn't work but I'll take a look at the reference manual area and confirm.
Edit: Most certainly does not work in the Ref Manual tools so I'll try to fix that today.
Jason
Jiminimonka
November 2nd, 2021, 21:31
I can't see why it wouldn't work but I'll take a look at the reference manual area and confirm.
49775
Getting this error. Which I should have posted initially. Thanks
jharp
November 2nd, 2021, 22:40
1.0.7 is submitted with fix for reference manual builder.
Jiminimonka
November 2nd, 2021, 22:43
1.0.7 is submitted with fix for reference manual builder.
Thanks!
Shannara
December 16th, 2021, 15:01
Does this work with the current update? Or am I just not understanding how to setup hot keys?
jharp
December 16th, 2021, 15:37
Does this work with the current update? Or am I just not understanding how to setup hot keys?
I'll do some more investigation. What area where you trying to copy and paste from?
Edit: Works for me but I've had instances where people are copying from a place I haven't tested with and it has failed. So let me know where you are copying from and pasting to. Any error messages?
As to setup of the hot keys. Simply type "/FTCP copy" in the chat area (don't hit return). Drag that to a hot area on the button. Say F5. F5 is now the copy command and will copy when you have clicked in a formatted text control. Same with "/FTCP paste". Also make certain the extension is loaded when you enter the campaign. It should give a message at load time in the chat window.
Jason
Shannara
December 16th, 2021, 17:18
I'll do some more investigation. What area where you trying to copy and paste from?
Edit: Works for me but I've had instances where people are copying from a place I haven't tested with and it has failed. So let me know where you are copying from and pasting to. Any error messages?
As to setup of the hot keys. Simply type "/FTCP copy" in the chat area (don't hit return). Drag that to a hot area on the button. Say F5. F5 is now the copy command and will copy when you have clicked in a formatted text control. Same with "/FTCP paste". Also make certain the extension is loaded when you enter the campaign. It should give a message at load time in the chat window.
Jason
D'oh! It was just me not understanding. The 'don't hit return' was the remedial course that I needed. Thank you so much!
jharp
December 16th, 2021, 18:46
Glad you got it working.
jharp
May 26th, 2022, 04:06
My FG Forge account is in restricted mode at the moment. I expect it will be remedied soon but in the meantime I'm not certain what will occur to your ability to use this module. Let me know if it doesn't work anymore.
Jason
Jiminimonka
June 9th, 2022, 00:03
Now obsolete, as the same functionality is now in Fantasy Grounds Unity 4.2.2. :)
jharp
June 9th, 2022, 01:12
Now obsolete, as the same functionality is now in Fantasy Grounds Unity 4.2.2. :)
Ohhh nice. I will have to try it out.
Jason
jharp
June 9th, 2022, 01:17
Ohhh nice. I will have to try it out.
Jason
Ok, I have confirmed Jiminimonka's statement. Anyone who bought this in the last 30 days should submit a refund request. Don't know how that is done but I know the forge allows them.
The 4.2.2 version also allows selected copy and paste which the old Module couldn't do.
Jason
Shannara
June 9th, 2022, 14:07
I just wanted to say 'thank you' for this extension. It has been a great help and I'm extremely happy to have purchased it. I definitely got my money's worth, and I probably will continue to use the extension as long as it works, because just having the ability to easily insert a line at the top (and I don't know for sure if the copy/paste in the new FG update will copy links and such.)
nephranka
June 9th, 2022, 14:13
Ok, I have confirmed Jiminimonka's statement. Anyone who bought this in the last 30 days should submit a refund request. Don't know how that is done but I know the forge allows them.
The 4.2.2 version also allows selected copy and paste which the old Module couldn't do.
Jason
Thank you for the work you did. It was a great help to me and well worth the money. I will say your offer goes beyond the expected and you should be commended.
jharp
June 9th, 2022, 16:13
I just wanted to say 'thank you' for this extension. It has been a great help and I'm extremely happy to have purchased it. I definitely got my money's worth, and I probably will continue to use the extension as long as it works, because just having the ability to easily insert a line at the top (and I don't know for sure if the copy/paste in the new FG update will copy links and such.)
My quick testing suggests it copies everything but feel free to continue to use it. :)
Jason
Zacchaeus
June 9th, 2022, 16:23
Quick video on what it does https://www.youtube.com/watch?v=AIPLhc3vzao&lc=UgxkRQOaR6Ex_TT2LWF4AaABAg&ab_channel=PhilipGreig%28Zacchaeus%29
Jiminimonka
June 9th, 2022, 17:46
This extension helped a great deal. Thanks.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.