adding HTML code

Q&A about the latest versions
Post Reply
laralesmes
Posts: 6
Joined: Fri Jun 04, 2021 2:42 pm

Is it possible to inject HTML code (button, script tag, ....), beside just the formatting possible from the text field? Or is there a parametre that allows text field to behave nicely with raw HTML (not adding <br/>, or other elements)?
User avatar
k.ary.n
Gnome
Posts: 615
Joined: Wed Aug 15, 2007 1:02 pm

Sure! You can also use CSS.
https://ggnome.com/doc/html-css/
laralesmes
Posts: 6
Joined: Fri Jun 04, 2021 2:42 pm

Thank you Karyn!

However, when I try to add HTML, I have weird "<br>" tags being added, and the scripts I'm adding (between "script" tags) doesn't seem to be working. Basically, I would want to add in a UI panel something like that : https://jsbin.com/zibutaveco/edit?html,console,output

thanks!
User avatar
k.ary.n
Gnome
Posts: 615
Joined: Wed Aug 15, 2007 1:02 pm

I'm not sure why a break tag would be added. But it's not clear what it is you're trying to achieve. Is the example code you sent the exact code you're using?
laralesmes
Posts: 6
Joined: Fri Jun 04, 2021 2:42 pm

Hello Karyn!

Thanks so much for getting back.
Yes this is the exact code I am usign: https://jsbin.com/zibutaveco/edit?html,console,output

Here is what I get when i put it into pano2vr in a text field
Screenshot 2021-06-29 180452.jpg
Screenshot 2021-06-29 180452.jpg (335.94 KiB) Viewed 4033 times
Screenshot 2021-06-29 180905.jpg
Screenshot 2021-06-29 180905.jpg (184.42 KiB) Viewed 4033 times
not sure why "<br>" tags are added?

what I am trying to do is to create a email field that users can fill, connected to a server dashboard where I can track who completed the 360 experience

thanks!
Lara
User avatar
thomas
Chief Gnome
Posts: 2611
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

You can just add javascript by starting the text with javascript: and the textbox value. So you can start with javascript:""; and just enter your code after that.

Code: Select all

javascript:"";
console.log("Hi!");

See: https://ggnome.com/doc/javascript-api/
MfG, Thomas
HSharma​
Posts: 45
Joined: Wed Aug 02, 2017 2:32 pm

Thomas,
This does not work in Object2VR. I have not seen any documentation on this as well...
I love Object2VR, But sorry to say that the UI is like way old, negligible help and quirky way of working....
Post Reply