I'm creating a web page where user can add their custom CSS. As of now I'm using plain text area but it is not parsing new lines and css properties properly. Which is the best way I can create a panel to read and validate CSS inside my HTML page
My current form is like this
<div class="form-group" style="min-height: 300px;">
<label for="cssString" class="control-label col-sm-4">
Enter CSS
</label>
<div class="col-sm-8">
<textarea class="form-control" id="cssString" name="customCssData" cols="5" rows="15"> `+ customCss + ` </textarea>
</div>
</div>
<form>-based UI with radio buttons and select options rather than parsing a plain text area.<textarea>and a<button type="button">such that when the button is clicked, a script creates a new<style>element in the<head>and adds the contents of the<textarea>to the<style>element?