codesnippetspro / code-snippets

Code Snippets WordPress Plugin
https://codesnippets.pro
326 stars 106 forks source link

Enhancement: Source Code Gutenberg Block – copy top clipboard, themes etc. #134

Closed deckerweb closed 2 years ago

deckerweb commented 2 years ago

The Source Code Block for Gutenberg is super useful and a perfect feature for the plugin!

Here are the things I would definitely expect from such a block to make it even better:

Pretty much every feature from this great plugin here https://wordpress.org/plugins/code-syntax-block/ would make sense for your source code block :-)

Additionally a source code block would make sense for more Builders beyond Elementor & Gutenberg:

Having a native way in those builders to embed source code could make sense in my opinion.

sheabunge commented 2 years ago

You must have an ability to predict the future! I'm currently working on this very thing and would find feedback very valuable.

Specifically, would you prefer these settings to be in a central location (on the settings page) and apply to all code blocks, or be able to configure each code block individually?

More editors are planned for the future. Elementor and Gutenberg were the first because it's what we're most familiar with, but I don't see any reason why we couldn't eventually support all the popular ones with decent APIs.

deckerweb commented 2 years ago

Thank you! Personally I would just love to use central location in plugin settings to set the default for my whole site (set and forget). However, I could imagine that some users would prefer to have the option to overwrite the global setting on a per block basis if needed. For example: showing normally PHP source code but from time to time showing some CSS and wanting to differentiate this a bit from your PHP source code - in tutorial blog posts whatever. So instead of using a class and make some CSS yourself (snippet, haha), just have the option to preselect another theme for the specific block you are just using.

sheabunge commented 2 years ago

Version 3.2.0 brings highlighter themes, copy to clipboard button, line numbers, and highlight lines options.

I'm going to close this for now and add your suggestion for page builder support to our roadmap, but please do let us know there's anything you'd like further improved on what we have now.

Thank you for your feedback!