Couple of HTML questions

Sean Cole (Pi) sean at pidigital.co.uk
Mon Sep 13 18:14:21 EDT 2021


Hi Colin,
If it is HTML5 deployment you are looking to do from LC, how time critical
is your project? At the moment, HTML5 deployment is still quite broken in
many ways. It may be best to wait until LC10 which is using a whole new
engine (which looks very promising).

That said, the current engine 'CAN' do what you have 'asked' for sure, both
'post tData to URL(tUrl)' and 'set the textstyle of char 10 to 20 of fld
"myField" to "bold"' (although that will depend on what texttype is already
in that field potentially - it can be a bit kooky at times).

Other things in html5 deployment you will run into that will most likely
frustrate a little.

Regarding 'post', note the following from the LC dictionary:
Cross-platform note: The HTML5 engine only supports HTTP and HTTPs
protocols. ((ie, you can't use file;//, ftp://, etc))
Cross-platform note: URLs fetched by the HTML5 engine from a domain other
than that of the hosting the page may be blocked by web browsers, unless
the server hosting the URL sets the "Access-Control-Origin" header
appropriately. ((But as you are likely hosting the PHP you will have
control over that))

If you run into any specific HTML5 deployment issues I'd be happy to help
you through if you want to PM me at all.

Sean

On Mon, 13 Sept 2021 at 20:20, matthias rebbe via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Hi Colin,
>
> just tried here with a Livecode Server script not with a php script.
>
> Posting data from an Html5 stack to an url definitely works.
> (see https://livecode.dermattes.de/postmr/postmr.html <
> https://livecode.dermattes.de/postmr/postmr.html>)
>
> What i do not get working is setting the text style. Even if i set the
> style already in the IDE and built the html5 standalone the text style is
> reset to plain when the html5 stack is displayed in the browser.
>
> Regards,
> Matthias
>
>
>
> > Am 13.09.2021 um 04:53 schrieb Colin Holgate via use-livecode <
> use-livecode at lists.runrev.com>:
> >
> > I want to have an online text editor, that can post some styled text,
> that then gets read into a desktop stack. There are a lot of HTML styled
> text editors around, but I thought I may as well try using LiveCode for
> that part as well.
> >
> > Two issues I’ve hit are the setting of the style of the text, and then
> posting the text to a PHP script, that stores the HTML changes.
> >
> > Can these lines work in an HTML published stack?:
> >
> > post data to URL theurl
> >
> > and:
> >
> > set the textstyle of the selection to bold
> >
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at 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 at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list