clipboarddata["html"] problem
André.Bisseret
Andre.Bisseret at inria.fr
Wed Mar 22 14:57:07 EST 2006
Le Wednesday, 22 Mar 2006, à 17:21 Europe/Paris, pmbrig at comcast.net a
écrit :
> I am using a button to put a text field on the clipboard. I set the
> clipboarddata["html"] to the htmltext of the field, then when I try to
> paste into MS Word, my field formatting does not come through.
> Instead, the default textFont and textSize for the stack is what
> determines the format of the pasted text -- I have experimented with
> this, and changing the field properties has zero effect on the paste,
> whereas changing the stack properties changes the paste. As an added
> complication, though, setting the textFont of the stack works
> perfectly, but when I set the textSize of the stack to 10, it comes
> through as 12. All other sizes work the way they are supposed to:
> stack textSize of 9 results in size 9 text in the paste, stack
> textSize of 14 comes through as 14, etc. Only stack textSize of 10
> comes through as 12.
>
> here's the relevant portion of the script:
>
> put fld "wordPath" into wordpath
> put fld "letterPath" into letterPath
> put theHdr into fld "formatPrintText"
> set the textFont of fld "formatPrintText" to "Bookman Old Style"
> set the textSize of fld "formatPrintText" to "10"
> set the clipboarddata["html"] to the htmltext of fld "formatPrintText"
> set the clipboarddata["text"] to theHdr -- * see below
> launch letterPath with wordpath
>
> * (I've tried not setting the clipboarddata["text"] and it makes no
> difference.)
>
> I'm puzzled. The clipboarddata["html"] clearly is not getting set
> properly. I am using Dreamcard v2.6.1 build 152 on a Mac iBook running
> OSX v10.4.5, and Word for Mac v11.2.3. The problem with the size 10
> getting seen as size 12 appears to be a Word problem, since the paste
> into another text app comes through as expected.
Hi Peter,
> Why doesn't the htmlText of the field get onto the clipboard?
I recently discovered that, after "select text of fld "suchField" :
1 - put the selectedText into fld "essai" -->> doesn't keep format
when paste
2 - put the selection into fld "essai" -- >> idem
3 - set the clipboardData["text"] to the selectedText -->> idem
4 - set the clipboardData["text"] to the selection -- >> idem
BUT :
5 - copy the selectedText -->> paste in Word remains formatted
6 - copy the selection -- >> remains formatted
(Mac G4 ; 0SX 10.2.8 ; RR ; Word 10.1.0)
Best regards from Grenoble
André
> Why in the world should the default text properties of the stack have
> any effect here?
>
> Peter M. Brigham
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
More information about the use-livecode
mailing list