luyadev / luya

LUYA is a scalable web framework and content management system with the goal to please developers, clients and users alike.
https://luya.io
MIT License
811 stars 205 forks source link

Own variable type #1864

Closed liberosoft closed 5 years ago

liberosoft commented 5 years ago

Hi, Is there a way to create own variable type for a custom block? For example I'd like to add fckeditor plugin as a variable type, just like wysiwyg type.

Thanks

luya-bot commented 5 years ago

Thank you for your question. In order for this issue tracker to be effective, it should only contain bug reports and feature requests.

We advise you to use our community driven resources:

This is an automated comment, triggered by adding the label question.

nadar commented 5 years ago

@liberosoft i just added a small guide example in how to add a custom type. In general:

  1. Its more recommend to create an issue about missing types, so everyone will profit.
  2. But FKEDITOR add other wysiwyg is something we will never support as it just makes no sense in the block editors.
  3. Instead of using WYSIWG editor, you should use blocks, and create the structured input with heading, text, table etc. blocks. This is what its built for.
liberosoft commented 5 years ago

@nadar Thank you very much for your answer. I know that using FCK like editors isn't a good way, but our client has the last word. They have used such editors in previous systems and won't change a way of thinking :)

Again, thank you very much, great work!

nadar commented 5 years ago

there is a very basic wysiwyg editor, maybe use this one? Whats the benefit of using FCK if you are not able to upload images and files? :-)

BUT: if you do a luya extension - which is public to everyone, i will contribute to this module if you need help.

liberosoft commented 5 years ago

There are some basic functionalities I can't find in this wysiwyg editor, like:

liberosoft commented 5 years ago

@nadar sorry for bothering you, I tested your example, it works fine, but is there a way to see new type during creating block via console?

nadar commented 5 years ago

no, they are fixed defined here: https://github.com/luyadev/luya-module-cms/blob/master/src/frontend/commands/BlockController.php#L124-L180