Re: htmlText not supporting target in ?

2016-06-21 Thread Monte Goulding
It has not been raised since I started so I suspect it isn't on the radar just 
now. The team is focussed on delivering Infinite LiveCode + maintenance and 
incremental improvements elsewhere at the moment. At one point I used to use a 
setProp `xmlText` with custom properties on the field to apply as formatting 
for the element.

Sent from my iPhone

> On 21 Jun 2016, at 11:51 PM, Richard Gaskin  
> wrote:
> 
> @Monte: Some time ago Mark Waddingham floated the notion of adding "xmlText" 
> as a synonym for "htmlText", eventually deprecating the latter.  I like the 
> idea since it helps manage expectations about what htmlText is designed for.  
> Is that still seen as desirable?


___
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: htmlText not supporting target in ?

2016-06-21 Thread Richard Gaskin

Ton Kuypers wrote:

> Hi Richard & Monte,
>
> The problem is that I am creating html text that will be stored in a
> database, to be retrieved by a PHP site.
> The user gets an easy interface to manipulate this html, but a major
> issue is that when the user adds links to PDF files, they need to
> open in a new window.
> And the only way I know, is to add a “target” to the link…
>
> so now I’m kinda stuck… bummer :-(

As long as you keep in mind that htmlText is not HTML, you have the key 
to become unstuck.


One of my larger projects is an authoring toolkit to produce a web site 
of medical reference info.  Everything is authored in LiveCode fields in 
a very WYSIWYG way - with the new field object we even set the leading 
(using the spaceAbove paragraph property) to match the site's CSS. 
Nearly pixel-perfect, and super-convenient for our non-techie team of 
physicians to use.


And that's where I come in:  like most software, what it takes to 
transform a fluid WYSIWYG authoring environment into browser-ready HTML 
requires some work.  Not much, but some.


Parsing htmlText is MUCH easier than parsing HTML, since it's much more 
consistent.  You'll find as many different HTML styles as there are 
people writing web pages, but htmlText is always generated by the 
LiveCode engine with glorious reliable consistency.


There are many ways to transform htmlText into HTML, and some of those 
will depend on the specifics of what your authoring tool does and what 
you need to do with it on the Web.


But as a simple example, if you pass your htmlText through a function, 
perhaps something like this, you'll have the beginnings of a convenient 
way to do that transformation in one place, where you can refine and 
enhance it any time you need:



function htmlTextToHtml pData
  put offset("", pData, tStart) into tEnd
put " target='_blank'>" into char (tStart+tEnd) of pData
  end if
  return pData
end htmlTextToHtml

--
 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: htmlText not supporting target in ?

2016-06-21 Thread Ton Kuypers
Hi Richard & Monte,

The problem is that I am creating html text that will be stored in a database, 
to be retrieved by a PHP site.
The user gets an easy interface to manipulate this html, but a major issue is 
that when the user adds links to PDF files, they need to open in a new window.
And the only way I know, is to add a “target” to the link…

so now I’m kinda stuck… bummer :-(


Met vriendelijke groeten,
Warm Regards,



Ton Kuypers
+32 (0) 477 739 530

Steenweg op Leopoldsburg 100 • B-2490 • Balen • Belgium
www.publishingtools4u.com





> On 21 jun. 2016, at 15:51, Richard Gaskin  wrote:
> 
> Monte Goulding wrote:
> > Ah… the target attribute is not supported by htmlText. htmlText is
> > a limited subset of html that supports only field chunk properties.
> > There’s no guarantee on round-tripping your htmlText.
> 
> Given how much of modern HTML makes good use of CSS, the range of things one 
> can round-trip through htmlText is close to zero.
> 
> And that's not bad, given that they're designed for entirely different 
> purposes:  HTML provides content and structure for web pages in a browser, 
> and htmlText uses HTML-like conventions to provide a plain-text 
> representation of a field's content and styles.
> 
> @Ton: If you use Mike's script to trap the linkClicked message the URL will 
> open in a new window anyway (a browser window), so you'll have what you're 
> looking for without an extra target attribute.
> 
> @Monte: Some time ago Mark Waddingham floated the notion of adding "xmlText" 
> as a synonym for "htmlText", eventually deprecating the latter.  I like the 
> idea since it helps manage expectations about what htmlText is designed for.  
> Is that still seen as desirable?
> 
> -- 
> 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

___
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: htmlText not supporting target in ?

2016-06-21 Thread Richard Gaskin

Monte Goulding wrote:
> Ah… the target attribute is not supported by htmlText. htmlText is
> a limited subset of html that supports only field chunk properties.
> There’s no guarantee on round-tripping your htmlText.

Given how much of modern HTML makes good use of CSS, the range of things 
one can round-trip through htmlText is close to zero.


And that's not bad, given that they're designed for entirely different 
purposes:  HTML provides content and structure for web pages in a 
browser, and htmlText uses HTML-like conventions to provide a plain-text 
representation of a field's content and styles.


@Ton: If you use Mike's script to trap the linkClicked message the URL 
will open in a new window anyway (a browser window), so you'll have what 
you're looking for without an extra target attribute.


@Monte: Some time ago Mark Waddingham floated the notion of adding 
"xmlText" as a synonym for "htmlText", eventually deprecating the 
latter.  I like the idea since it helps manage expectations about what 
htmlText is designed for.  Is that still seen as desirable?


--
 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: htmlText not supporting target in ?

2016-06-21 Thread Monte Goulding

> On 21 Jun 2016, at 10:06 PM, Mike Bonner  wrote:
> 
>> No, it is not the code, it is just the htmlText command stripping out the
>> “target” part of the html  text…
>> It just disappears when you use it

Ah… the target attribute is not supported by htmlText. htmlText is a limited 
subset of html that supports only field chunk properties. There’s no guarantee 
on round-tripping your htmlText.

Cheers

Monte
___
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: htmlText not supporting target in ?

2016-06-21 Thread Mike Bonner
t; > > > Groetjes
> > > >
> > > > Klaus
> > > >
> > > > --
> > > > Klaus Major
> > > > http://www.major-k.de <http://www.major-k.de/>
> > > > [hidden email]
> 
> > > >
> > > >
> > > > _______
> > > > use-livecode mailing list
> > > > [hidden email]
> 
> > > > Please visit this url to subscribe, unsubscribe and manage your
> > > subscription preferences:
> > > > http://lists.runrev.com/mailman/listinfo/use-livecode <
> http://lists.runrev.com/mailman/listinfo/use-livecode>
> > >
> > > --
> > > Klaus Major
> > > http://www.major-k.de <http://www.major-k.de/>
> > > [hidden email]
> 
> > >
> > >
> > > ___
> > > use-livecode mailing list
> > > [hidden email]
> 
> > > Please visit this url to subscribe, unsubscribe and manage your
> > > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode <
> http://lists.runrev.com/mailman/listinfo/use-livecode>
> > >
> > ___
> > use-livecode mailing list
> > [hidden email] 
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode <
> http://lists.runrev.com/mailman/listinfo/use-livecode>
> >
> > If you reply to this email, your message will be added to the discussion
> below:
> >
> http://runtime-revolution.278305.n4.nabble.com/htmlText-not-supporting-target-in-a-href-xxx-tp4705966p4706008.html
> <
> http://runtime-revolution.278305.n4.nabble.com/htmlText-not-supporting-target-in-a-href-xxx-tp4705966p4706008.html
> >
> > To start a new topic under Revolution - User, email
> ml-node+s278305n278306...@n4.nabble.com
> > To unsubscribe from Revolution - User, click here <
> http://runtime-revolution.278305.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=278306=dGt1eXBlcnNAcHVibGlzaGluZ3Rvb2xzNHUuY29tfDI3ODMwNnw1ODc5MTUzNzU=
> >.
> > NAML <
> http://runtime-revolution.278305.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
>
>
> pt4u-3.jpg (9K) <
> http://runtime-revolution.278305.n4.nabble.com/attachment/4706011/0/pt4u-3.jpg
> >
>
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/htmlText-not-supporting-target-in-a-href-xxx-tp4705966p4706011.html
> Sent from the Revolution - User mailing list archive at Nabble.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
>
___
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: htmlText not supporting target in ?

2016-06-21 Thread Ton Kuypers
v.com/mailman/listinfo/use-livecode 
> > > <http://lists.runrev.com/mailman/listinfo/use-livecode>
> > 
> > -- 
> > Klaus Major 
> > http://www.major-k.de <http://www.major-k.de/>
> > [hidden email]  
> > 
> > 
> > ___ 
> > use-livecode mailing list 
> > [hidden email]  
> > Please visit this url to subscribe, unsubscribe and manage your 
> > subscription preferences: 
> > http://lists.runrev.com/mailman/listinfo/use-livecode 
> > <http://lists.runrev.com/mailman/listinfo/use-livecode>
> >
> ___ 
> use-livecode mailing list 
> [hidden email]  
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences: 
> http://lists.runrev.com/mailman/listinfo/use-livecode 
> <http://lists.runrev.com/mailman/listinfo/use-livecode> 
> 
> If you reply to this email, your message will be added to the discussion 
> below:
> http://runtime-revolution.278305.n4.nabble.com/htmlText-not-supporting-target-in-a-href-xxx-tp4705966p4706008.html
>  
> <http://runtime-revolution.278305.n4.nabble.com/htmlText-not-supporting-target-in-a-href-xxx-tp4705966p4706008.html>
> To start a new topic under Revolution - User, email 
> ml-node+s278305n278306...@n4.nabble.com 
> To unsubscribe from Revolution - User, click here 
> <http://runtime-revolution.278305.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=278306=dGt1eXBlcnNAcHVibGlzaGluZ3Rvb2xzNHUuY29tfDI3ODMwNnw1ODc5MTUzNzU=>.
> NAML 
> <http://runtime-revolution.278305.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>


pt4u-3.jpg (9K) 
<http://runtime-revolution.278305.n4.nabble.com/attachment/4706011/0/pt4u-3.jpg>




--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/htmlText-not-supporting-target-in-a-href-xxx-tp4705966p4706011.html
Sent from the Revolution - User mailing list archive at Nabble.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: htmlText not supporting target in ?

2016-06-20 Thread Mike Bonner
You'd have to code a method to do what you want using linkclicked. When a
text link in a field is clicked it fires a linkclicked message with one
parameter that contains the link text. If you want to place the contents of
the url into a different field, something like this in the field handler.

on linkclicked pUrl
 put url pUrl into field "destinationField"
end linkclicked

If I remember right, you must have the text of the field locked for this to
work.

On Mon, Jun 20, 2016 at 8:28 AM, Klaus major-k  wrote:

> After reading this a second time, it looks I have misunderstood the actual
> problem, sorry...
>
> > Am 20.06.2016 um 15:41 schrieb Klaus major-k :
> >
> > Dag Ton,
> >
> >> Am 20.06.2016 um 15:22 schrieb tkuyp...@telenet.be <
> tkuyp...@publishingtools4u.com>:
> >>
> >> Is this a bug or am I missing something?
> >>
> >> I pasted the following URL into a field:
> >>
> >> click http://www.malamix.be/ClientData/88/234/35691/1313/1/Flyer%20Malamix%20Food%20Nederlands.pdf
> <
> http://www.malamix.be/ClientData/88/234/35691/1313/1/Flyer%20Malamix%20Food%20Nederlands.pdf>”>here
> for the full specs 
> >>
> >> Using a click on a button, I enter this into another textfield, where
> it shows as htmlText, so the link is invisible and the “here” is underlined
> and blue.
> >>
> >> (The field contains more info, which will be shown in a webshop which
> I’m filling with data.)
> >>
> >>
> >> Switching the field back and forward between html and the actual code
> works fine.
> >> But I need to show the link in a new window, so I add “ target=‘_blank’
> “ after the link:
> >> click http://www.malamix.be/ClientData/88/234/35691/1313/1/Flyer%20Malamix%20Food%20Nederlands.pdf
> <
> http://www.malamix.be/ClientData/88/234/35691/1313/1/Flyer%20Malamix%20Food%20Nederlands.pdf>”
> target=‘_blank'>here for the full specs 
> >>
> >> And when I switch between the visual text and the html-code, the
> target-part is gone…
> >>
> >> I’m using LC 0.01, but the same result in 8.02 rc2.
> >>
> >> Bug or “hidden feature”?
> >
> > as far as I remember, and that goes back to MetaCard 2.0 :-), this has
> never been working
> > out of the box unless you add a "on linkclicked tLink..." handler to the
> fields script.
> >
> >> Met vriendelijke groeten,
> >> Warm Regards,
> >>
> >>
> >>
> >> Ton Kuypers
> >> +32 (0) 477 739 530
> >>
> >> Steenweg op Leopoldsburg 100 • B-2490 • Balen • Belgium
> >> www.publishingtools4u.com 
> >
> > Groetjes
> >
> > Klaus
> >
> > --
> > Klaus Major
> > http://www.major-k.de
> > kl...@major-k.de
> >
> >
> > ___
> > 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
>
> --
> Klaus Major
> http://www.major-k.de
> kl...@major-k.de
>
>
> ___
> 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: htmlText not supporting target in ?

2016-06-20 Thread Klaus major-k
After reading this a second time, it looks I have misunderstood the actual 
problem, sorry...

> Am 20.06.2016 um 15:41 schrieb Klaus major-k :
> 
> Dag Ton,
> 
>> Am 20.06.2016 um 15:22 schrieb tkuyp...@telenet.be 
>> :
>> 
>> Is this a bug or am I missing something?
>> 
>> I pasted the following URL into a field:
>> 
>> click > href="http://www.malamix.be/ClientData/88/234/35691/1313/1/Flyer%20Malamix%20Food%20Nederlands.pdf
>>  
>> ”>here
>>  for the full specs 
>> 
>> Using a click on a button, I enter this into another textfield, where it 
>> shows as htmlText, so the link is invisible and the “here” is underlined and 
>> blue. 
>> 
>> (The field contains more info, which will be shown in a webshop which I’m 
>> filling with data.)
>> 
>> 
>> Switching the field back and forward between html and the actual code works 
>> fine.
>> But I need to show the link in a new window, so I add “ target=‘_blank’ “ 
>> after the link: 
>> click > href="http://www.malamix.be/ClientData/88/234/35691/1313/1/Flyer%20Malamix%20Food%20Nederlands.pdf
>>  
>> ”
>>  target=‘_blank'>here for the full specs 
>> 
>> And when I switch between the visual text and the html-code, the target-part 
>> is gone… 
>> 
>> I’m using LC 0.01, but the same result in 8.02 rc2.
>> 
>> Bug or “hidden feature”?
> 
> as far as I remember, and that goes back to MetaCard 2.0 :-), this has never 
> been working 
> out of the box unless you add a "on linkclicked tLink..." handler to the 
> fields script.
> 
>> Met vriendelijke groeten,
>> Warm Regards,
>> 
>> 
>> 
>> Ton Kuypers
>> +32 (0) 477 739 530
>> 
>> Steenweg op Leopoldsburg 100 • B-2490 • Balen • Belgium
>> www.publishingtools4u.com 
> 
> Groetjes
> 
> Klaus
> 
> --
> Klaus Major
> http://www.major-k.de
> kl...@major-k.de
> 
> 
> ___
> 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

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
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: htmlText not supporting target in ?

2016-06-20 Thread Klaus major-k
Dag Ton,

> Am 20.06.2016 um 15:22 schrieb tkuyp...@telenet.be 
> :
> 
> Is this a bug or am I missing something?
> 
> I pasted the following URL into a field:
> 
> click  href="http://www.malamix.be/ClientData/88/234/35691/1313/1/Flyer%20Malamix%20Food%20Nederlands.pdf
>  
> ”>here
>  for the full specs 
> 
> Using a click on a button, I enter this into another textfield, where it 
> shows as htmlText, so the link is invisible and the “here” is underlined and 
> blue. 
> 
> (The field contains more info, which will be shown in a webshop which I’m 
> filling with data.)
> 
> 
> Switching the field back and forward between html and the actual code works 
> fine.
> But I need to show the link in a new window, so I add “ target=‘_blank’ “ 
> after the link: 
> click  href="http://www.malamix.be/ClientData/88/234/35691/1313/1/Flyer%20Malamix%20Food%20Nederlands.pdf
>  
> ”
>  target=‘_blank'>here for the full specs 
> 
> And when I switch between the visual text and the html-code, the target-part 
> is gone… 
> 
> I’m using LC 0.01, but the same result in 8.02 rc2.
> 
> Bug or “hidden feature”?

as far as I remember, and that goes back to MetaCard 2.0 :-), this has never 
been working 
out of the box unless you add a "on linkclicked tLink..." handler to the fields 
script.

> Met vriendelijke groeten,
> Warm Regards,
> 
> 
> 
> Ton Kuypers
> +32 (0) 477 739 530
> 
> Steenweg op Leopoldsburg 100 • B-2490 • Balen • Belgium
> www.publishingtools4u.com 

Groetjes

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
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

htmlText not supporting target in ?

2016-06-20 Thread tkuyp...@telenet.be
Is this a bug or am I missing something?

I pasted the following URL into a field:

click http://www.malamix.be/ClientData/88/234/35691/1313/1/Flyer%20Malamix%20Food%20Nederlands.pdf
 
”>here
 for the full specs 

Using a click on a button, I enter this into another textfield, where it shows 
as htmlText, so the link is invisible and the “here” is underlined and blue. 

(The field contains more info, which will be shown in a webshop which I’m 
filling with data.)


Switching the field back and forward between html and the actual code works 
fine.
But I need to show the link in a new window, so I add “ target=‘_blank’ “ after 
the link: 
click http://www.malamix.be/ClientData/88/234/35691/1313/1/Flyer%20Malamix%20Food%20Nederlands.pdf
 
”
 target=‘_blank'>here for the full specs 

And when I switch between the visual text and the html-code, the target-part is 
gone… 

I’m using LC 0.01, but the same result in 8.02 rc2.

Bug or “hidden feature”?



Met vriendelijke groeten,
Warm Regards,



Ton Kuypers
+32 (0) 477 739 530

Steenweg op Leopoldsburg 100 • B-2490 • Balen • Belgium
www.publishingtools4u.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