htmlText not supporting target in <a href="xxx">?

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

htmlText not supporting target in <a href="xxx">?

Ton Kuypers
Is this a bug or am I missing something?

I pasted the following URL into a field:

<p>click <a href="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</a> for the full specs </p>

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:
<p>click <a href="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</a> for the full specs </p>

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 <http://www.publishingtools4u.com/>





_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: htmlText not supporting target in <a href="xxx">?

Klaus major-k
Dag Ton,

> Am 20.06.2016 um 15:22 schrieb [hidden email] <[hidden email]>:
>
> Is this a bug or am I missing something?
>
> I pasted the following URL into a field:
>
> <p>click <a href="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</a> for the full specs </p>
>
> 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:
> <p>click <a href="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</a> for the full specs </p>
>
> 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 <http://www.publishingtools4u.com/>

Groetjes

Klaus

--
Klaus Major
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
Reply | Threaded
Open this post in threaded view
|

Re: htmlText not supporting target in <a href="xxx">?

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 <[hidden email]>:
>
> Dag Ton,
>
>> Am 20.06.2016 um 15:22 schrieb [hidden email] <[hidden email]>:
>>
>> Is this a bug or am I missing something?
>>
>> I pasted the following URL into a field:
>>
>> <p>click <a href="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</a> for the full specs </p>
>>
>> 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:
>> <p>click <a href="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</a> for the full specs </p>
>>
>> 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 <http://www.publishingtools4u.com/>
>
> Groetjes
>
> Klaus
>
> --
> Klaus Major
> 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

--
Klaus Major
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
Reply | Threaded
Open this post in threaded view
|

Re: htmlText not supporting target in <a href="xxx">?

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 <[hidden email]> 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 <[hidden email]>:
> >
> > Dag Ton,
> >
> >> Am 20.06.2016 um 15:22 schrieb [hidden email] <
> [hidden email]>:
> >>
> >> Is this a bug or am I missing something?
> >>
> >> I pasted the following URL into a field:
> >>
> >> <p>click <a href="
> 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</a>
> for the full specs </p>
> >>
> >> 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:
> >> <p>click <a href="
> 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</a> for the full specs </p>
> >>
> >> 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 <http://www.publishingtools4u.com/>
> >
> > Groetjes
> >
> > Klaus
> >
> > --
> > Klaus Major
> > 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
>
> --
> Klaus Major
> 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
>
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: htmlText not supporting target in <a href="xxx">?

Ton Kuypers
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


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 07:10, Mike Bonner [via Runtime Revolution] <[hidden email]> wrote:

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 <<a href="x-msg://17/user/SendEmail.jtp?type=node&amp;node=4706008&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]> 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 <<a href="x-msg://17/user/SendEmail.jtp?type=node&amp;node=4706008&amp;i=1" target="_top" rel="nofollow" link="external" class="">[hidden email]>:
> >
> > Dag Ton,
> >
> >> Am 20.06.2016 um 15:22 schrieb <a href="x-msg://17/user/SendEmail.jtp?type=node&amp;node=4706008&amp;i=2" target="_top" rel="nofollow" link="external" class="">[hidden email] <
> <a href="x-msg://17/user/SendEmail.jtp?type=node&amp;node=4706008&amp;i=3" target="_top" rel="nofollow" link="external" class="">[hidden email]>:
> >>
> >> Is this a bug or am I missing something?
> >>
> >> I pasted the following URL into a field:
> >>
> >> <p>click <a href="
> 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</a>
> for the full specs </p>
> >>
> >> 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:
> >> <p>click <a href="
> 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</a> for the full specs </p>
> >>
> >> 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 <http://www.publishingtools4u.com/>
> >
> > Groetjes
> >
> > Klaus
> >
> > --
> > Klaus Major
> > http://www.major-k.de
> > <a href="x-msg://17/user/SendEmail.jtp?type=node&amp;node=4706008&amp;i=4" target="_top" rel="nofollow" link="external" class="">[hidden email]
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > <a href="x-msg://17/user/SendEmail.jtp?type=node&amp;node=4706008&amp;i=5" target="_top" rel="nofollow" link="external" class="">[hidden email]
> > 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
> <a href="x-msg://17/user/SendEmail.jtp?type=node&amp;node=4706008&amp;i=6" target="_top" rel="nofollow" link="external" class="">[hidden email]
>
>
> _______________________________________________
> use-livecode mailing list
> <a href="x-msg://17/user/SendEmail.jtp?type=node&amp;node=4706008&amp;i=7" target="_top" rel="nofollow" link="external" class="">[hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
<a href="x-msg://17/user/SendEmail.jtp?type=node&amp;node=4706008&amp;i=8" target="_top" rel="nofollow" link="external" class="">[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
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
To start a new topic under Revolution - User, email [hidden email]
To unsubscribe from Revolution - User, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: htmlText not supporting target in <a href="xxx">?

Mike Bonner
i guess i don't understand what you're trying to do.  Will think on it.

On Tue, Jun 21, 2016 at 12:25 AM, Ton Kuypers <
[hidden email]> 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
>
>
> 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 07:10, Mike Bonner [via Runtime Revolution] <
> [hidden email]> wrote:
> >
> > 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 <[hidden email]
> <x-msg://17/user/SendEmail.jtp?type=node&node=4706008&i=0>> 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 <[hidden email]
> <x-msg://17/user/SendEmail.jtp?type=node&node=4706008&i=1>>:
> > > >
> > > > Dag Ton,
> > > >
> > > >> Am 20.06.2016 um 15:22 schrieb [hidden email]
> <x-msg://17/user/SendEmail.jtp?type=node&node=4706008&i=2> <
> > > [hidden email]
> <x-msg://17/user/SendEmail.jtp?type=node&node=4706008&i=3>>:
> > > >>
> > > >> Is this a bug or am I missing something?
> > > >>
> > > >> I pasted the following URL into a field:
> > > >>
> > > >> <p>click <a href="
> > >
> 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
> >
> > > <
> > >
> 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</a>
> > > for the full specs </p>
> > > >>
> > > >> 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:
> > > >> <p>click <a href="
> > >
> 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
> >
> > > <
> > >
> 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</a> for the full specs </p>
> > > >>
> > > >> 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 <http://www.publishingtools4u.com/ <
> http://www.publishingtools4u.com/>>
> > > >
> > > > Groetjes
> > > >
> > > > Klaus
> > > >
> > > > --
> > > > Klaus Major
> > > > http://www.major-k.de <http://www.major-k.de/>
> > > > [hidden email]
> <x-msg://17/user/SendEmail.jtp?type=node&node=4706008&i=4>
> > > >
> > > >
> > > > _______________________________________________
> > > > use-livecode mailing list
> > > > [hidden email]
> <x-msg://17/user/SendEmail.jtp?type=node&node=4706008&i=5>
> > > > 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]
> <x-msg://17/user/SendEmail.jtp?type=node&node=4706008&i=6>
> > >
> > >
> > > _______________________________________________
> > > use-livecode mailing list
> > > [hidden email]
> <x-msg://17/user/SendEmail.jtp?type=node&node=4706008&i=7>
> > > 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] <x-msg://17/user/SendEmail.jtp?type=node&node=4706008&i=8>
> > 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
> [hidden email]
> > To unsubscribe from Revolution - User, click here <
> >.
> > NAML <
>
http://runtime-revolution.278305.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=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
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> 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
Reply | Threaded
Open this post in threaded view
|

Re: htmlText not supporting target in <a href="xxx">?

Monte Goulding-2

> On 21 Jun 2016, at 10:06 PM, Mike Bonner <[hidden email]> 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
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: htmlText not supporting target in <a href="xxx">?

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
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: htmlText not supporting target in <a href="xxx">?

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 <[hidden email]> 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
> ____________________________________________________________________
> [hidden email]                http://www.FourthWorld.com
>
>
> _______________________________________________
> 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

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: htmlText not supporting target in <a href="xxx">?

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("<a href=", pData) into tStart
   if tStart > 0 then
     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
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: htmlText not supporting target in <a href="xxx">?

Monte Goulding-2
In reply to this post by Richard Gaskin
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 <[hidden email]> 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
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode