I'm creating non-production HTML/CSS/jQuery prototypes. So no need for rock solid security etc.
The way I usually create dynamic HTML elements is to create string literals like this:
var observation =
"<div id=\"first_observation\">" +
"<div class=\"row\">" +
"<div class=\"col-6\">" +
"<fieldset class=\"form-group row\">" +
"<div class=\"col-sm-10 offset-2\">" +
"<div class=\"row\">" +
"<div class=\"col-2\"> <h3>Type</h3> </div>" +
"</div>" +
"<div class=\"row\">" +
"<div class=\"col\">" +
etc . . . then I append the string to the DOM using jQuery.
I'm looking for either 1) a better way to do this 2) a way to highlight the HTML and format it in my text editor.
I'd prefer 2) in that I know you can create an objects with Javascript and set the attributes using object dot notation, but I find it's easiest to read "in HTML" when trying to work out layout issues.
Anybody know of a text editor or extension that would allow for this?