hi gang, I'm gathering from this conversation that the aim is being able to add extra data into livecode's htmltext, presumably to add extra control over display of fields, and build it all into a package. I may have brought this up before, but if I might interject an idea (or call it a workaround) into this mix. Have you considered turning the problem around? How about adding a couple of handlers to the affected field? If many fields, it could be a behavior. then mixed code like this (note last line) <p><font face="Arial Bold" size="12" color="#000000">current DATABASE is </font><font face="Arial Bold" color="#000000"><database></font></p> <p><font face="Arial Bold" size="12" color="#000000">current TABLE is </font><font face="Arial Bold" color="#000000"><table></font></p> <p><font face="Arial Bold" size="18" color="#000000" bgcolor="#ADD8E6"><i>PLEASE SELECT FIELDS AND ORDER</i></font></p> <p><font face="Arial" color="#582A0F">REARRANGE ORDER AND / OR DELETE UNWANTED FIELDS</font></p> <p> </p> <textalign=center> <tabstops=100,700> <backgroundcolor=255,255,255> will display like this: (not all mailers may get this right) current DATABASE is <database> current TABLE is <table> PLEASE SELECT FIELDS AND ORDER REARRANGE ORDER AND / OR DELETE UNWANTED FIELDS And this method, using simple property-data pairs, can set ANY property of a field, including custom ones. This could be handy for a multipurpose field -- consider <fixedLineHeight=false> Once I've created a message, I'll create a base64Encoded block of text, suitable for insertion in a script: get Base64Decode( \ "PHA+PGZvbnQgZmFjZT0iQXJpYWwgQm9sZCIgc2l6ZT0iMTIiIGNvbG9yPSIjMDAwMDAwIj5j" & \ "dXJyZW50IERBVEFCQVNFIGlzIDwvZm9udD48Zm9udCBmYWNlPSJBcmlhbCBCb2xkIiBjb2xv" & \ "cj0iIzAwMDAwMCI+Jmx0O2RhdGFiYXNlJmd0OzwvZm9udD48L3A+CjxwPjxmb250IGZhY2U9" & \ "IkFyaWFsIEJvbGQiIHNpemU9IjEyIiBjb2xvcj0iIzAwMDAwMCI+Y3VycmVudCBUQUJMRSBp" & \ "cyA8L2ZvbnQ+PGZvbnQgZmFjZT0iQXJpYWwgQm9sZCIgY29sb3I9IiMwMDAwMDAiPiZsdDt0" & \ "YWJsZSZndDs8L2ZvbnQ+PC9wPgo8cD48Zm9udCBmYWNlPSJBcmlhbCBCb2xkIiBzaXplPSIx" & \ "OCIgY29sb3I9IiMwMDAwMDAiIGJnY29sb3I9IiNBREQ4RTYiPjxpPlBMRUFTRSBTRUxFQ1Qg" & \ "RklFTERTIEFORCBPUkRFUjwvaT48L2ZvbnQ+PC9wPgo8cD48Zm9udCBmYWNlPSJBcmlhbCIg" & \ "Y29sb3I9IiM1ODJBMEYiPlJFQVJSQU5HRSBPUkRFUiBBTkQgLyBPUiBERUxFVEUgVU5XQU5U" & \ "RUQgRklFTERTPC9mb250PjwvcD4KPHA+ICAgICAgICA8L3A+Cjx0ZXh0YWxpZ249Y2VudGVy" & \ "PiA8dGFic3RvcHM9MTAwLDcwMD4gPGJhY2tncm91bmRjb2xvcj0yNTUsMjU1LDI1NT4=" ) set the extendedhtmltext of fld "whatever" to it --> EXTENDED HTML 2010 --> script lives in affected field setprop extendedhtmltext pText -- parses incoming html text for possible style and tabs info and sets accordingly -- triggers on <textalign -- set the extendedhtmlText of fld "field_listdata" to pText get line -1 of pText if it contains "<textalign" then -- we have extended html put parseTagLine(it) into tLine if tLine is not empty then assignValues tLine set the HTMLText of me to pText end if else set the HTMLText of me to pText end if end extendedhtmltext function parseTagLine pText repeat until "<" is not in pText put offset("<",pText,0) into t1 -- begin the tag put offset(">",pText,0) into t2 put character t1+1 to t2-1 of pText & return after tOut delete character 1 to t2 of pText end repeat delete last character of tOut return tOut end parseTagLine on assignValues pData set the itemDelimiter to "=" repeat for each line tln in pData put \ "set the" && (item 1 of tln) && \ "of me" && \ "to" && quote & (item 2 of tln) & quote into tCommand do tCommand end repeat end assignValues -- this is in the stack script -- I wanted it to be getprop extendedHtmltext but would have to change the name function getTheFieldSpecs tField -- put the HTMLText of field tField of this cd into pText put the textAlign of field tField of this cd into pAlign put the tabStops of field tField of this cd into pStops put the backgroundColor of field tField of this cd into pBackground return \ return & \ "<textalign=" & pAlign & ">" && \ "<tabstops=" & pStops & ">" && \ "<backgroundcolor=" & pBackground & ">" end getTheFieldSpecs On 1 January 2012 11:43, FlexibleLearning <ad...@flexiblelearning.com>wrote:
> Nice one, Richard. Could have sworn there was an undocumented <private> > tag, > but must have mis-remembered. > > Hugh Senior > FLCo > > > Hugh Senior wrote: > > Can someone please remind me of the syntax to include a 'private' tag in > the > > htmlText (one that can contain string data and is not removed by LC)? > > So far the only solution I've found for embedding metadata in text is to > use a name attribute within an anchor tab, e.g.: > > <a name="some arbitrary data">There's the text</a> > > When an anchor tag has no href attribute it's not rendered as a link, > which makes it okay for this sort of metadata. > > However, if you later add an href attribute it will remove the name > attrbute; apparently name and href are mutually exclusive in the current > implementation. > > To provide more flexibility for this sort of thing I've submitted a > request to support the span tag: > <http://quality.runrev.com/show_bug.cgi?id=9849> > > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Stephen Barncard San Francisco Ca. USA more about sqb <http://www.google.com/profiles/sbarncar> _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode