Feature Gates and Advanced APIs
Use the 1.0 feature catalog, entitlement helpers, export/import adapters, templates, migrations, annotations, and collaboration hooks deliberately.
Feature gates and advanced APIs
Version 1.0.0 makes the editor much easier to productize: optional capabilities are named in a catalog, gated by entitlements, and exposed through typed helpers instead of hidden UI assumptions.
Feature catalog and entitlements
`richTextEditorFeatureCatalog`, `getRichTextFeatureAccess`, and `isRichTextFeatureEnabled` let a host app make image upload, transcription, export/import, comments, review marks, schema migrations, templates, and collaboration visible only when they are actually available.
Export and import boundary
`exportRichTextBlocks`, `importRichTextBlocks`, and the JSON adapters give products a typed path for moving document content without treating editor HTML as the durable source of truth.
Templates and migrations
`instantiateRichTextTemplate` and `runRichTextSchemaMigrations` support repeatable document creation and versioned schema evolution behind explicit feature gates.
Annotations and collaboration hooks
`createRichTextAnnotations` and `connectRichTextCollaboration` expose pro-ready integration points while leaving comments, review policy, realtime transport, and permissions in the host app.
Image diagnostics
`getMissingImageBlockMetadata` and `warnIfImageBlockMissingDisplayUrl` help apps report incomplete image blocks clearly before publishing or rendering media-heavy documents.
import {
getRichTextFeatureAccess,
richTextEditorFeatureCatalog,
runRichTextSchemaMigrations,
type RichTextEditorEntitlements,
} from '@bayonai/rich-text-editor';
const entitlements: RichTextEditorEntitlements = {
transcription: true,
'export-import': true,
templates: true,
};
const exportAccess = getRichTextFeatureAccess(entitlements, 'export-import');
const availableFeatures = Object.keys(richTextEditorFeatureCatalog);