actualNoteContentPart: While there are examples scattered throughout the Plugin API documentation, this page is dedicated to accumulating examples to help plugin authors access functional building blocks.
  
  # Starter repos
  While this documentation of examples will continue to grow & expand over time, there are also some evergreen repos we recommend visiting as the starting point for writing your own Amplenote plugin:
  [Plugin Embed Starter Project](https://github.com/alloy-org/amplenote-embed-starter) . Build a React-based application that can be rendered in a note, sidebar, or anywhere else
  [Plugin Template](https://github.com/alloy-org/plugin-template) . A barebones plugin with the means to run tests. 
  [AmpleAI](https://www.amplenote.com/help/using_default_ai_plugin)  and [the multitude of existing plugins](https://www.amplenote.com/help/guide_to_developing_amplenote_plugins#______Learn_by_example) . There are more than 100 Amplenote plugins, almost all of which can be retrieved to use as examples & context.
  
  # Creating a new task action initiated by /slash command
  If you want to implement a slash command that is conditionally available in tasks, you'll need to use the check method within a string command nested in the appOption section of your plugin definition. That is,
  
  ```
  (() => {  const plugin = {    appOption: {      "My Task Command": {        check: async function(app) {          return app.context.taskUUID;        },        run: async function(app, noteUUID) {          const task = await app.getTask(app.context.taskUUID);          console.log("Now we can act upon task", task);        }      }    }  };  return plugin;})()
  ```
  
  When you retrieve a task, you have access to all of the properties mentioned in the [task definition](https://www.amplenote.com/help/developing_amplenote_plugins/appendix_i#task) .
  
  ## Parsing Rich Footnotes in a task
  How to parse the text of a task with Rich Footnotes? Let's look at an example footnote task:
  Here's a task with [description and image](https://images.amplenote.com/d499b3d8-534d-11ef-95c7-0663d8339c46/25fded33-89b1-4013-a67a-b5b775432888.png) , [a link to your favorite website](https://amplenote.com/)  [a text-only footenote]() , [a link to a note](https://www.amplenote.com/notes/2508625c-7931-11ea-a77f-4a9bae68938e)  and a connected task [﻿](https://www.amplenote.com/notes/tasks/6b863439-9f25-40b0-9c61-7ff9523e2c92?relation=connected)  
  The task connected
  
  This yields the following content returned in task.content:
  ```
  Here's a task with [description and image][^1], [a link to your favorite website](amplenote.com) [a text-only footenote][^2] [a link to a note](https://www.amplenote.com/notes/2508625c-7931-11ea-a77f-4a9bae68938e) and a connected task [b2bdd0dc-7871-429a-807a-2b35c1a3c7d8](https://www.amplenote.com/notes/tasks/b2bdd0dc-7871-429a-807a-2b35c1a3c7d8?relation=connected). /plan [^1]: [description and image]()     With description and picture     ![](https://images.amplenote.com/d499b3d8-534d-11ef-95c7-0663d8339c46/25fded33-89b1-4013-a67a-b5b775432888.png) [^2]: [a text-only footenote]()     Only text? 
  ```
  
  Most often, you'll want an LLM to parse this text to
processedNoteContent: ---
  title: Plugin API Examples
  tags: 
  ---
  While there are examples scattered throughout the Plugin API documentation, this page is dedicated to accumulating examples to help plugin authors access functional building blocks. 
  Starter repos
  While this documentation of examples will continue to grow & expand over time, there are also some evergreen repos we recommend visiting as the starting point for writing your own Amplenote plugin:
  [Plugin Embed Starter Project](https://github.com)`
   . Build a React-based application that can be rendered in a note, sidebar, or anywhere else
  [Plugin Template](https://github.com)`
   . A barebones plugin with the means to run tests.
  [AmpleAI](https://www.amplenote.com)`
    and [the multitude of existing plugins](https://www.amplenote.com)`
   . There are more than 100 Amplenote plugins, almost all of which can be retrieved to use as examples & context. 
  Creating a new task action initiated by /slash command
  If you want to implement a slash command that is conditionally available in tasks, you'll need to use the check method within a string command nested in the appOption section of your plugin definition. That is, (() => {  const plugin = {    appOption: {      "My Task Command": {        check: async function(app) {          return app.context.taskUUID;        },        run: async function(app, noteUUID) {          const task = await app.getTask(app.context.taskUUID);          console.log("Now we can act upon task", task);        }      }    }  };  return plugin;})()
  When you retrieve a task, you have access to all of the properties mentioned in the [task definition](https://www.amplenote.com)`
   . 
  Parsing Rich Footnotes in a task
  How to parse the text of a task with Rich Footnotes? Let's look at an example footnote task:
  Here's a task with [description and image](https://images.amplenote.com)`
   , [a link to your favorite website](https://amplenote.com)`
    [a text-only footenote]()
   , [a link to a note](https://www.amplenote.com)`
    and a connected task [﻿](https://www.amplenote.com)`
  
  The task connected This yields the following content returned in task.content: Here's a task with [description and image][^1], [a link to your favorite website](amplenote.com) [a text-only footenote][^2] [a link to a note](https://www.amplenote.com/notes/2508625c-7931-11ea-a77f-4a9bae68938e) and a connected task [b2bdd0dc-7871-429a-807a-2b35c1a3c7d8](https://www.amplenote.com/notes/tasks/b2bdd0dc-7871-429a-807a-2b35c1a3c7d8?relation=connected). /plan [^1]: [description and image]()     With description and picture     ![](https://images.amplenote.com/d499b3d8-534d-11ef-95c7-0663d8339c46/25fded33-89b1-4013-a67a-b5b775432888.png) [^2]: [a text-only footenote]()     Only text? 
  Most often, you'll want an LLM to parse this text to
noteTitle: Plugin API Examples