actualNoteContentPart: ## onNavigate
  Called when the user changes locations in the app, e.g. when opening a note, jots, etc. Also called when plugin initially loads (with the current location at that time). Note that the check function - if defined - will not be called for this action.
  Arguments
  	app [App Interface](/help/developing_amplenote_plugins/app_interface)  
  	String url being navigated to
  Returns
  	Nothing
  ```
  {  onNavigate(app, url) {    console.log("new location: " + url);  }} 
  ```
  
  ## onNoteCreated
  Called when a note has been created on the current client. Note that the identifier associated with the note may be a local-only identifier that is only usable on the same client. It can later be exchanged for a long-term identifier by calling [app.findNote](/help/developing_amplenote_plugins/app_interface#app.findNote) , but the identifier will remain usable on the same client.
  Arguments
  	app [App Interface](/help/developing_amplenote_plugins/app_interface)  
  	noteHandle describing the newly created note
  Returns
  	Nothing
  ```
  {  async onNoteCreated(app, noteHandle) {    await app.alert("note created: " + JSON.stringify(noteHandle));  }} 
  ```
  
  ## renderEmbed
  Called when an embed assigned to the plugin needs to render HTML. Embeds are HTML documents loaded in an isolated iFrame that does not have access to the outer application, and operates with relaxes CSP rules compared to the outer application. Once rendered, an embed will stay loaded / running until the user navigates away from the note containing the embed or closes the Peek Viewer (for sidebar embeds).
  Arguments
  	app [App Interface](/help/developing_amplenote_plugins/app_interface)  
  	...args any additional arguments passed to [app.openSidebarEmbed](/help/developing_amplenote_plugins/app_interface#app.openSidebarEmbed) . For embeds inline in note content, [you can pass arguments using this syntax]() .
  Returns
  	String of HTML that will be loaded in the embed
  Additional notes
  	In the returned HTML, a tags that have the class amplenote-link will be setup as links to Amplenote client locations, so the following link would allow a user to click/tap to open jots, in all clients: <a class="amplenote-link" href="https://www.amplenote.com/notes/jots">open jots</a>. Only links to valid Amplenote-client-handled URLs are handled.
  
  ```
  {  renderEmbed(app, ...args) {    return "<b>hello</b> from a plugin";  }}
  ```
  
  
  
  
  
  ### Inserting embeds in notes
  Embeds are supported in markdown as <object> HTML tags with a specific protocol specified in the data attribute. To insert an embed in a specific location in a note, an [insertText](/help/developing_amplenote_plugins/actions#insertText)  action can be used:
  ```
  {  async insertText(app) {    // `app.context.pluginUUID` is always supplied - it is the UUID of the plugin note    await app.context.replaceSelection(`<object data="plugin://${ app.context.pluginUUID }" data-aspect-ratio="2" />`);    return null;  }}
  ```
  By default, plugin embeds render in a fixed 1:1 aspect ratio (width == height). An aspect ratio can be supplied in the data-aspect-ratio attribute, as shown in the code above, dictating the desired width/height for the embed.
  
  Alternatively, any app call that can receive markdown can be used to add embeds to note content. Note that embeds aren't valid in all locations (e.g. they can't be inserted in tasks), so the embed object might be placed after a task if it is included in the body of the task, or dropped in cases where there isn't a valid insertion position nearby.
processedNoteContent: ---
  title: Actions: Ways to invoke/initiate plugin execution
  headers: ## onNavigate
  ---
  onNavigate
  Called when the user changes locations in the app, e.g. when opening a note, jots, etc. Also called when plugin initially loads (with the current location at that time). Note that the check function - if defined - will not be called for this action.
  Arguments
  app [App Interface](/help/developing_amplenote_plugins/app_interface)
  
  String url being navigated to
  Returns
  Nothing {  onNavigate(app, url) {    console.log("new location: " + url);  }} 
  
  onNoteCreated
  Called when a note has been created on the current client. Note that the identifier associated with the note may be a local-only identifier that is only usable on the same client. It can later be exchanged for a long-term identifier by calling [app.findNote](/help/developing_amplenote_plugins/app_interface#app.findNote)
   , but the identifier will remain usable on the same client.
  Arguments
  app [App Interface](/help/developing_amplenote_plugins/app_interface)
  
  noteHandle describing the newly created note
  Returns
  Nothing {  async onNoteCreated(app, noteHandle) {    await app.alert("note created: " + JSON.stringify(noteHandle));  }} 
  
  renderEmbed
  Called when an embed assigned to the plugin needs to render HTML. Embeds are HTML documents loaded in an isolated iFrame that does not have access to the outer application, and operates with relaxes CSP rules compared to the outer application. Once rendered, an embed will stay loaded / running until the user navigates away from the note containing the embed or closes the Peek Viewer (for sidebar embeds).
  Arguments
  app [App Interface](/help/developing_amplenote_plugins/app_interface)
  
  ...args any additional arguments passed to [app.openSidebarEmbed](/help/developing_amplenote_plugins/app_interface#app.openSidebarEmbed)
   . For embeds inline in note content, [you can pass arguments using this syntax]()
   .
  Returns
  String of HTML that will be loaded in the embed
  Additional notes
  In the returned HTML, a tags that have the class amplenote-link will be setup as links to Amplenote client locations, so the following link would allow a user to click/tap to open jots, in all clients: 
  open jots 
  . Only links to valid Amplenote-client-handled URLs are handled. {  renderEmbed(app, ...args) {    return "<b>hello</b> from a plugin";  }}
  
  Inserting embeds in notes
  Embeds are supported in markdown as 
   HTML tags with a specific protocol specified in the data attribute. To insert an embed in a specific location in a note, an [insertText](/help/developing_amplenote_plugins/actions#insertText)
    action can be used: {  async insertText(app) {    // `app.context.pluginUUID` is always supplied - it is the UUID of the plugin note    await app.context.replaceSelection(`<object data="plugin://${ app.context.pluginUUID }" data-aspect-ratio="2" />`);    return null;  }}
  By default, plugin embeds render in a fixed 1:1 aspect ratio (width == height). An aspect ratio can be supplied in the data-aspect-ratio attribute, as shown in the code above, dictating the desired width/height for the embed. Alternatively, any app call that can receive markdown can be used to add embeds to note content. Note that embeds aren't valid in all locations (e.g. they can't be inserted in tasks), so the embed object might be placed after a task if it is included in the body of the task, or dropped in cases where there isn't a valid insertion position nearby.
noteTitle: Actions: Ways to invoke/initiate plugin execution