Kademi / keditor

KEditor is a jQuery plugin which provides a content editor with drag n drop, configurable contents
http://kademi.github.io/keditor/
MIT License
319 stars 153 forks source link

Adding new components #225

Closed anabeatrizzz closed 4 years ago

anabeatrizzz commented 4 years ago

Hello, I wish to drag and drop a table when the + symbol is clicked but I didn't understand how to add components. Can someone explain to me in detail? Thank you.

bradmac commented 4 years ago

Hi @anabeatrizzz

The first version of keditor had a side panel to drag and drop from. However this caused some UX issues, so in version2 when you click the + button the user is shown all available components. Selecting a component adds it to the page in the location of the + button

It can then be dragged to another location, but its usually easiest for users to click the + button at the location they want to add.

anabeatrizzz commented 4 years ago

@bradmac but how can I add a table in those all available components?

bradmac commented 4 years ago

There's no table component that i know of. But you can just add the text component which is edited with ckeditor, which has tables.

And of course you can build your own table component :)

bradmac commented 4 years ago

image

anabeatrizzz commented 4 years ago

There's no table component that i know of. But you can just add the text component which is edited with ckeditor, which has tables.

And of course you can build your own table component :)

Exactly! I want to build and drag n drop a table com this appearence: Captura de tela_2020-03-28_19-33-26

How can I accomplish that?

bradmac commented 4 years ago

There are instructions here for building and contributing components

https://github.com/Kademi/keditor/blob/master/docs/contribute_a_component.md

anabeatrizzz commented 4 years ago

There are instructions here for building and contributing components

https://github.com/Kademi/keditor/blob/master/docs/contribute_a_component.md

Yes, I already read this instructions but I didn't understand the handler file part. Do I have to change anything? Do I have to change lines with @param {jQuery} or @param {KEditor}, for instance?

bradmac commented 4 years ago

@param is for code comments. You can look at documentation for javascript for information about that.