<script>
or <template>
tag you might need to add a little extra JavaScript to the onDisplay()
method in your grid.js file. Since the HTML is inside of a <script>
or <template>
tag, Bloqs can't perform these updates for you. For example, in the onDisplay
handler you may need to ensure the form fields in your newly added markup have the correct block ID value. The following is an example to get you started:accepts_content_type
method in your field type so that it also accepts content for “bloqs/1”.blocks_discover_fieldtypes
blocks_discover_fieldtypes
hook is called when Bloqs needs to determine which fieldtypes support Bloqs. Extensions may add or remove fieldtypes from the list of valid fieldtypes.blocks_discover_fieldtypes
is called with a single PHP array of stdClass objects, and should return that same PHP array, potentially modified.setFieldtype
method, it will be called with the actual fieldtype that is being shimmed.blocks_post_save
blocks_post_save
hook is called after Bloqs has finished saving.