blockUid#
Type: false | true | string[]
Default: false
Adds a stable data-uid attribute to blocks. Use it when you need to reference blocks from outside (reviews, AI targeting, syncing with external systems). Set true to enable for all blocks, or provide a list of block types.
const app = Redactor('#entry', {
blockUid: true
// or: blockUid: ['text', 'heading']
});
blockUidScope#
Type: 'top-level' | 'all'
Default: 'top-level'
Controls where block UIDs are generated. Use 'top-level' to assign data-uid only to top-level blocks, or 'all' to include nested blocks too.
const app = Redactor('#entry', {
blockUid: true,
blockUidScope: 'all'
});
trackedRefs.images#
Type: false | true | { key: string }
Default: false
Tracks image references in the editor content and can report what images were added or removed since initialization. Useful for asset cleanup or upload workflows. When true, it tracks img[src]. Use { key } to track a different attribute (for example data-src).
const app = Redactor('#entry', {
trackedRefs: {
images: true // or: { key: 'data-src' }
}
});
trackedRefs.links#
Type: false | { selector: string, key?: string }
Default: false
Tracks references for elements matched by a selector (for example links) and can report what was added or removed since initialization. By default it reads href, but you can change the attribute via key.
const app = Redactor('#entry', {
trackedRefs: {
links: { selector: 'a', key: 'href' }
}
});
customTags#
Type: string[]
Default: []
Adds extra HTML tag names to Redactor’s internal tag list used during parsing and paragraphizing. Use it when your content contains custom elements that should be treated as known tags.
const app = Redactor('#entry', {
customTags: ['my-card', 'my-embed']
});