This example shows how to enable stable block UIDs and read them from block instances.
<pre id="entry-block-uids-list"></pre>
<div id="entry-block-uids"></div>
const app = Redactor('#entry-block-uids', {
blockUid: true,
content: '<h2>Blocks with UIDs</h2><p>Each block gets a stable UID.</p>'
});
app.on('blocks:change', () => {
app.blocks.getAll().forEach((block) => {
console.log(block.getType(), block.getUid());
});
});