actualNoteContentPart: # Formatting code with the code block editor (built-in IDE)
  Since you figure to be a fairly technical user to have found your way to this section, you might know what it means when we explain that "Amplenote's code block editor is an in-note instance of CodeMirror." CodeMirror is the text editor used by Chrome Dev Tools, Obsidian.md, CodePen, Adobe Brackets, Firefox Developer Tools, and jsfiddle. If you have used any of these environments to write or edit code, you are generally familiar with Amplenote's code editor.
  
  It looks like this:
  ```
  // Javascript{  // --------------------------------------------------------------------------------------  constants: {    defaultSystemPrompt: "You are a helpful assistant.",    pluginName: "FooPlug",    strictReplacePromptEms: [ "lookup", "sum", "thesaurus" ],    tokenReplacePrompts: {      code: `Provide a snippet of source code (in either Javascript, Python or Ruby).`,      lolz: `Provide up to 100 words of entertaining, humorous content that is a little bit edgy.`,      sum: `Calculate the sum of the table cells in the row or column of the token.`,    },  },   // --------------------------------------------------------------------------------------  insertText: {    lolz: async app => (await this._contextAwarePrompt(app, "lolz")),    code: async app => (await this._contextAwarePrompt(app, "code")),    complete: async app => (await this._contextAwarePrompt(app, "complete")),    lookup: async app => (await this._contextAwarePrompt(app, "lookup")),    sum: async app => (await this._contextAwarePrompt(app, "sum"))  },   // --------------------------------------------------------------------------------------  // https://www.amplenote.com/help/developing_amplenote_plugins#noteOption  noteOption: {    "revise": async function(app, noteUUID) {      const instruction = await app.prompt("How should this note be revised?");      if (!instruction) return;       const note = await app.notes.find(noteUUID);      const noteContent = await note.content();      const result = await this._callOpenAI(app, "reviseContent", [ instruction, noteContent ]);      const actionIndex = await app.alert(result, {        actions: [ { icon: "post_add", label: "Insert in note" } ]      });      if (actionIndex === 0) {        note.insertContent(result);      }    },    "summarize": async function(app, noteUUID) {      const note = await app.notes.find(noteUUID);      const noteContent = await note.content();      const result = await this._callOpenAI(app, "summarize", noteContent);      const actionIndex = await app.alert(result, {        actions: [ { icon: "post_add", label: "Insert in note" } ]      });      if (actionIndex === 0) {        note.insertContent(result);      }    },  },}
  ```
  
  Note that the first line, specifying the language (// Javascript) can be removed without changing the syntax coloring. It may need to be specified initially, before deleting, if the language you are working in can not be inferred.
processedNoteContent: ---
  title: Code block & colored block text formatting
  headers: # Formatting code with the code block editor (built-in IDE)
  ---
  Formatting code with the code block editor (built-in IDE)
  Since you figure to be a fairly technical user to have found your way to this section, you might know what it means when we explain that "Amplenote's code block editor is an in-note instance of CodeMirror." CodeMirror is the text editor used by Chrome Dev Tools, Obsidian.md, CodePen, Adobe Brackets, Firefox Developer Tools, and jsfiddle. If you have used any of these environments to write or edit code, you are generally familiar with Amplenote's code editor. It looks like this: // Javascript{  // --------------------------------------------------------------------------------------  constants: {    defaultSystemPrompt: "You are a helpful assistant.",    pluginName: "FooPlug",    strictReplacePromptEms: [ "lookup", "sum", "thesaurus" ],    tokenReplacePrompts: {      code: `Provide a snippet of source code (in either Javascript, Python or Ruby).`,      lolz: `Provide up to 100 words of entertaining, humorous content that is a little bit edgy.`,      sum: `Calculate the sum of the table cells in the row or column of the token.`,    },  },   // --------------------------------------------------------------------------------------  insertText: {    lolz: async app => (await this._contextAwarePrompt(app, "lolz")),    code: async app => (await this._contextAwarePrompt(app, "code")),    complete: async app => (await this._contextAwarePrompt(app, "complete")),    lookup: async app => (await this._contextAwarePrompt(app, "lookup")),    sum: async app => (await this._contextAwarePrompt(app, "sum"))  },   // --------------------------------------------------------------------------------------  // https://www.amplenote.com/help/developing_amplenote_plugins#noteOption  noteOption: {    "revise": async function(app, noteUUID) {      const instruction = await app.prompt("How should this note be revised?");      if (!instruction) return;       const note = await app.notes.find(noteUUID);      const noteContent = await note.content();      const result = await this._callOpenAI(app, "reviseContent", [ instruction, noteContent ]);      const actionIndex = await app.alert(result, {        actions: [ { icon: "post_add", label: "Insert in note" } ]      });      if (actionIndex === 0) {        note.insertContent(result);      }    },    "summarize": async function(app, noteUUID) {      const note = await app.notes.find(noteUUID);      const noteContent = await note.content();      const result = await this._callOpenAI(app, "summarize", noteContent);      const actionIndex = await app.alert(result, {        actions: [ { icon: "post_add", label: "Insert in note" } ]      });      if (actionIndex === 0) {        note.insertContent(result);      }    },  },}
  Note that the first line, specifying the language (// Javascript) can be removed without changing the syntax coloring. It may need to be specified initially, before deleting, if the language you are working in can not be inferred.
noteTitle: Code block & colored block text formatting