Stripping styling from the clipboard...

Richmond Mathewson richmondmathewson at
Sat Jun 23 16:32:25 EDT 2018

Hey, Wow, it's the Richmond school of shovels and primitive stuff at its 

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:

gettheplainTextoffld "ff1"
putit intofld "ff2"

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

ALTHOUGH (ouch) this does NOT work:

    putit intofld "ff2"

and this does not work:

   puttheclipboardDataintofld "ff1"
   send"mouseUp" tobtn "Button"

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


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
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the Use-livecode mailing list