-->
Page 1 of 1

PROGMEM containg a string that has // in it.

PostPosted: Fri Jul 08, 2016 6:30 pm
by Mmiscool
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?

Code: Select allPROGMEM 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>
)=====";

Re: PROGMEM containg a string that has // in it.

PostPosted: Fri Jul 08, 2016 7:14 pm
by bbx10node
PROGMEM after the char works here.

Code: Select allconst char PROGMEM EditorPageHTML[] =  R"=====(