Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Additional default blocks #1146

Open
whollaus opened this issue Sep 13, 2022 · 4 comments
Open

[Feature Request]: Additional default blocks #1146

whollaus opened this issue Sep 13, 2022 · 4 comments

Comments

@whollaus
Copy link

Feature Description

Is it possible to add additional variants / modules for the Block Editor?

I think so much could be realized with just a few more modules.

Here you could use the existing image module and extend it with 1-2 fields:

  • Testimonials: Image, Name, Job Position, Text
  • Contact (Call to Action): Image, Title, Text, Button (Link, Text).
  • "Hero": Image, Title, Text, Button (Link, Text)
  • Section with image (arranged left or right): Icon/Image, Title, Text, Button (Link, Text)

Here you could use the Gallery module and add 1-2 fields:

  • Features: Icon/image, title, text, button (link, text).
  • Team: image, name, job position, text

As you can see, the fields are mostly the same or similar. In the first step for example a class or ID for CSS could be entered manually. A selection of the CSS class would be perfect of course. (As already possible with the Gallery module).

This would be really helpful for building pages and I hope it is not much effort. (Duplicate default-blocks gallery and image + button/link/icon).

https://github.com/GetPublii/Publii/tree/master/app/src/components/block-editor/components/default-blocks

Thanks a lot!

@kw-pr
Copy link

kw-pr commented Oct 17, 2022

I think those blocks should be moved into the template. The template could provide custom blocks or remove blocks that are not supported.

As developer I could define blocks from the customers pattern library and the customer would only use those blocks for his page.

@whollaus
Copy link
Author

Yes, that would be welcome.

However, the Publii development is only progressing slowly. So my suggestion would be to include more blocks as "standard". With "little" work (add 1-2 new fields)

How the block will look then, still depends on the template (css).

@LaszloDev
Copy link

LaszloDev commented Jan 25, 2023

How is a block right now structured internally?
It would be great if they are stored in a JSON config file, and we would be able to add custom blocks by providing a custom structure:

{
  name: 'custom block',
  tagStart: '<div>'
  tagEnd: '</div>'
  tagInlineParams: [
    width,
    height
  ],
  foo: 'baa'
}

@quetzalcoatl82
Copy link

I would love to see an option to add custom blocks: even starting with something simple where i can wrap html around a user defined text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants