Problem pasting from Livecode to Mac Mail
Brian Milby
brian at milby7.com
Sat Jan 13 14:39:48 EST 2018
PR submitted against develop-8.2:
https://github.com/livecode/livecode/pull/6276
Updated MCClipboard::AddText such that is will clear the clipboard and only
place the plain text representations on the clipboard. The clipboard needed
to be cleared to avoid the HTML/RTF from a previous copy being left on the
clipboard which would cause issues when attempting to paste.
This will fix bugs 19206 and 20336.
Bug 18699 is actually due to the inclusion of HTML on the clipboard from my
testing (Mac/Windows). TextEdit on the Mac places RTF and plain text on
the clipboard and does not suffer from the same issue when pasting into
Excel (which is why people were able to paste there and recopy to get
around the issue).
Have a good weekend everyone!
On Sat, Jan 13, 2018 at 11:27 AM, Brian Milby <brian at milby7.com> wrote:
> PR just about done actually. It sets the plain text but leaves previous
> HTML right now. Should have it done this weekend.
>
> On Sat, Jan 13, 2018 at 10:50 AM Mark Waddingham via use-livecode <
> use-livecode at lists.runrev.com> wrote:
>
>> The behaviour should be that if you put plaintext then only plaintext
>> should be on the clipboard...
>>
>> If you put styled text then plain and rtf should be on the clipboard...
>> HTML maybe - but if that's the format causing the problem (and not rtf -
>> which I think is the main Cocoa style interchange format) then that needs
>> some thought.
>>
>> A line in a field is a paragraph - you can put vertical tabs in a line to
>> give you hard line breaks (i.e. BR in html). If other apps are interpreting
>> this differently then that causes a 'roundtrip' issue for LiveCode.
>>
>> Anyway, this is a result of the reworking of the clipboard we did early
>> on in 8 (maybe late 7) - if you have the time to poke around and propose a
>> patch on more than happy to help - it's been on my list to dig into for
>> ages, but hasn't reached the top yet!
>>
>> Warmest Regards,
>>
>> Mark.
>>
>> Sent from my iPhone
>>
>> > On 13 Jan 2018, at 15:16, Brian Milby via use-livecode <
>> use-livecode at lists.runrev.com> wrote:
>> >
>> > The text on the clipboard is fine. The problem is that too much is put
>> on
>> > the clipboard. Plain text converted to HTML is likely the real problem.
>> > That is why a trip through a plain text editor fixes the issue. It takes
>> > the plain text from the clipboard and only puts plain text on the
>> > clipboard. There are 2 bug reports on this issue. I’m planning on
>> > submitting a PR but was waiting for any reasoning behind the current
>> method
>> > that I may have overlooked.
>> > On Sat, Jan 13, 2018 at 9:11 AM Richard Burkett via use-livecode <
>> > use-livecode at lists.runrev.com> wrote:
>> >
>> >> Actually, the reason why we’re having this conversation is that I
>> needed
>> >> to load the clipboard with in what SHOULD be plain text format data via
>> >> script, data that included plain returns, and it appeared as double
>> spaced
>> >> when pasted into Mac Mail. There was another user-driven in terms of
>> >> selecting text. This should probably be a bug in LiveCode (the same
>> thing
>> >> happens when I copy a script from the editor in LiveCode).
>> >>
>> >> In any case, I found a script solution which I sent to the list
>> >> (use-livecode Digest, Vol 172, Issue 24, item 5) and it works fine now.
>> >> Perhaps LiveCode should have a clipBoard key “plainTextREALLY” that
>> uses
>> >> that script.
>> >>
>> >> Thanks again for your help with this, Paul Hibbert.
>> >>
>> >> Richard
>> >>
>> >> Richard Burkett
>> >> richard.burkett at sbcglobal.net
>> >>
>> >>
>> >>> On Fri, Jan 12, 2018 Brian Milby wrote:
>> >>>
>> >>> That is precisely why we are having this conversation. An assumption
>> was
>> >>> made that creating an HTML version of plain text was needed for the
>> >>> clipboard.
>> >>>
>> >>> On Fri, Jan 12, 2018 at 4:51 PM Bob Sneidar via use-livecode <
>> >>> use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>>
>> >> wrote:
>> >>>
>> >>>> Non- starter. Can't make assumptions about the end user's intent.
>> What
>> >> if
>> >>>> what he was copying was SUPPOSED to have double line breaks or
>> carriage
>> >>>> returns? The complaint would be that LC was taking liberties with
>> user's
>> >>>> data!
>> >>>>
>> >>>> Bob S
>> >>>>
>> >>>>
>> >>>>> On Jan 12, 2018, at 09:42 , Brian Milby via use-livecode <
>> >>>> use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com
>> >>
>> >> wrote:
>> >>>>>
>> >>>>> If it was changed to use <br> for single line breaks and only
>> assuming
>> >> a
>> >>>>> paragraph when there are 2
>> >>>>
>> >>>>
>> >>>> _______________________________________________
>> >>>> use-livecode mailing list
>> >>>> use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>
>> >>>> Please visit this url to subscribe, unsubscribe and manage your
>> >>>> subscription preferences:
>> >>>> http://lists.runrev.com/mailman/listinfo/use-livecode <
>> >> http://lists.runrev.com/mailman/listinfo/use-livecode>
>> >> _______________________________________________
>> >> use-livecode mailing list
>> >> use-livecode at lists.runrev.com
>> >> Please visit this url to subscribe, unsubscribe and manage your
>> >> subscription preferences:
>> >> http://lists.runrev.com/mailman/listinfo/use-livecode
>> > _______________________________________________
>> > use-livecode mailing list
>> > use-livecode at lists.runrev.com
>> > Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> > http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
More information about the use-livecode
mailing list