Puts a copy button on every code block. The pattern every docs site uses.
Buttons are chrome, never document content: they live in the container
alongside the editor surface, so no step, no decoration and no node view is
involved, and the document is untouched by copying.
Follows the floating-control shape of createTableToolbar: measure the
target block, position within the host's coordinate space, and re-run on
every transaction so the buttons track edits, scrolling and reflow.
Puts a copy button on every code block. The pattern every docs site uses. Buttons are chrome, never document content: they live in the container alongside the editor surface, so no step, no decoration and no node view is involved, and the document is untouched by copying.
Follows the floating-control shape of
createTableToolbar: measure the target block, position within the host's coordinate space, and re-run on every transaction so the buttons track edits, scrolling and reflow.