Current News

Moderator: Mmiscool

User avatar
By Mmiscool
#50426 I just posted up a new build that includes a snazzy code highlighting editor capability.

To use it you must upload 2 files to your module using the file manager page.
The 2 files are located here.
https://github.com/esp8266/Basic/tree/NewWebSockets/CSS

Once these 2 files are uploaded (don't decompress them. upload them as .gz files) the editor page will show line numbers and will start highlighting key words and such.

I used code mirror's vbscript highlighting example and have not added all the commands and functions for esp basic yet but it will do a good job with logic structures like if then statements, strings, values and math
https://codemirror.net/




2016-07-08 20_02_45-172.16.0.121_edit.png
User avatar
By RichardS
#50430 Snazzy??? I think it's more Bitch'n :-)

RichardS
User avatar
By forlotto
#50440 hrmmm so the editor does CSS but the compiled user code does not allow for html or css correctly still.
Am I getting this correct?
Or does html/CSS now work for user compiled code as well?

Either way there are many interesting things to note.

- msgbranch can output html fine while just normal bas run code can not.
- css works fine for the editor but does not work for bas run code.

These little things should be pointers in a direction as to the area of why something is/not working this should point you nearly to the bug being in the bas run code and the way it is handled, parsed, stored, displayed, or compiled.

I am not so sure about websockets.js I don't quite understand how it works and the reason for the socket being on a different port maybe it would be best if port 80 was used for both websockets and non websockets I am really not sure here what is the cause but as I say it is an interesting issue that 3.x faces. would be nice to know if html/css worked in any versions after 2.24. The beauty is each update on github shows you the exact code that was updated each time I would assume the version after 2.24 should show you all of the highlighted changed code and if this was really inspected it might prove useful.

Love the feature btw is this going to come standardized baked in in future versions or is this something we must essentially add in ourselves ?

Thanks mike great update.
User avatar
By Mmiscool
#50502 The javascript and css files must be upliaded bt the user. They take up a non trivial qmount of space. You can use the device with out them but they can provide a better experience if uploaded.

As to the html and css on normal aplicate gui pages i belive the soulution is to use the returngui commad after complex html is sent using wprint. In this way it forces the browser to refresh the whole page as html from the html buffer in stead of the instant ondemand sendi g of the information over web sockets.