Stripping styling from the clipboard...

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Stripping styling from the clipboard...

Niggemann, Bernd via use-livecode
Using LC9, I want to add a "paste without formatting" (as seen in may
browser edit menus) command and I can't see to figure out how to do it.

My most recent attempt of many still pastes formatted text (with
underlining, bolding, italics, fonts, colors, etc. in place)

*on*pasteKey *-- remove formatting*
*if* theclipboardData["text"] isnotempty*then*
*set*thetextofthetemplateFieldtoclipboardData["text"]
*set*theclipboardDatatoempty
*set*theclipboardData["text"] totheplaintextofthetemplateField
*end* *if*
*paste*
*end*pasteKey

Maybe I just haven't had enough Caffeine yet?


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Stripping styling from the clipboard...

Niggemann, Bernd via use-livecode
https://github.com/bwmilby/lc-misc/blob/master/ClipboardHelper/clipboardhelper.livecodescript

Check out this handler. I can answer questions about it this evening if needed.
On Jun 23, 2018, 9:18 AM -0500, Paul Dupuis via use-livecode <[hidden email]>, wrote:

> Using LC9, I want to add a "paste without formatting" (as seen in may
> browser edit menus) command and I can't see to figure out how to do it.
>
> My most recent attempt of many still pastes formatted text (with
> underlining, bolding, italics, fonts, colors, etc. in place)
>
> *on*pasteKey *-- remove formatting*
> *if* theclipboardData["text"] isnotempty*then*
> *set*thetextofthetemplateFieldtoclipboardData["text"]
> *set*theclipboardDatatoempty
> *set*theclipboardData["text"] totheplaintextofthetemplateField
> *end* *if*
> *paste*
> *end*pasteKey
>
> Maybe I just haven't had enough Caffeine yet?
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Stripping styling from the clipboard...

Niggemann, Bernd via use-livecode
Thank you for this.

However, it appears my problem is not with converting the clipboard from
styled text to plain text, but with the "pasteKey" message.

In LC9.0.0 under Windows 8.1, I create a new text stack and add and
empty field and place the following handler in EITHER the card or stack
script

on pasteKey
  makeClipboardPlainText
  paste
end pasteKey

on makeClipboardPlainText
   local tClip, tRawType
  
   if the platform is "MacOS" then
      put "public.utf8-plain-text" into tRawType   -- OSX
   else if the platform is "Linux" then
      put "text/plain;charset=utf-8" into tRawType -- Linux
   else if the platform contains "Win" then
      put "CF_UNICODETEXT" into tRawType -- Windows
   end if
  
   lock the clipBoard
   put the rawClipboardData[tRawType] into tClip
   set the rawClipboardData to empty
   set the rawClipboardData[tRawType] to tClip
   unlock the clipBoard
end makeClipboardPlainText

And set a break point on the call to makeClipboardPlainText instruction.
I then switch to another applications with styled text, select the text
copy it to the clipboard, return for LC with the insertion point in the
field and press Control-V.

RESULT: the breakpoint is never triggered and styled text is pasted into
the field.

If I just have a pasteKey handler with a beep (or anything else) as the
sole instruction, the same result, the breakpoint is never triggered.
The pasteKey message appears broken under both Windows and OSX (tested
under 10.9.5) in LC9.0.0? Can anyone confirm this bug?


On 6/23/2018 1:23 PM, Brian Milby wrote:

> _https://github.com/bwmilby/lc-misc/blob/master/ClipboardHelper/clipboardhelper.livecodescript_
>
> Check out this handler. I can answer questions about it this evening
> if needed.
> On Jun 23, 2018, 9:18 AM -0500, Paul Dupuis via use-livecode
> <[hidden email]>, wrote:
>> Using LC9, I want to add a "paste without formatting" (as seen in may
>> browser edit menus) command and I can't see to figure out how to do it.
>>
>> My most recent attempt of many still pastes formatted text (with
>> underlining, bolding, italics, fonts, colors, etc. in place)
>>
>> *on*pasteKey *-- remove formatting*
>> *if* theclipboardData["text"] isnotempty*then*
>> *set*thetextofthetemplateFieldtoclipboardData["text"]
>> *set*theclipboardDatatoempty
>> *set*theclipboardData["text"] totheplaintextofthetemplateField
>> *end* *if*
>> *paste*
>> *end*pasteKey
>>
>> Maybe I just haven't had enough Caffeine yet?
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Stripping styling from the clipboard...

Niggemann, Bernd via use-livecode
In reply to this post by Niggemann, Bernd via use-livecode
Hey, Wow, it's the Richmond school of shovels and primitive stuff at its
worst.

If I have a field that conatins some styled text (let's call it "ff1"),
and I want to shift it
with its styling removed into another field (let's call it "ff2") then
this does the trick in a button:

onmouseUp
gettheplainTextoffld "ff1"
putit intofld "ff2"
endmouseUp

and that, oddly enough, might not be a bad place to get started.

ALTHOUGH (ouch) this does NOT work:

onpasteKey
    gettheplainTextoftheclipboardData
    putit intofld "ff2"
endpasteKey

and this does not work:

onpasteKey
   puttheclipboardDataintofld "ff1"
   send"mouseUp" tobtn "Button"
endpasteKey

which would seem to suggest pasteKey is NOT trapping the paste signal at
all.

Richmond.


On 23/6/2018 5:15 pm, Paul Dupuis via use-livecode wrote:

> Using LC9, I want to add a "paste without formatting" (as seen in may
> browser edit menus) command and I can't see to figure out how to do it.
>
> My most recent attempt of many still pastes formatted text (with
> underlining, bolding, italics, fonts, colors, etc. in place)
>
> *on*pasteKey *-- remove formatting*
> *if* theclipboardData["text"] isnotempty*then*
> *set*thetextofthetemplateFieldtoclipboardData["text"]
> *set*theclipboardDatatoempty
> *set*theclipboardData["text"] totheplaintextofthetemplateField
> *end* *if*
> *paste*
> *end*pasteKey
>
> Maybe I just haven't had enough Caffeine yet?
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Stripping styling from the clipboard...

Niggemann, Bernd via use-livecode
In reply to this post by Niggemann, Bernd via use-livecode
Indeed: over "here" on MacOS 10.7.5 Livecode 8.1.10 the pasteKey command
seems to be non-functional.

Richmond.

On 23/6/2018 11:07 pm, Paul Dupuis via use-livecode wrote:

> Thank you for this.
>
> However, it appears my problem is not with converting the clipboard from
> styled text to plain text, but with the "pasteKey" message.
>
> In LC9.0.0 under Windows 8.1, I create a new text stack and add and
> empty field and place the following handler in EITHER the card or stack
> script
>
> on pasteKey
>    makeClipboardPlainText
>    paste
> end pasteKey
>
> on makeClipboardPlainText
>     local tClip, tRawType
>    
>     if the platform is "MacOS" then
>        put "public.utf8-plain-text" into tRawType   -- OSX
>     else if the platform is "Linux" then
>        put "text/plain;charset=utf-8" into tRawType -- Linux
>     else if the platform contains "Win" then
>        put "CF_UNICODETEXT" into tRawType -- Windows
>     end if
>    
>     lock the clipBoard
>     put the rawClipboardData[tRawType] into tClip
>     set the rawClipboardData to empty
>     set the rawClipboardData[tRawType] to tClip
>     unlock the clipBoard
> end makeClipboardPlainText
>
> And set a break point on the call to makeClipboardPlainText instruction.
> I then switch to another applications with styled text, select the text
> copy it to the clipboard, return for LC with the insertion point in the
> field and press Control-V.
>
> RESULT: the breakpoint is never triggered and styled text is pasted into
> the field.
>
> If I just have a pasteKey handler with a beep (or anything else) as the
> sole instruction, the same result, the breakpoint is never triggered.
> The pasteKey message appears broken under both Windows and OSX (tested
> under 10.9.5) in LC9.0.0? Can anyone confirm this bug?
>
>
> On 6/23/2018 1:23 PM, Brian Milby wrote:
>> _https://github.com/bwmilby/lc-misc/blob/master/ClipboardHelper/clipboardhelper.livecodescript_
>>
>> Check out this handler. I can answer questions about it this evening
>> if needed.
>> On Jun 23, 2018, 9:18 AM -0500, Paul Dupuis via use-livecode
>> <[hidden email]>, wrote:
>>> Using LC9, I want to add a "paste without formatting" (as seen in may
>>> browser edit menus) command and I can't see to figure out how to do it.
>>>
>>> My most recent attempt of many still pastes formatted text (with
>>> underlining, bolding, italics, fonts, colors, etc. in place)
>>>
>>> *on*pasteKey *-- remove formatting*
>>> *if* theclipboardData["text"] isnotempty*then*
>>> *set*thetextofthetemplateFieldtoclipboardData["text"]
>>> *set*theclipboardDatatoempty
>>> *set*theclipboardData["text"] totheplaintextofthetemplateField
>>> *end* *if*
>>> *paste*
>>> *end*pasteKey
>>>
>>> Maybe I just haven't had enough Caffeine yet?
>>>
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Stripping styling from the clipboard...

Niggemann, Bernd via use-livecode
In reply to this post by Niggemann, Bernd via use-livecode
However, I, at least, am experiencing great joy just at present as this:

oncontrolKeyDown KEE
    ifKEE is "V" then
      puttheclipboardDataintofld "ff1"
    else
       passcontrolKeyDown
    endif
endcontrolKeyDown

popped UNSTYLED text into fld "ff1"
on MacOS 10.7.5 LiveCode 8.1.10

Your mileage may vary: but it's sure worth a try!

Richmond.


On 23/6/2018 11:07 pm, Paul Dupuis via use-livecode wrote:

> Thank you for this.
>
> However, it appears my problem is not with converting the clipboard from
> styled text to plain text, but with the "pasteKey" message.
>
> In LC9.0.0 under Windows 8.1, I create a new text stack and add and
> empty field and place the following handler in EITHER the card or stack
> script
>
> on pasteKey
>    makeClipboardPlainText
>    paste
> end pasteKey
>
> on makeClipboardPlainText
>     local tClip, tRawType
>    
>     if the platform is "MacOS" then
>        put "public.utf8-plain-text" into tRawType   -- OSX
>     else if the platform is "Linux" then
>        put "text/plain;charset=utf-8" into tRawType -- Linux
>     else if the platform contains "Win" then
>        put "CF_UNICODETEXT" into tRawType -- Windows
>     end if
>    
>     lock the clipBoard
>     put the rawClipboardData[tRawType] into tClip
>     set the rawClipboardData to empty
>     set the rawClipboardData[tRawType] to tClip
>     unlock the clipBoard
> end makeClipboardPlainText
>
> And set a break point on the call to makeClipboardPlainText instruction.
> I then switch to another applications with styled text, select the text
> copy it to the clipboard, return for LC with the insertion point in the
> field and press Control-V.
>
> RESULT: the breakpoint is never triggered and styled text is pasted into
> the field.
>
> If I just have a pasteKey handler with a beep (or anything else) as the
> sole instruction, the same result, the breakpoint is never triggered.
> The pasteKey message appears broken under both Windows and OSX (tested
> under 10.9.5) in LC9.0.0? Can anyone confirm this bug?
>
>
> On 6/23/2018 1:23 PM, Brian Milby wrote:
>> _https://github.com/bwmilby/lc-misc/blob/master/ClipboardHelper/clipboardhelper.livecodescript_
>>
>> Check out this handler. I can answer questions about it this evening
>> if needed.
>> On Jun 23, 2018, 9:18 AM -0500, Paul Dupuis via use-livecode
>> <[hidden email]>, wrote:
>>> Using LC9, I want to add a "paste without formatting" (as seen in may
>>> browser edit menus) command and I can't see to figure out how to do it.
>>>
>>> My most recent attempt of many still pastes formatted text (with
>>> underlining, bolding, italics, fonts, colors, etc. in place)
>>>
>>> *on*pasteKey *-- remove formatting*
>>> *if* theclipboardData["text"] isnotempty*then*
>>> *set*thetextofthetemplateFieldtoclipboardData["text"]
>>> *set*theclipboardDatatoempty
>>> *set*theclipboardData["text"] totheplaintextofthetemplateField
>>> *end* *if*
>>> *paste*
>>> *end*pasteKey
>>>
>>> Maybe I just haven't had enough Caffeine yet?
>>>
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Stripping styling from the clipboard...

Niggemann, Bernd via use-livecode
Oh: and just to make things even odder than usual, it only works when
the fild "ff1" does NOT have focus (i.e. the cursor is NOT in the field).

Richmond.

On 23/6/2018 11:38 pm, Richmond Mathewson wrote:

> However, I, at least, am experiencing great joy just at present as this:
>
> oncontrolKeyDown KEE
>    ifKEE is "V" then
>      puttheclipboardDataintofld "ff1"
>    else
>       passcontrolKeyDown
>    endif
> endcontrolKeyDown
>
> popped UNSTYLED text into fld "ff1"
> on MacOS 10.7.5 LiveCode 8.1.10
>
> Your mileage may vary: but it's sure worth a try!
>
> Richmond.
>
>
> On 23/6/2018 11:07 pm, Paul Dupuis via use-livecode wrote:
>> Thank you for this.
>>
>> However, it appears my problem is not with converting the clipboard from
>> styled text to plain text, but with the "pasteKey" message.
>>
>> In LC9.0.0 under Windows 8.1, I create a new text stack and add and
>> empty field and place the following handler in EITHER the card or stack
>> script
>>
>> on pasteKey
>>    makeClipboardPlainText
>>    paste
>> end pasteKey
>>
>> on makeClipboardPlainText
>>     local tClip, tRawType
>>    
>>     if the platform is "MacOS" then
>>        put "public.utf8-plain-text" into tRawType   -- OSX
>>     else if the platform is "Linux" then
>>        put "text/plain;charset=utf-8" into tRawType -- Linux
>>     else if the platform contains "Win" then
>>        put "CF_UNICODETEXT" into tRawType -- Windows
>>     end if
>>    
>>     lock the clipBoard
>>     put the rawClipboardData[tRawType] into tClip
>>     set the rawClipboardData to empty
>>     set the rawClipboardData[tRawType] to tClip
>>     unlock the clipBoard
>> end makeClipboardPlainText
>>
>> And set a break point on the call to makeClipboardPlainText instruction.
>> I then switch to another applications with styled text, select the text
>> copy it to the clipboard, return for LC with the insertion point in the
>> field and press Control-V.
>>
>> RESULT: the breakpoint is never triggered and styled text is pasted into
>> the field.
>>
>> If I just have a pasteKey handler with a beep (or anything else) as the
>> sole instruction, the same result, the breakpoint is never triggered.
>> The pasteKey message appears broken under both Windows and OSX (tested
>> under 10.9.5) in LC9.0.0? Can anyone confirm this bug?
>>
>>
>> On 6/23/2018 1:23 PM, Brian Milby wrote:
>>> _https://github.com/bwmilby/lc-misc/blob/master/ClipboardHelper/clipboardhelper.livecodescript_
>>>
>>> Check out this handler. I can answer questions about it this evening
>>> if needed.
>>> On Jun 23, 2018, 9:18 AM -0500, Paul Dupuis via use-livecode
>>> <[hidden email]>, wrote:
>>>> Using LC9, I want to add a "paste without formatting" (as seen in may
>>>> browser edit menus) command and I can't see to figure out how to do it.
>>>>
>>>> My most recent attempt of many still pastes formatted text (with
>>>> underlining, bolding, italics, fonts, colors, etc. in place)
>>>>
>>>> *on*pasteKey *-- remove formatting*
>>>> *if* theclipboardData["text"] isnotempty*then*
>>>> *set*thetextofthetemplateFieldtoclipboardData["text"]
>>>> *set*theclipboardDatatoempty
>>>> *set*theclipboardData["text"] totheplaintextofthetemplateField
>>>> *end* *if*
>>>> *paste*
>>>> *end*pasteKey
>>>>
>>>> Maybe I just haven't had enough Caffeine yet?
>>>>
>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> [hidden email]
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Stripping styling from the clipboard...

Niggemann, Bernd via use-livecode
Strike that last remark.

BUT: that script expects one to press the CONTROL key on the Mac
rather than the COMMAND key one usually uses to PASTE,
so how that can be achieved on a Windows or a Linux machine I just don't
know.

Richmond.

On 23/6/2018 11:39 pm, Richmond Mathewson wrote:

> Oh: and just to make things even odder than usual, it only works when
> the fild "ff1" does NOT have focus (i.e. the cursor is NOT in the field).
>
> Richmond.
>
> On 23/6/2018 11:38 pm, Richmond Mathewson wrote:
>> However, I, at least, am experiencing great joy just at present as this:
>>
>> oncontrolKeyDown KEE
>>    ifKEE is "V" then
>>      puttheclipboardDataintofld "ff1"
>>    else
>>       passcontrolKeyDown
>>    endif
>> endcontrolKeyDown
>>
>> popped UNSTYLED text into fld "ff1"
>> on MacOS 10.7.5 LiveCode 8.1.10
>>
>> Your mileage may vary: but it's sure worth a try!
>>
>> Richmond.
>>
>>
>> On 23/6/2018 11:07 pm, Paul Dupuis via use-livecode wrote:
>>> Thank you for this.
>>>
>>> However, it appears my problem is not with converting the clipboard from
>>> styled text to plain text, but with the "pasteKey" message.
>>>
>>> In LC9.0.0 under Windows 8.1, I create a new text stack and add and
>>> empty field and place the following handler in EITHER the card or stack
>>> script
>>>
>>> on pasteKey
>>>    makeClipboardPlainText
>>>    paste
>>> end pasteKey
>>>
>>> on makeClipboardPlainText
>>>     local tClip, tRawType
>>>    
>>>     if the platform is "MacOS" then
>>>        put "public.utf8-plain-text" into tRawType   -- OSX
>>>     else if the platform is "Linux" then
>>>        put "text/plain;charset=utf-8" into tRawType -- Linux
>>>     else if the platform contains "Win" then
>>>        put "CF_UNICODETEXT" into tRawType -- Windows
>>>     end if
>>>    
>>>     lock the clipBoard
>>>     put the rawClipboardData[tRawType] into tClip
>>>     set the rawClipboardData to empty
>>>     set the rawClipboardData[tRawType] to tClip
>>>     unlock the clipBoard
>>> end makeClipboardPlainText
>>>
>>> And set a break point on the call to makeClipboardPlainText instruction.
>>> I then switch to another applications with styled text, select the text
>>> copy it to the clipboard, return for LC with the insertion point in the
>>> field and press Control-V.
>>>
>>> RESULT: the breakpoint is never triggered and styled text is pasted into
>>> the field.
>>>
>>> If I just have a pasteKey handler with a beep (or anything else) as the
>>> sole instruction, the same result, the breakpoint is never triggered.
>>> The pasteKey message appears broken under both Windows and OSX (tested
>>> under 10.9.5) in LC9.0.0? Can anyone confirm this bug?
>>>
>>>
>>> On 6/23/2018 1:23 PM, Brian Milby wrote:
>>>> _https://github.com/bwmilby/lc-misc/blob/master/ClipboardHelper/clipboardhelper.livecodescript_
>>>>
>>>> Check out this handler. I can answer questions about it this evening
>>>> if needed.
>>>> On Jun 23, 2018, 9:18 AM -0500, Paul Dupuis via use-livecode
>>>> <[hidden email]>, wrote:
>>>>> Using LC9, I want to add a "paste without formatting" (as seen in may
>>>>> browser edit menus) command and I can't see to figure out how to do it.
>>>>>
>>>>> My most recent attempt of many still pastes formatted text (with
>>>>> underlining, bolding, italics, fonts, colors, etc. in place)
>>>>>
>>>>> *on*pasteKey *-- remove formatting*
>>>>> *if* theclipboardData["text"] isnotempty*then*
>>>>> *set*thetextofthetemplateFieldtoclipboardData["text"]
>>>>> *set*theclipboardDatatoempty
>>>>> *set*theclipboardData["text"] totheplaintextofthetemplateField
>>>>> *end* *if*
>>>>> *paste*
>>>>> *end*pasteKey
>>>>>
>>>>> Maybe I just haven't had enough Caffeine yet?
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> use-livecode mailing list
>>>>> [hidden email]
>>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>>> subscription preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Stripping styling from the clipboard...

Niggemann, Bernd via use-livecode
In reply to this post by Niggemann, Bernd via use-livecode
From the dictionary:

The LiveCode development environment traps the pasteKey message <>, unless "Suspend LiveCode UI" is turned on in the Development menu. This means that the pasteKeymessage <> is not received by a stack <> if it's running in the development environment <>.

So if you are trying to do this in the IDE, then that may be the reason it will not work.

Best regards
Tore Nilsen

> 23. jun. 2018 kl. 22:32 skrev Richmond Mathewson via use-livecode <[hidden email]>:
>
> Hey, Wow, it's the Richmond school of shovels and primitive stuff at its worst.
>
> If I have a field that conatins some styled text (let's call it "ff1"), and I want to shift it
> with its styling removed into another field (let's call it "ff2") then this does the trick in a button:
>
> onmouseUp
> gettheplainTextoffld "ff1"
> putit intofld "ff2"
> endmouseUp
>
> and that, oddly enough, might not be a bad place to get started.
>
> ALTHOUGH (ouch) this does NOT work:
>
> onpasteKey
>   gettheplainTextoftheclipboardData
>   putit intofld "ff2"
> endpasteKey
>
> and this does not work:
>
> onpasteKey
>  puttheclipboardDataintofld "ff1"
>  send"mouseUp" tobtn "Button"
> endpasteKey
>
> which would seem to suggest pasteKey is NOT trapping the paste signal at all.
>
> Richmond.
>
>
> On 23/6/2018 5:15 pm, Paul Dupuis via use-livecode wrote:
>> Using LC9, I want to add a "paste without formatting" (as seen in may
>> browser edit menus) command and I can't see to figure out how to do it.
>>
>> My most recent attempt of many still pastes formatted text (with
>> underlining, bolding, italics, fonts, colors, etc. in place)
>>
>> *on*pasteKey *-- remove formatting*
>> *if* theclipboardData["text"] isnotempty*then*
>> *set*thetextofthetemplateFieldtoclipboardData["text"]
>> *set*theclipboardDatatoempty
>> *set*theclipboardData["text"] totheplaintextofthetemplateField
>> *end* *if*
>> *paste*
>> *end*pasteKey
>>
>> Maybe I just haven't had enough Caffeine yet?
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Stripping styling from the clipboard...

Niggemann, Bernd via use-livecode
Nice catch Tore.

My original code was addressing a different couple of problems. The first was that when you attempted to populate the clipboard with plain text that LC would also put an HTML version on that would cause issues with paste in other apps. The second is designed to adjust the HTML that is put onto the clipboard to make it render better in other apps as rich text.

I didn’t initially realize that you were attempting to clean a clipboard originating outside of LC. You may want to put the keys of the raw clipboard and see if the system is placing something on there that you could use. Many apps will place several formats on the clipboard so that destination apps can choose the best version to use.

Thanks,
Brian
On Jun 23, 2018, 5:15 PM -0400, Tore Nilsen via use-livecode <[hidden email]>, wrote:

> From the dictionary:
>
> The LiveCode development environment traps the pasteKey message <>, unless "Suspend LiveCode UI" is turned on in the Development menu. This means that the pasteKeymessage <> is not received by a stack <> if it's running in the development environment <>.
>
> So if you are trying to do this in the IDE, then that may be the reason it will not work.
>
> Best regards
> Tore Nilsen
>
> > 23. jun. 2018 kl. 22:32 skrev Richmond Mathewson via use-livecode <[hidden email]>:
> >
> > Hey, Wow, it's the Richmond school of shovels and primitive stuff at its worst.
> >
> > If I have a field that conatins some styled text (let's call it "ff1"), and I want to shift it
> > with its styling removed into another field (let's call it "ff2") then this does the trick in a button:
> >
> > onmouseUp
> > gettheplainTextoffld "ff1"
> > putit intofld "ff2"
> > endmouseUp
> >
> > and that, oddly enough, might not be a bad place to get started.
> >
> > ALTHOUGH (ouch) this does NOT work:
> >
> > onpasteKey
> > gettheplainTextoftheclipboardData
> > putit intofld "ff2"
> > endpasteKey
> >
> > and this does not work:
> >
> > onpasteKey
> > puttheclipboardDataintofld "ff1"
> > send"mouseUp" tobtn "Button"
> > endpasteKey
> >
> > which would seem to suggest pasteKey is NOT trapping the paste signal at all.
> >
> > Richmond.
> >
> >
> > On 23/6/2018 5:15 pm, Paul Dupuis via use-livecode wrote:
> > > Using LC9, I want to add a "paste without formatting" (as seen in may
> > > browser edit menus) command and I can't see to figure out how to do it.
> > >
> > > My most recent attempt of many still pastes formatted text (with
> > > underlining, bolding, italics, fonts, colors, etc. in place)
> > >
> > > *on*pasteKey *-- remove formatting*
> > > *if* theclipboardData["text"] isnotempty*then*
> > > *set*thetextofthetemplateFieldtoclipboardData["text"]
> > > *set*theclipboardDatatoempty
> > > *set*theclipboardData["text"] totheplaintextofthetemplateField
> > > *end* *if*
> > > *paste*
> > > *end*pasteKey
> > >
> > > Maybe I just haven't had enough Caffeine yet?
> > >
> > >
> > > _______________________________________________
> > > use-livecode mailing list
> > > [hidden email]
> > > Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Stripping styling from the clipboard...

Niggemann, Bernd via use-livecode
In reply to this post by Niggemann, Bernd via use-livecode
Okay, I missed that in the entry. That explains why the pasteKey message
wasn't working.

I am all set now. Thank you.


On 6/23/2018 5:15 PM, Tore Nilsen via use-livecode wrote:

> >From the dictionary:
>
> The LiveCode development environment traps the pasteKey message <>, unless "Suspend LiveCode UI" is turned on in the Development menu. This means that the pasteKeymessage <> is not received by a stack <> if it's running in the development environment <>.
>
> So if you are trying to do this in the IDE, then that may be the reason it will not work.
>
> Best regards
> Tore Nilsen
>
>> 23. jun. 2018 kl. 22:32 skrev Richmond Mathewson via use-livecode <[hidden email]>:
>>
>> Hey, Wow, it's the Richmond school of shovels and primitive stuff at its worst.
>>
>> If I have a field that conatins some styled text (let's call it "ff1"), and I want to shift it
>> with its styling removed into another field (let's call it "ff2") then this does the trick in a button:
>>
>> onmouseUp
>> gettheplainTextoffld "ff1"
>> putit intofld "ff2"
>> endmouseUp
>>
>> and that, oddly enough, might not be a bad place to get started.
>>
>> ALTHOUGH (ouch) this does NOT work:
>>
>> onpasteKey
>>   gettheplainTextoftheclipboardData
>>   putit intofld "ff2"
>> endpasteKey
>>
>> and this does not work:
>>
>> onpasteKey
>>  puttheclipboardDataintofld "ff1"
>>  send"mouseUp" tobtn "Button"
>> endpasteKey
>>
>> which would seem to suggest pasteKey is NOT trapping the paste signal at all.
>>
>> Richmond.
>>
>>
>> On 23/6/2018 5:15 pm, Paul Dupuis via use-livecode wrote:
>>> Using LC9, I want to add a "paste without formatting" (as seen in may
>>> browser edit menus) command and I can't see to figure out how to do it.
>>>
>>> My most recent attempt of many still pastes formatted text (with
>>> underlining, bolding, italics, fonts, colors, etc. in place)
>>>
>>> *on*pasteKey *-- remove formatting*
>>> *if* theclipboardData["text"] isnotempty*then*
>>> *set*thetextofthetemplateFieldtoclipboardData["text"]
>>> *set*theclipboardDatatoempty
>>> *set*theclipboardData["text"] totheplaintextofthetemplateField
>>> *end* *if*
>>> *paste*
>>> *end*pasteKey
>>>
>>> Maybe I just haven't had enough Caffeine yet?
>>>
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Stripping styling from the clipboard...

Niggemann, Bernd via use-livecode
Paul...may I ask you why your code pasting is the way it is ?...is there
some kind of practical reason for it being that way?...sure is harder to
read that way.

On Sat, Jun 23, 2018 at 5:55 PM, Paul Dupuis via use-livecode <
[hidden email]> wrote:

> Okay, I missed that in the entry. That explains why the pasteKey message
> wasn't working.
>
> I am all set now. Thank you.
>
>
> On 6/23/2018 5:15 PM, Tore Nilsen via use-livecode wrote:
> > >From the dictionary:
> >
> > The LiveCode development environment traps the pasteKey message <>,
> unless "Suspend LiveCode UI" is turned on in the Development menu. This
> means that the pasteKeymessage <> is not received by a stack <> if it's
> running in the development environment <>.
> >
> > So if you are trying to do this in the IDE, then that may be the reason
> it will not work.
> >
> > Best regards
> > Tore Nilsen
> >
> >> 23. jun. 2018 kl. 22:32 skrev Richmond Mathewson via use-livecode <
> [hidden email]>:
> >>
> >> Hey, Wow, it's the Richmond school of shovels and primitive stuff at
> its worst.
> >>
> >> If I have a field that conatins some styled text (let's call it "ff1"),
> and I want to shift it
> >> with its styling removed into another field (let's call it "ff2") then
> this does the trick in a button:
> >>
> >> onmouseUp
> >> gettheplainTextoffld "ff1"
> >> putit intofld "ff2"
> >> endmouseUp
> >>
> >> and that, oddly enough, might not be a bad place to get started.
> >>
> >> ALTHOUGH (ouch) this does NOT work:
> >>
> >> onpasteKey
> >>   gettheplainTextoftheclipboardData
> >>   putit intofld "ff2"
> >> endpasteKey
> >>
> >> and this does not work:
> >>
> >> onpasteKey
> >>  puttheclipboardDataintofld "ff1"
> >>  send"mouseUp" tobtn "Button"
> >> endpasteKey
> >>
> >> which would seem to suggest pasteKey is NOT trapping the paste signal
> at all.
> >>
> >> Richmond.
> >>
> >>
> >> On 23/6/2018 5:15 pm, Paul Dupuis via use-livecode wrote:
> >>> Using LC9, I want to add a "paste without formatting" (as seen in may
> >>> browser edit menus) command and I can't see to figure out how to do it.
> >>>
> >>> My most recent attempt of many still pastes formatted text (with
> >>> underlining, bolding, italics, fonts, colors, etc. in place)
> >>>
> >>> *on*pasteKey *-- remove formatting*
> >>> *if* theclipboardData["text"] isnotempty*then*
> >>> *set*thetextofthetemplateFieldtoclipboardData["text"]
> >>> *set*theclipboardDatatoempty
> >>> *set*theclipboardData["text"] totheplaintextofthetemplateField
> >>> *end* *if*
> >>> *paste*
> >>> *end*pasteKey
> >>>
> >>> Maybe I just haven't had enough Caffeine yet?
> >>>
> >>>
> >>> _______________________________________________
> >>> use-livecode mailing list
> >>> [hidden email]
> >>> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> >>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >> _______________________________________________
> >> use-livecode mailing list
> >> [hidden email]
> >> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Stripping styling from the clipboard...

Niggemann, Bernd via use-livecode
In reply to this post by Niggemann, Bernd via use-livecode
From the dictionary...

> The LiveCode development environment traps the pasteKey message, unless "Suspend LiveCode UI" is turned on in the Development menu. This means that the pasteKey message is not received by a stack if it's running in the development environment.


Could this be why pastekey does not seem to work?

James
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Stripping styling from the clipboard...

Niggemann, Bernd via use-livecode
In reply to this post by Niggemann, Bernd via use-livecode
The code below with no spaces between the works is Richmonds

On 6/23/2018 5:58 PM, Tom Glod via use-livecode wrote:

> Paul...may I ask you why your code pasting is the way it is ?...is there
> some kind of practical reason for it being that way?...sure is harder to
> read that way.
>
> On Sat, Jun 23, 2018 at 5:55 PM, Paul Dupuis via use-livecode <
> [hidden email]> wrote:
>
>> Okay, I missed that in the entry. That explains why the pasteKey message
>> wasn't working.
>>
>> I am all set now. Thank you.
>>
>>
>> On 6/23/2018 5:15 PM, Tore Nilsen via use-livecode wrote:
>>> >From the dictionary:
>>>
>>> The LiveCode development environment traps the pasteKey message <>,
>> unless "Suspend LiveCode UI" is turned on in the Development menu. This
>> means that the pasteKeymessage <> is not received by a stack <> if it's
>> running in the development environment <>.
>>> So if you are trying to do this in the IDE, then that may be the reason
>> it will not work.
>>> Best regards
>>> Tore Nilsen
>>>
>>>> 23. jun. 2018 kl. 22:32 skrev Richmond Mathewson via use-livecode <
>> [hidden email]>:
>>>> Hey, Wow, it's the Richmond school of shovels and primitive stuff at
>> its worst.
>>>> If I have a field that conatins some styled text (let's call it "ff1"),
>> and I want to shift it
>>>> with its styling removed into another field (let's call it "ff2") then
>> this does the trick in a button:
>>>> onmouseUp
>>>> gettheplainTextoffld "ff1"
>>>> putit intofld "ff2"
>>>> endmouseUp
>>>>
>>>> and that, oddly enough, might not be a bad place to get started.
>>>>
>>>> ALTHOUGH (ouch) this does NOT work:
>>>>
>>>> onpasteKey
>>>>   gettheplainTextoftheclipboardData
>>>>   putit intofld "ff2"
>>>> endpasteKey
>>>>
>>>> and this does not work:
>>>>
>>>> onpasteKey
>>>>  puttheclipboardDataintofld "ff1"
>>>>  send"mouseUp" tobtn "Button"
>>>> endpasteKey
>>>>
>>>> which would seem to suggest pasteKey is NOT trapping the paste signal
>> at all.
>>>> Richmond.
>>>>
>>>>
>>>> On 23/6/2018 5:15 pm, Paul Dupuis via use-livecode wrote:
>>>>> Using LC9, I want to add a "paste without formatting" (as seen in may
>>>>> browser edit menus) command and I can't see to figure out how to do it.
>>>>>
>>>>> My most recent attempt of many still pastes formatted text (with
>>>>> underlining, bolding, italics, fonts, colors, etc. in place)
>>>>>
>>>>> *on*pasteKey *-- remove formatting*
>>>>> *if* theclipboardData["text"] isnotempty*then*
>>>>> *set*thetextofthetemplateFieldtoclipboardData["text"]
>>>>> *set*theclipboardDatatoempty
>>>>> *set*theclipboardData["text"] totheplaintextofthetemplateField
>>>>> *end* *if*
>>>>> *paste*
>>>>> *end*pasteKey
>>>>>
>>>>> Maybe I just haven't had enough Caffeine yet?
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> use-livecode mailing list
>>>>> [hidden email]
>>>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> [hidden email]
>>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Stripping styling from the clipboard...

Niggemann, Bernd via use-livecode
sorry Paul...my bad.

Richmond..... why does your code paste that way?

On Sat, Jun 23, 2018 at 7:59 PM, Paul Dupuis via use-livecode <
[hidden email]> wrote:

> The code below with no spaces between the works is Richmonds
>
> On 6/23/2018 5:58 PM, Tom Glod via use-livecode wrote:
> > Paul...may I ask you why your code pasting is the way it is ?...is there
> > some kind of practical reason for it being that way?...sure is harder to
> > read that way.
> >
> > On Sat, Jun 23, 2018 at 5:55 PM, Paul Dupuis via use-livecode <
> > [hidden email]> wrote:
> >
> >> Okay, I missed that in the entry. That explains why the pasteKey message
> >> wasn't working.
> >>
> >> I am all set now. Thank you.
> >>
> >>
> >> On 6/23/2018 5:15 PM, Tore Nilsen via use-livecode wrote:
> >>> >From the dictionary:
> >>>
> >>> The LiveCode development environment traps the pasteKey message <>,
> >> unless "Suspend LiveCode UI" is turned on in the Development menu. This
> >> means that the pasteKeymessage <> is not received by a stack <> if it's
> >> running in the development environment <>.
> >>> So if you are trying to do this in the IDE, then that may be the reason
> >> it will not work.
> >>> Best regards
> >>> Tore Nilsen
> >>>
> >>>> 23. jun. 2018 kl. 22:32 skrev Richmond Mathewson via use-livecode <
> >> [hidden email]>:
> >>>> Hey, Wow, it's the Richmond school of shovels and primitive stuff at
> >> its worst.
> >>>> If I have a field that conatins some styled text (let's call it
> "ff1"),
> >> and I want to shift it
> >>>> with its styling removed into another field (let's call it "ff2") then
> >> this does the trick in a button:
> >>>> onmouseUp
> >>>> gettheplainTextoffld "ff1"
> >>>> putit intofld "ff2"
> >>>> endmouseUp
> >>>>
> >>>> and that, oddly enough, might not be a bad place to get started.
> >>>>
> >>>> ALTHOUGH (ouch) this does NOT work:
> >>>>
> >>>> onpasteKey
> >>>>   gettheplainTextoftheclipboardData
> >>>>   putit intofld "ff2"
> >>>> endpasteKey
> >>>>
> >>>> and this does not work:
> >>>>
> >>>> onpasteKey
> >>>>  puttheclipboardDataintofld "ff1"
> >>>>  send"mouseUp" tobtn "Button"
> >>>> endpasteKey
> >>>>
> >>>> which would seem to suggest pasteKey is NOT trapping the paste signal
> >> at all.
> >>>> Richmond.
> >>>>
> >>>>
> >>>> On 23/6/2018 5:15 pm, Paul Dupuis via use-livecode wrote:
> >>>>> Using LC9, I want to add a "paste without formatting" (as seen in may
> >>>>> browser edit menus) command and I can't see to figure out how to do
> it.
> >>>>>
> >>>>> My most recent attempt of many still pastes formatted text (with
> >>>>> underlining, bolding, italics, fonts, colors, etc. in place)
> >>>>>
> >>>>> *on*pasteKey *-- remove formatting*
> >>>>> *if* theclipboardData["text"] isnotempty*then*
> >>>>> *set*thetextofthetemplateFieldtoclipboardData["text"]
> >>>>> *set*theclipboardDatatoempty
> >>>>> *set*theclipboardData["text"] totheplaintextofthetemplateField
> >>>>> *end* *if*
> >>>>> *paste*
> >>>>> *end*pasteKey
> >>>>>
> >>>>> Maybe I just haven't had enough Caffeine yet?
> >>>>>
> >>>>>
> >>>>> _______________________________________________
> >>>>> use-livecode mailing list
> >>>>> [hidden email]
> >>>>> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>>> _______________________________________________
> >>>> use-livecode mailing list
> >>>> [hidden email]
> >>>> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >>>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>> _______________________________________________
> >>> use-livecode mailing list
> >>> [hidden email]
> >>> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>>
> >>
> >> _______________________________________________
> >> use-livecode mailing list
> >> [hidden email]
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Stripping styling from the clipboard...

Niggemann, Bernd via use-livecode
It happens when a colorized handler is copied directly from the script
editor and pasted into a list response. The list only understands plain
text, and styled text confuses it. I'm not sure if it happens on all
platforms but we've seen it before in other posts.

Brian's plaintext handler would come in handy here.

--
Jacqueline Landman Gay | [hidden email]
HyperActive Software | http://www.hyperactivesw.com
On June 23, 2018 9:25:34 PM Tom Glod via use-livecode
<[hidden email]> wrote:

> sorry Paul...my bad.
>
> Richmond..... why does your code paste that way




_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Stripping styling from the clipboard...

Niggemann, Bernd via use-livecode
In reply to this post by Niggemann, Bernd via use-livecode

> Richmond..... why does your code paste that way?
>
>

I don't know: looks terrible!

Over "here" on ThunderBird e-mail client on MacOS 10.7.5 that code
was pasted DIRECTLY from the LiveCode scriptEditor . . .

Richmond.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Stripping styling from the clipboard...

Niggemann, Bernd via use-livecode
In reply to this post by Niggemann, Bernd via use-livecode
Well that is a pain in the bum!

I suppose I should go through an intermediate stage using a
plain-vanilla text editor.

Richmond.

On 24/6/2018 8:19 am, J. Landman Gay via use-livecode wrote:

> It happens when a colorized handler is copied directly from the script
> editor and pasted into a list response. The list only understands
> plain text, and styled text confuses it. I'm not sure if it happens on
> all platforms but we've seen it before in other posts.
>
> Brian's plaintext handler would come in handy here.
>
> --
> Jacqueline Landman Gay | [hidden email]
> HyperActive Software | http://www.hyperactivesw.com
> On June 23, 2018 9:25:34 PM Tom Glod via use-livecode
> <[hidden email]> wrote:
>
>> sorry Paul...my bad.
>>
>> Richmond..... why does your code paste that way
>
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Stripping styling from the clipboard...

Niggemann, Bernd via use-livecode
Using an intermediate text editor also works, and would take care of any
UTF8 conversion too if that's causing issues. But since you're in LC
already it might be more convenient to have a handler in a backscript or a
plugin that would do it.

--
Jacqueline Landman Gay | [hidden email]
HyperActive Software | http://www.hyperactivesw.com
On June 24, 2018 9:07:59 AM Richmond Mathewson via use-livecode
<[hidden email]> wrote:

> Well that is a pain in the bum!
>
> I suppose I should go through an intermediate stage using a
> plain-vanilla text editor.
>
> Richmond.
>
> On 24/6/2018 8:19 am, J. Landman Gay via use-livecode wrote:
>> It happens when a colorized handler is copied directly from the script
>> editor and pasted into a list response. The list only understands
>> plain text, and styled text confuses it. I'm not sure if it happens on
>> all platforms but we've seen it before in other posts.
>>
>> Brian's plaintext handler would come in handy here.
>>
>> --
>> Jacqueline Landman Gay | [hidden email]
>> HyperActive Software | http://www.hyperactivesw.com
>> On June 23, 2018 9:25:34 PM Tom Glod via use-livecode
>> <[hidden email]> wrote:
>>
>>> sorry Paul...my bad.
>>>
>>> Richmond..... why does your code paste that way
>>
>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Stripping styling from the clipboard...

Niggemann, Bernd via use-livecode
I see...good to know..... thanks J

On Sun, Jun 24, 2018 at 10:39 AM, J. Landman Gay via use-livecode <
[hidden email]> wrote:

> Using an intermediate text editor also works, and would take care of any
> UTF8 conversion too if that's causing issues. But since you're in LC
> already it might be more convenient to have a handler in a backscript or a
> plugin that would do it.
>
> --
> Jacqueline Landman Gay | [hidden email]
> HyperActive Software | http://www.hyperactivesw.com
> On June 24, 2018 9:07:59 AM Richmond Mathewson via use-livecode <
> [hidden email]> wrote:
>
> Well that is a pain in the bum!
>>
>> I suppose I should go through an intermediate stage using a
>> plain-vanilla text editor.
>>
>> Richmond.
>>
>> On 24/6/2018 8:19 am, J. Landman Gay via use-livecode wrote:
>>
>>> It happens when a colorized handler is copied directly from the script
>>> editor and pasted into a list response. The list only understands
>>> plain text, and styled text confuses it. I'm not sure if it happens on
>>> all platforms but we've seen it before in other posts.
>>>
>>> Brian's plaintext handler would come in handy here.
>>>
>>> --
>>> Jacqueline Landman Gay | [hidden email]
>>> HyperActive Software | http://www.hyperactivesw.com
>>> On June 23, 2018 9:25:34 PM Tom Glod via use-livecode
>>> <[hidden email]> wrote:
>>>
>>> sorry Paul...my bad.
>>>>
>>>> Richmond..... why does your code paste that way
>>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
12