actualNoteContentPart: ## app.context
  Provides details about where the plugin action was invoked, and allows for interaction at that location.
  
  ### app.context.embedArgs
  Only present in [onEmbedCall](/help/developing_amplenote_plugins/actions#onEmbedCall)  action functions - the array of arguments used when rendering the embed. See [Inline embeds with parameters](/help/developing_amplenote_plugins/actions#Inline_embeds_with_parameters)  
  
  ### app.context.link
  [link](/help/developing_amplenote_plugins/appendix_i#link)  object describing properties of the link the plugin action was invoked from, e.g. for insertText or replaceText actions. Will be undefined if the plugin action was not invoked from a context where the selection is in a link.
  
  ### app.context.noteUUID
  The String UUID of the note the plugin action was invoked from. This will include the note UUID that a task is in when invoking an action (e.g. insertText or replaceText) in the tasks view, or other editable task lists.
  
  ### app.context.pluginUUID
  The String UUID of the plugin itself - this is the note UUID of the plugin note.
  
  ### app.context.renderEmbed
  Only present when in an embed context (e.g. in onEmbedCall or renderEmbed action functions), re-renders the embed. Note that the current embed args are used - this function does not take any arguments.
  
  ### app.context.renderEmbedTarget
  In renderEmbed and onEmbedCall action functions, will be set to a string representing where the embed is being rendered. One of:
  "note" embed rendering inline in a note (regardless of where note is being displayed)
  "notesDashboard" embed rendering in the notes section with no notes open (e.g. on [https://www.amplenote.com/notes](https://www.amplenote.com/notes) )
  "prompt" embed rendering in prompt call (i.e. app.prompt(...))
  "publicNote" embed rendering inline in a public note
  "peekViewer" embed rendering in the Peek Viewer sidebar 
  "section" embed rendering dedicated plugin section
  
  ### app.context.replaceSelection
  Replaces the [selection]()  with [markdown content](/help/developing_amplenote_plugins/appendix_iii) . This function will not be present for plugin actions that are not invoked with a user selection/cursor placed in a note - i.e. it is only defined for insertText and replaceText plugin actions. Note that the user can navigate away from a note while a plugin action is executing, in which case, calling this function is not guaranteed to do anything.
  Arguments
  	String of markdown content to replace the selection with
  Returns
  	boolean indicating if the given markdown content replaced the selection. Returns false if the selection has been completely removed from the note, or if the markdown content can't be inserted at the current location (e.g. a table in a task).
  Throws
  	If the context in which the selection existed is no longer available, e.g. the note is completely closed
  ```
   {   async insertText(app) {     const replacedSelection = await app.context.replaceSelection("**new content**");     if (replacedSelection) {       return null;     } else {       return "plain text"; // Fall back in cases where the markdown content wouldn't be valid at the selection position     }   } }
  ```
  
  ### app.context.selectionContent
  When invoked from an editor context, the [markdown representation](/help/developing_amplenote_plugins/appendix_iii)  of the content that is currently selected. 
  
  ### app.context.taskUUID
  If the plugin action was invoked from a position in a task, this will be the String UUID of the task in question. 
  ```
  {  insertText(app) {    return app.context.taskUUID || "not in a task";  }} 
  ```
processedNoteContent: ---
  title: App Interface: Plugin methods to interact with ...
  headers: ## app.context
  ---
  app.context
  Provides details about where the plugin action was invoked, and allows for interaction at that location. 
  app.context.embedArgs
  Only present in [onEmbedCall](/help/developing_amplenote_plugins/actions#onEmbedCall)
    action functions - the array of arguments used when rendering the embed. See [Inline embeds with parameters](/help/developing_amplenote_plugins/actions#Inline_embeds_with_parameters)
  
  app.context.link
  [link](/help/developing_amplenote_plugins/appendix_i#link)
    object describing properties of the link the plugin action was invoked from, e.g. for insertText or replaceText actions. Will be undefined if the plugin action was not invoked from a context where the selection is in a link. 
  app.context.noteUUID
  The String UUID of the note the plugin action was invoked from. This will include the note UUID that a task is in when invoking an action (e.g. insertText or replaceText) in the tasks view, or other editable task lists. 
  app.context.pluginUUID
  The String UUID of the plugin itself - this is the note UUID of the plugin note. 
  app.context.renderEmbed
  Only present when in an embed context (e.g. in onEmbedCall or renderEmbed action functions), re-renders the embed. Note that the current embed args are used - this function does not take any arguments. 
  app.context.renderEmbedTarget
  In renderEmbed and onEmbedCall action functions, will be set to a string representing where the embed is being rendered. One of:
  "note" embed rendering inline in a note (regardless of where note is being displayed)
  "notesDashboard" embed rendering in the notes section with no notes open (e.g. on [https://www.amplenote.com/notes](https://www.amplenote.com)`
   )
  "prompt" embed rendering in prompt call (i.e. app.prompt(...))
  "publicNote" embed rendering inline in a public note
  "peekViewer" embed rendering in the Peek Viewer sidebar
  "section" embed rendering dedicated plugin section 
  app.context.replaceSelection
  Replaces the [selection]()
    with [markdown content](/help/developing_amplenote_plugins/appendix_iii)
   . This function will not be present for plugin actions that are not invoked with a user selection/cursor placed in a note - i.e. it is only defined for insertText and replaceText plugin actions. Note that the user can navigate away from a note while a plugin action is executing, in which case, calling this function is not guaranteed to do anything.
  Arguments
  String of markdown content to replace the selection with
  Returns
  boolean indicating if the given markdown content replaced the selection. Returns false if the selection has been completely removed from the note, or if the markdown content can't be inserted at the current location (e.g. a table in a task).
  Throws
  If the context in which the selection existed is no longer available, e.g. the note is completely closed  {   async insertText(app) {     const replacedSelection = await app.context.replaceSelection("**new content**");     if (replacedSelection) {       return null;     } else {       return "plain text"; // Fall back in cases where the markdown content wouldn't be valid at the selection position     }   } }
  
  app.context.selectionContent
  When invoked from an editor context, the [markdown representation](/help/developing_amplenote_plugins/appendix_iii)
    of the content that is currently selected. 
  app.context.taskUUID
  If the plugin action was invoked from a position in a task, this will be the String UUID of the task in question. {  insertText(app) {    return app.context.taskUUID || "not in a task";  }}
noteTitle: App Interface: Plugin methods to interact with user notes