KevinBatdorf / code-block-pro

A Gutenberg code block with syntax highlighting powered by VS Code
https://code-block-pro.com
126 stars 10 forks source link

How do i show the code block inline or what are shortcodes ? #271

Open aussietechexperts opened 9 months ago

aussietechexperts commented 9 months ago

I want to show the highlighted code inline in a List. What shortcodes it supports ?

KevinBatdorf commented 9 months ago

There's no shortcodes so you need to be able to use WP blocks. You can nest them inside any other block though. Do you have a more specific example?

vowonderful commented 7 months ago

KevinBatdorf, I think that aussietechexperts just like me, I noticed that the generated code of Code Block Pro works in other page constructors other than Gutenberg. For example, the generated source code can be inserted into the Brick Builder or Break dance page builder, and the code snippet will work correctly in a third-party page builder. However, to do this, you need to generate code in Gutenberg and copy its source code to another constructor, which is not very convenient for the average user. And we were trying to find a way to establish a simple connection between a third-party constructor and the Code Block Pro plugin. For example, using a custom block that will fill in the Code Block Pro shortcode with the specified parameters. Thus, the Code Block Pro plugin would work on absolutely any page builders.

KevinBatdorf commented 7 months ago

I have it designed to render into static content through the Gutenberg system (as you type actually). While the output might be usable (it's usable anywhere really, including in headless), I woulnd't be able to port any of the UI controls over as all of that is Gutenberg specific code.

Not sure there would be a way other than building a UI for each builder using their system. The two you mentioned also aren't open source either.