editor icon indicating copy to clipboard operation
editor copied to clipboard

Could you create a demo extension for a button block?

Open mynameisfreedom opened this issue 6 years ago • 1 comments

Hello, could you create a demo extension for a button block? The main issue I am facing is adding attributes to block, and wiki still doesn't cover that part.

Thank you in advance.

mynameisfreedom avatar Nov 07 '19 14:11 mynameisfreedom

@mynameisfreedom What would the 'button block' do? Would it simply add a button to the page? What kind of button? What would the button do?

If you want to allow your user to add arbitrary buttons to the page, there might be ways to go about it without having to go through the complication of adding a whole new block type to the Editor. For example, you could simply define a new kirbytag (or several) that would allow your user to add and customise the button to their liking - something like this:

(button text: read more type: modal target: product-info)

You can read more about defining your own kirbytags here.

luxlogica avatar Mar 12 '20 01:03 luxlogica