Re: HOw to get htmltext from the field to display in another field
Sannyasin Brahmanathaswami wrote: > Vedas > A Random Selection > of Sutras > > gets turned around. It becomes > > Vedas > A Random Selection > of Sutras > > ?? where does the font size becomes "34" . HtmlText is not HTML. It was added to the engine as a convenient way to use HTML-like tagging to express field contents with styles. Header tags (eg "H1") are an HTML convention. LiveCode has no CSS, and hence ability to define header specifiers for size. If you try this: set the textSize of fld 1 to "h1" ...it should fail. But as a convenience or those who may be attempting to mix and match a limited form of HTML with LC's HtmlText, the engine will allow header tags as input, translating them to fixed values. As you've discovered there, the fixed value for "H1" is 34. > Even with the font size of field increases, it stays at size="34"?? Attributes of field objects are different from attributes of style runs in the content within the field object. Changes to the object's textColor, textSize, and textFont will affect the visual rendering of the object's contents only, leaving the contents as stored unaffected. If the content has any attribute set within a style run, that setting overrides any setting for the object, much as we see with inheritance of visual properties throughout LC. If you want to change the textSize of the contents of the field, you can either: a) set the textSize of char 1 to -1 of fld "Whatever" to 20 b) set the textSize of char 1 to -1 of fld "Whatever" to empty set the textSize of fld "Whatever" to 20 -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ 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
Re: HOw to get htmltext from the field to display in another field
> On 21Sep, 2020, at 10:55, Sannyasin Brahmanathaswami via use-livecode > wrote: > > ?? where does the font size becomes "34" . Even with the font size of field > increases, it stays at size="34”?? I would say from the h1 attribute that sets the text as a heading, h1 being the largest size. If you test with h2, h3 etc. you should see different font sizes. As you can see, LiveCode’s conversion to HTML is not exactly how you would write the code if you were producing a web page, AFAIK it’s designed to suit LC's internal use. Paul ___ 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
Re: HOw to get htmltext from the field to display in another field
I found it: button "Check HTML" on mouseUp If "" is in field "mainText" then -- htmltext is there set the htmlText of field "mainText" to field "mainText" else put the htmltext of field "mainText" into field "mainText" end if end mouse BUT! Vedas A Random Selection of Sutras gets turned around. It becomes Vedas A Random Selection of Sutras ?? where does the font size becomes "34" . Even with the font size of field increases, it stays at size="34"?? BR J. Landman Gay wrote: I think Swami wants a toggle, so it's likely the field won't ever be empty. ___ 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
Re: HOw to get htmltext from the field to display in another field
On 9/20/20 3:20 PM, Mark Wieder via use-livecode wrote: On 9/20/20 1:10 PM, J. Landman Gay via use-livecode wrote: As an aside, I first thought that this would work: if the htmltext of field "mainText" <> the text of field "mainText" then -- plain text is in the field which does return "false" correctly. But when I set the text of the field to the htmltext of the field and run the same test, it also returns "false". I'm not sure why. I don't see why that would ever return true. If you set the text of the field to the htmltext of the field, then isn't the htmltext of that the htmltext of the htmltext? Ah. Of course. The scales have been lifted from my eyes. The htmltext of a field put into the same field: this is a test The htmltext of that:this is a test
Silly me. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ 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
Re: HOw to get htmltext from the field to display in another field
On 9/20/20 1:10 PM, J. Landman Gay via use-livecode wrote: As an aside, I first thought that this would work: if the htmltext of field "mainText" <> the text of field "mainText" then -- plain text is in the field which does return "false" correctly. But when I set the text of the field to the htmltext of the field and run the same test, it also returns "false". I'm not sure why. I don't see why that would ever return true. If you set the text of the field to the htmltext of the field, then isn't the htmltext of that the htmltext of the htmltext? -- Mark Wieder ahsoftw...@gmail.com ___ 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
Re: HOw to get htmltext from the field to display in another field
On 9/20/20 10:55 AM, Mark Wieder via use-livecode wrote: On 9/20/20 7:28 AM, Sannyasin Brahmanathaswami via use-livecode wrote: Eureka! So easy, now to get back to the htmlText as per the code if the htmlText of field "mainText" then put the htmlText of field "mainText" into field "mainText" else set the htmlText of field "mainText" to field "mainText" end if we wonder how easy it to tell that "if" the clause is telling it is "true" if (set the htmlText of field "mainText" to field "mainText") then does not work if field "mainText" is not empty then I think Swami wants a toggle, so it's likely the field won't ever be empty. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ 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
Re: HOw to get htmltext from the field to display in another field
On 9/20/20 9:28 AM, Sannyasin Brahmanathaswami via use-livecode wrote: Eureka! So easy, now to get back to the htmlText as per the code if the htmlText of field "mainText" then put the htmlText of field "mainText" into field "mainText" else set the htmlText of field "mainText" to field "mainText" end if we wonder how easy it to tell that "if" the clause is telling it is "true" if (set the htmlText of field "mainText" to field "mainText") then does not work Typically you can check the field text for a known html entity to see if it contains html or not. I think LC uses "" because almost all html includes a paragraph mark. if "" is in field "mainText" then -- htmltext is there If your html doesn't have paragraph entities then see if you can find one that you know will be there. As an aside, I first thought that this would work: if the htmltext of field "mainText" <> the text of field "mainText" then -- plain text is in the field which does return "false" correctly. But when I set the text of the field to the htmltext of the field and run the same test, it also returns "false". I'm not sure why. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ 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
Re: HOw to get htmltext from the field to display in another field
On 9/20/20 7:28 AM, Sannyasin Brahmanathaswami via use-livecode wrote: Eureka! So easy, now to get back to the htmlText as per the code if the htmlText of field "mainText" then put the htmlText of field "mainText" into field "mainText" else set the htmlText of field "mainText" to field "mainText" end if we wonder how easy it to tell that "if" the clause is telling it is "true" if (set the htmlText of field "mainText" to field "mainText") then does not work if field "mainText" is not empty then -- Mark Wieder ahsoftw...@gmail.com ___ 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
Re: HOw to get htmltext from the field to display in another field
Eureka! So easy, now to get back to the htmlText as per the code if the htmlText of field "mainText" then put the htmlText of field "mainText" into field "mainText" else set the htmlText of field "mainText" to field "mainText" end if we wonder how easy it to tell that "if" the clause is telling it is "true" if (set the htmlText of field "mainText" to field "mainText") then does not work BR Peter Bougdanof wrote: set the htmlText of field "Src" to field "Src" ___ 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
Re: HOw to get htmltext from the field to display in another field
If the field “Src" contains: My Trek to Siva Magical Abodes Join the author on a tour of ancient Siva temples then: set the htmlText of field "Src" to field "Src" will show HTML-formatted text. Peter > On Sep 17, 2020, at 5:41 PM, Sannyasin Brahmanathaswami via use-livecode > wrote: > > Ralph, > > So this did not work. I have > > [ fld "Src" ] > > My Trek to Siva > Magical Abodes > > Join the author on a tour of ancient Siva temples > -- > [ fld "Dest" ] > > My Trek to Siva > Magical Abodes > > Join the author on a tour of ancient Siva temples > --- > It same for both fields. Neither one displays the htmltext text . > > ?? > set the htmltext of fld "checkHTML" to the htmlText of fld "mainText" > BR > > > > Ralph DiMola wrote: > >set the htmltext of fld "Dest" to the htmlText of fld "Src" > > ___ > 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 ___ 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
Re: HOw to get htmltext from the field to display in another field
On 9/17/20 5:41 PM, Sannyasin Brahmanathaswami via use-livecode wrote: Ralph, So this did not work. I have [ fld "Src" ] My Trek to Siva Magical Abodes Join the author on a tour of ancient Siva temples -- [ fld "Dest" ] My Trek to Siva Magical Abodes Join the author on a tour of ancient Siva temples --- It same for both fields. Neither one displays the htmltext text . Brahmanathaswami- Hard to tell exactly what you're looking for, but if you want to display the raw html, try put the htmltext of field "Src" into field "Dest" -- Mark Wieder ahsoftw...@gmail.com ___ 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
Re: HOw to get htmltext from the field to display in another field
Ralph, So this did not work. I have [ fld "Src" ] My Trek to Siva Magical Abodes Join the author on a tour of ancient Siva temples -- [ fld "Dest" ] My Trek to Siva Magical Abodes Join the author on a tour of ancient Siva temples --- It same for both fields. Neither one displays the htmltext text . ?? set the htmltext of fld "checkHTML" to the htmlText of fld "mainText" BR Ralph DiMola wrote: set the htmltext of fld "Dest" to the htmlText of fld "Src" ___ 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
Re: HOw to get htmltext from the field to display in another field
OR set the text of fld "Dest" to the htmText of fld "Src" IF you want to see what the htmlText (i.e. the tags) of fld "Src"actually is. On 9/17/2020 3:31 PM, Ralph DiMola via use-livecode wrote: BR, set the htmltext of fld "Dest" to the htmlText of fld "Src" Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Sannyasin Brahmanathaswami via use-livecode Sent: Thursday, September 17, 2020 3:14 PM To: How LiveCode Cc: Sannyasin Brahmanathaswami Subject: HOw to get htmltext from the field to display in another field --set the htmltext of fld "mainText" into fld "checkHTML" put text of fld "mainText" into fld "checkHTML" ?? ___ 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 ___ 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 ___ 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
RE: HOw to get htmltext from the field to display in another field
BR, set the htmltext of fld "Dest" to the htmlText of fld "Src" Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Sannyasin Brahmanathaswami via use-livecode Sent: Thursday, September 17, 2020 3:14 PM To: How LiveCode Cc: Sannyasin Brahmanathaswami Subject: HOw to get htmltext from the field to display in another field --set the htmltext of fld "mainText" into fld "checkHTML" put text of fld "mainText" into fld "checkHTML" ?? ___ 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 ___ 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
HOw to get htmltext from the field to display in another field
--set the htmltext of fld "mainText" into fld "checkHTML" put text of fld "mainText" into fld "checkHTML" ?? ___ 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