line spacing coming in from text pasted from pdf or .doc

Phil Davis revdev at pdslabs.net
Wed Mar 30 13:52:22 EDT 2016


Hi Richard,

It sounds like you want the pasted text to leave behind any source 
document-based properties and use those of the field you're pasting 
into. Right?

During the paste, have you tried putting the clipboardData["text"] into 
a variable, then putting the variable into the field? (Or set the text 
of the selectedChunk to the variable)  That should get rid of any and 
all text properties. Then if your problem is still there, it's probably 
invisible text characters or some such thing - not text props at least.

That's what I would try.

Phil Davis



On 3/30/16 10:19 AM, Dr. Hawkins wrote:
> I am having a problem when pasting text from pdf and .doc into fields.
>
> There are some properties that I can't find documented in livecode that
> survive the paste.
>
> Particularly, I'm seeing line number attributes and line spacing separate
> from textHeight survive.
>
> >From pdf, I seem to be able to clear it by setting the text of the
> selectedObject to the text of the selectedObject, but this doesn't work for
> word.
>
> I see a field with a lineHeight of 21 and textSize of 12 with about 12
> points of space above the line, and 12 points below.
>
> It's also not spaceAbove or spaceBelow; those don't clear it either.
>

-- 
Phil Davis





More information about the use-livecode mailing list