bobbingwide / oik-blocks

WordPress 5.0 blocks for oik shortcodes
https://oik-plugins.com/oik-plugins/oik-blocks
GNU General Public License v3.0
1 stars 0 forks source link

Enable easier copy to clipboard of block list text #53

Open bobbingwide opened 1 year ago

bobbingwide commented 1 year ago

The oik-block/blocklist block provides a plain text view that I've been using to create a snapshot of the blocks delivered in each version of Gutenberg. By comparing the files for two versions I can see which blocks have been added, changed or deleted.

attributes are:

<!-- wp:oik-block/blocklist {"prefix":"core","showBlockLink":false,"showBatch":true,"component":"gutenberg"} -->

The trouble is, when the block is displayed in this mode it's really really difficult to select all the text to be copied to the clipboard and to only get the text and not the <br /> tags.

I've not found an easy solution with the current implementation of the block. What can I do to make it easier?

BTW. There's also a problem that occurs when toggling the value of showBlockLink. Sometimes the contents doesn't get fully replaced.

bobbingwide commented 1 year ago

The trouble is, when the block is displayed in this mode it's really really difficult to select all the text to be copied to the clipboard and to only get the text and not the <br /> tags.

The workaround is to select the text in two parts, the top half and the bottom half. It's fairly easy to stop in the middle of the text. Almost impossible to stop at the end.

Another workaround is to save the post and view the output. It should be a lot easier to select the contents of the <pre> tag from the front end.