The File Block allows you to drop a download link to document files right in your website.
In this video you can see how to use the file block and the different settings to modify how it is displayed.
Steps to add a file block to your post or page:
- To add a file block, use the Add Block button, or you can type
/fileand press enter.
Detailed instructions on adding blocks can be found here.
- To add a file, you can use the upload button to upload your files directly from your computer, or you can use the media library option to add files from your media library.
When you add a file to your post, you can edit the file name and also copy the file URL.
Block Toolbar Block Toolbar
Every block comes with unique toolbar icons and block specific user controls that allow you to manipulate the block right in the editor.
The File block has five buttons:
- Transform to
- Moving handles
- Change alignment
- More options
When you click on the Transform button you can convert the File block into a Group block. The Group gives you the ability to change the background color around the Quote.
The up and down arrow icons can be used to move a block up and down in your document.
Using the alignment drop-down from the toolbar, you are able to align your file to the left, make it center-aligned, or align it to the right. You can also make the file block wide width and full width.
Using the Replace button, you can replace your file by uploading a new or another file from your computer or add from your media library.
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.
Edit as HTML
The Edit as HTML option allows you to modify the HTML code of the embed block.
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.
Block Settings Block Settings
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 file block offers text link settings, download button settings, and advanced options.
Text Link Settings
You can choose whether to link to the media file directly or a separate attachment page. These two options can be opened on a new page if you wish to not have the user navigate away from the original page.
Download Button Settings
You’ll notice that the file block comes with a Download button that can be toggled on and off from the block options panel.
By toggling it off, the file name will appear hyperlinked on the live site.
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 “File” block. Then, you’ll be able to link directly to a “File” 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.
The advanced tab lets you add a CSS class to your block, allowing you to write custom CSS and style the block as you see fit.