You are here: PSPad forum > English discussion forum > Macro for converting quotes into HTML quotes
Posted by: LoupLocalizer | Date: 2024-07-10 16:54 | IP: IP Logged
Hi there.
I wonder if it is possible to create a macro for converting quotes into HTML quotes.
What I'd like to do is this:
Mark an ASCII-quoted text and press the macro keyboard shortcut which then removes the ASCII quote characters and replaces them by the HTML quotes, like this:
This is some text where I selected the word "John Doe" [quotation mark characters included] for quote conversion.
Result:
This is some text where I selected the word <q>John Doe</q> for quote conversion.
I would love to hear if this is possible somehow.
Thank you all in advance.
Posted by: pspad | Date: 2024-07-10 17:23 | IP: IP Logged
Hello
I guess the best way will be scripting. You can write simple script in JScript or VPScript, assign shortcut and use it on selected text.
Or you can try to play with macro record, but it's little complicated, cause you want to remove quotas around selected text. Something like:
Create Bookmark Shift+Ctrl+1
Cut
Go to end of file
Create empty line (Enter)
Paste
home
del
write <q>
end
left, del
end
bckspc
write </q>
home
Shift+End
Cut
BckSpc (delete line we created)
Jump to bookmark Ctrl+1
Paste
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR