- Back to Docs
- Get Started
- API
- Options
- Methods
- Guides
- Custom Elements
- Save
- Other Resources
- Changelog
- Browser Support
Custom Elements
Design Block
Below is the basic JS for creating a custom design block. The FroalaPages.RegisterDesignBlock
method can be used to achieve that.
// FroalaPages.RegisterDesignBlock takes 3 params:
// - category name
// - the HTML for the design block
// - the path for the image
FroalaPages.RegisterDesignBlock('Call To Action',
'<section class="fdb-block">
<div class="container">
<div class="row justify-content-center">
<div class="col-12 col-md-8 text-center">
<p class="lead">"Separated they live in Bookmarksgrove right at the coast of the Semantics, far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast."</p>
<p class="mt-5 mt-sm-4"><a class="btn btn-primary" href="https://froala.com">Download</a></p>
</div>
</div>
</div>
</section>', 'call-to-action/1.jpg');