A shortcode is a WordPress-specific code that lets you do nifty things with very little effort. Shortcodes can embed files or create objects that would normally require lots of complicated, ugly code in just one line. Shortcode = shortcut.
The shortcode block can be added to a page by clicking on the Add Block button. It can be found in Widgets section. Alternatively, you can type /shortcode and press enter.
Detailed instructions on adding blocks can be found here.
In this video, you can see how you can use the short block and the different settings to modify how your content will appear.
Unlike other common blocks, the shortcode block does not include any specific settings in the block toolbar or editor sidebar.
Writing Your Shortcode
You may type your shortcode into the box provided or paste it from the available shortcodes.
Hide Block Settings
The Hide Block Settings option hides (or shows) the Block Setting panel in the editor’s sidebar.
Copy can be used to copy a selected block and then you can paste it wherever you want in the editor.
Duplicate can be used to duplicate selected block.
Insert a new block before the selected block(s).
Insert a new block after the selected block(s).
If you select Move To, you will get a blue line inside your content, you can then use the arrows to move that line up and down to where you want the selected content to be moved into, hitting return on your keyboard at that point moves the block to that position.
Add to Reusable blocks
Using the Add to Reusable blocks option lets you add the selected block to a list of reusable blocks, so you can use them on other posts or pages as well.
Select the Group option if you want to create a group of blocks and treat them as a unit. You can for instance add a common background color or other blocks to the group.
With the Remove Block option, you can delete the selected block from your content.
Every block has specific options in the editor sidebar in addition to the options found in the block toolbar. If you do not see the sidebar, simply click the ‘cog’ icon next to the Publish button.
As you can see, the shortcode block doesn’t include specific settings in the block settings.
You can transform a shortcode block into a group or into a columns, so you can further apply custom settings to the block.
Text and background colors can be set on a per-block basis, allowing you to call attention to important content.
Via the “Custom Color” link you can further modify the color choice.
Accessibility parameters are built into the new editor to warn you when the text may become illegible for persons with reading impairments.
The “Advanced” tab lets you add HTML anchor and CSS class(es) to your block.
“HTML anchor” allows you to make a unique web address for a particular “Shortcode” block. Then, you’ll be able to link directly to a “Shortcode” block of your page.
The “Additional CSS class(es)” lets you add CSS class(es) to your block, allowing you to write custom CSS and style the block as you see fit.