I am trying to add html code to the draggable code element but it gives me red invalid code icon and loses my changes when I save.
At first I tried to add my whole form to the element:
<form id="searchForm" action="/" method="get"> <div class="input-group"> <input type="text" class="form-control search" name="s" id="search" placeholder="Search..." required> <span class="input-group-btn"> <button class="btn btn-default" type="submit"><i class="fa fa-search"></i> </button> </span> </div> </form>
It didn't like this so I tried just the form tag:
<form id="searchForm" action="/" method="get"> </form>
It still wouldn't accept it so then I tried this:
It finally accepted it but now when I go to make any changes to it and click save, the code window dissapears but none of the changes I made have been saved.
How can I tell the HTML validator to chill out and accept my code? What validation library are you using? Can I get the actual error anywhere?
** EDIT **
I had a look in the code and saw you are using ace editor. I went to http://ace.c9.io/build/kitchen-sink.html and set to HTML and added my code and it detected no errors so I think you have a bug here.
** EDIT **
OK, I have discovered the exact bug. Your editor does not like it when code is pasted. I am using chrome "paste as plain text" but it just does not like it. I sat there and wrote the code out by hand and it allowed it and saved it.
Is this re-producible for you?