When i use SetClipboardText to copy a text block that have carriage returns and past in other tab it work.
But if i paste it to other software, f.e. notepad.exe, it remove all carriage return.
I think that this happens because SetClipboardText does not take into consideration the set carriage return (unix, window, mac).
Not problem if use copy to clipboard from contextual menu.
Do it is possible to fix it?
my workaround use
var clp=AkelPad.GetSelText().replace(/[\r\n]/g, "\r\n");
before of
AkelPad.SetClipboardText(clp);
This is a good solution. Many editors do support different line ending characters (unlike the standard Notepad), so in general it's OK to set the clipboard text as is.
However, an optional parameter nNewLine for SetClipboardText (similar to the one in GetSelText and GetTextRange) would indeed make sense.
Posted: Fri Mar 30, 2018 11:11 pm
by Instructor
Diamen
AkelPad.GetSelText(3 /*\r\n*/)
Posted: Sat Mar 31, 2018 5:33 am
by Diamen
Instructor
It fix, ty.
Do exist a same option for copy from menu and context menu?