PROGMEM containg a string that has // in it.
Posted: Fri Jul 08, 2016 6:30 pm
Hello,
I am trying to place a html link in a progmem variable. Unfortunately it get errors on compiling. I think this is because it thinks this is a comment. Is there an easy solution?
I am trying to place a html link in a progmem variable. Unfortunately it get errors on compiling. I think this is because it thinks this is a comment. Is there an easy solution?
Code: Select all
PROGMEM const char EditorPageHTML[] = R"=====(
<script src="editor.js"></script>
<script src="https://raw.githubusercontent.com/esp8266/Basic/NewWebSockets/CSS/codemirror.js.gz"></script>
<link rel="stylesheet" href="https://raw.githubusercontent.com/esp8266/Basic/NewWebSockets/CSS/codemirror.css.gz">
<form action='edit' id="usrform">
<input type="text" id="FileName" name="name" value="*program name*">
<input type="submit" value="Open" name="open">
</form>
<button onclick="ShowTheFileList()">Files List</button>
<button onclick="SaveTheCode()">Save</button>
<br>
<textarea rows="30" style="width:100%" name="code" id="code">*program txt*</textarea><br>
<input type="text" id="Status" value="">
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
lineNumbers: true,
indentUnit: 4
});
</script>
)=====";