{"pageProps":{"error":null,"preview":false,"file":{"fileRelativePath":"content/docs/plugins.md","data":{"frontmatter":{"title":"Plugins","prev":"/docs/cms","next":"/docs/plugins/forms","consumes":[{"file":"/packages/@tinacms/core/src/plugins.ts","description":"Describes Plugin interface"},{"file":"/packages/tinacms/src/react-tinacms/use-plugin.ts","descrition":"Demonstrates usePlugin"},{"file":"/packages/@tinacms/core/src/cms.ts","description":"Demonstrates adding plugins to CMS obj"}]},"excerpt":" Plugins are objects used to extend and modify the behavior of the CMS. All plugins must conform to the Plugin interface: Beyond these properties, a plugin may contain other properties depend on it's…","markdownBody":"\n**Plugins** are objects used to extend and modify the behavior of the CMS.\n\nAll plugins must conform to the **Plugin** interface:\n\n```typescript\ninterface Plugin {\n __type: string // Identifies how the plugin should be used\n name: string // Unique identifier for the plugin\n}\n```\n\nBeyond these properties, a plugin may contain other properties depend on it's `__type`. Here are some of the types of plugins\ncurrently availble:\n\n| Plugin Type | Description |\n| --------------------------------------------------- | -------------------------------------------------------------------------- |\n| [`form`](/docs/plugins/forms) | Connect a form to the sidebar & toolbar UIs |\n| [`field`](/docs/plugins/fields) | Simplify the form creation process. |\n| [`content-creator`](/docs/plugins/content-creators) | Add options to the \"Add Content\" menu. |\n| [`screen`](/docs/plugins/screens) | Components that are rendered in overlays and modals. Accessible from menu. |\n| [`toolbar:widget`](/docs/plugins/toolbar-widgets) | Components that are rendered in the toolbar. |\n\n## Adding Plugins\n\nCall `cms.plugins.add` and pass in the plugin.\n\n```javascript\nimport { TinaCMS } from 'tinacms'\nimport { HtmlFieldPlugin, MarkdownFieldPlugin } from 'react-tinacms-editor'\n\nconst cms = new TinaCMS()\n\ncms.plugins.add(HtmlFieldPlugin)\ncms.plugins.add(MarkdownFieldPlugin)\n```\n\nAlternatively, you can call the `usePlugins` hook from inside a function component.\n\n```jsx\nimport * as React from 'react'\nimport { usePlugins } from 'tinacms'\nimport { HtmlFieldPlugin, MarkdownFieldPlugin } from 'react-tinacms-editor'\n\nexport function SomeComponent({ children }) {\n usePlugins([HtmlFieldPlugin, MarkdownFieldPlugin])\n\n return