volto-iframe-block: Volto Add-on
To install your project, you must choose the method appropriate to your version of Volto.
Create a new Volto project (you can skip this step if you already have one):
npm install -g yo @plone/generator-volto
yo @plone/volto my-volto-project --addon @kitconcept/volto-iframe-block
cd my-volto-project
Add @kitconcept/volto-iframe-block to your package.json:
"addons": [
"@kitconcept/volto-iframe-block"
],
"dependencies": {
"@kitconcept/volto-iframe-block": "*"
}Download and install the new add-on by running:
yarn install
Start volto with:
yarn start
Add @kitconcept/volto-iframe-block to your package.json:
"dependencies": {
"@kitconcept/volto-iframe-block": "*"
}Add @kitconcept/volto-iframe-block to your volto.config.js:
const addons = ['@kitconcept/volto-iframe-block'];If this package provides a Volto theme, and you want to activate it, then add the following to your volto.config.js:
const theme = '@kitconcept/volto-iframe-block';Visit http://localhost:3000/ in a browser, login, and check the awesome new features.
validUrls allows you to restrict the use of the iFrame block by restricting the URLs that editors are allowed to embed in the iframe. If an unvalid URL is entered, an error is thrown.
config.blocks.blocksConfig.iframe.validUrls = [''];The project is licensed under the MIT license.