[openLuup] Multiple lines in variables
-
Not input from the UI, and control characters are wrapped to spaces for display.
But this code works as expected:
luup.variable_set("foo","bar",[[garp foo bung]],2) x = luup.variable_get("foo","bar",2) print(x)
giving as output:
garp foo bung
-
@akbooer I might do that, in the future. I might also submit a PR to support this in the device pages. It's a couple of CSS lines, after all.
@therealdb said in [openLuup] Multiple lines in variables:
I might also submit a PR to support this in the device pages. It's a couple of CSS lines, after all.
I should like to see those, because I tried and it didn't work (because it's a table element.)
Probably my ineptitude with CSS.
-
@therealdb said in [openLuup] Multiple lines in variables:
I might also submit a PR to support this in the device pages. It's a couple of CSS lines, after all.
I should like to see those, because I tried and it didn't work (because it's a table element.)
Probably my ineptitude with CSS.
@akbooer
Just use thistextarea { height: 20px; min-height: 20px; max-height: 400px; width: 100%; min-width: 100%; max-width: 200px; }
Perfectly fine on Chrome.
Since you have size=28 on the input, just set <textarea cols="28" /> to have the same layout.
I'll probably just force both textarea and input with a special CSS style to have them stop at 200px with max-width. Height on the textarea is still resizable.
-
Super, thanks. I'll give it a go. I was trying to do it within the confines of the W3.CSS framework.
-
Thanks so much.
I'm starting to look at this as we speak...
...currently I have a resizable text box, but the current values don't appear!
Early days, but I"m sure I"ll need help.
-
Making some progress.
The down-side is, of course, that <RETURN> doesn't now complete entry of data, which is quite a change for the user experience.
Another problem I am running into is that the height of the box is not correctly adjusted for multi-line data, so you only see the first line.
I could put a version into the testing branch if necessary, for others to try out.