PeterPanettone 157 Posted August 4, 2022 (edited) I have a very long HTML code text in the clipboard (<HTML>...</HTML>) without line-ends which I want to convert into a string constant in the Editor. If I use any of the GExperts string converters, I get the Compiler error message "Line too long". So how can I convert-split this very long clipboard string into concatenated strings of fixed maximal length suitable for a string constant, e.g.: const MyHTML = '<HTML> ...' + '...' + '...' + ... '...</HTML>'; Edited August 4, 2022 by PeterPanettone Share this post Link to post
Der schöne Günther 316 Posted August 4, 2022 This is exactly what the MultiPaste tool is for. You can find it in Delphi at Edit -> MultiPaste. Using the MultiPaste Tool - RAD Studio (embarcadero.com) (I think the picture they posted is incorrect, as it is not realated to MultiPaste at all) Share this post Link to post
Uwe Raabe 2057 Posted August 4, 2022 1 hour ago, Der schöne Günther said: This is exactly what the MultiPaste tool is for. Not quite. The MultiPaste expects some text containing multiple lines. Share this post Link to post
limelect 48 Posted August 4, 2022 Will my free tool will help you? https://limelect.com/downloads/add-characters-to-text-lines-on-large-scale/ Share this post Link to post
PeterPanettone 157 Posted August 4, 2022 Thanks for all the answers. I was hoping that an existing addon like GExperts or MMX would provide that feature. As it is very easy to write such a tool (and I am not a night worker), I will do it tomorrow. Share this post Link to post
David Heffernan 2345 Posted August 4, 2022 (edited) This is why programmers learn to use scripting languages Edited August 5, 2022 by David Heffernan 1 Share this post Link to post
DiGi 14 Posted August 5, 2022 I just wonder how do you get that text in your clipboard in the first place. Copy from another application (not from file on disk / http URL)? Share this post Link to post
ertank 27 Posted August 5, 2022 10 hours ago, PeterPanettone said: Thanks for all the answers. I was hoping that an existing addon like GExperts or MMX would provide that feature. As it is very easy to write such a tool (and I am not a night worker), I will do it tomorrow. Another alternative might be to use a text editor that can format your HTML and add quotes (possibly with the help of regex) Notepad++ https://notepad-plus-plus.org/downloads/ CudaText https://cudatext.github.io TextEditorPro https://texteditor.pro SublimeText https://www.sublimetext.com Share this post Link to post
PeterPanettone 157 Posted August 5, 2022 (edited) Done: You can download it here: Edited August 5, 2022 by PeterPanettone Share this post Link to post