diff --git a/packages/lib/services/plugins/api/types.ts b/packages/lib/services/plugins/api/types.ts index be5519398c..ed4678c5ba 100644 --- a/packages/lib/services/plugins/api/types.ts +++ b/packages/lib/services/plugins/api/types.ts @@ -612,6 +612,45 @@ export enum ContentScriptType { * plugin](https://github.com/laurent22/joplin/blob/dev/packages/renderer/MdToHtml/rules/mermaid.ts) * to see how the data should be structured. * + * ## Supporting the Rich Text Editor + * + * Joplin's Rich Text Editor works with rendered HTML, which is converted back + * to markdown when saving. To prevent the original markdown for your plugin from + * being lost, Joplin needs additional metadata. + * + * To provide this, + * 1. Wrap the HTML generated by your plugin in an element with class `joplin-editable`. + * For example, + * ```html + *
... original source here ...+ * ... rendered HTML here ... + *