Adds a block control button for setting the HTML id attribute on the current block. Useful for anchor links and targeted CSS.
Select a block, open the control dropdown, and choose Block ID. Enter a unique id and save.
<script src="/assets/redactor/redactor.js"></script>
<script src="/assets/redactor/plugins/block-id/block-id.js"></script>
const app = Redactor('#entry', {
plugins: ['blockId']
});
string)
Redactor('#entry', {
plugins: ['blockId'],
blockId: {
icon: '<svg...>'
}
});
en: {
blockId: {
'block-id': 'Block ID',
'id': 'ID'
}
}
This plugin does not emit events.
This plugin does not expose a public API.