Draggable Button panel

42 views
Skip to first unread message

Abhinav Kulshreshtha

unread,
Jun 20, 2012, 4:53:21 PM6/20/12
to jquery-...@googlegroups.com
I tried to make the button panel drag-able following this post. But it didn't work. Tried a few more alternatives method from google search, all in vain.
Is there a way to make the button panel movable like the editor on the home-page of aloha editor.

This is my version of editor i am working on.

Mike Shepanski

unread,
Jun 20, 2012, 8:09:53 PM6/20/12
to jquery-...@googlegroups.com
The button panel was never meant to be draggable.  However, there is an option to put the buttons in a container of your choice.  I would imagine if you can get an element on the page to be draggable first, then specify that element as the container to place the buttons, it should just work.

Mike

Abhinav Kulshreshtha

unread,
Jun 22, 2012, 1:46:08 PM6/22/12
to jquery-...@googlegroups.com
Made it working. Thanks for the tip.

Using firebug, i got the div name of the button panel, then used the jquery to set the button panel dragable.

$(function() {
        $('#pad').wysiwym(Wysiwym.Markdown, { helpEnabled: true, helpToggle: true });
       
        $( "#wysiwym-buttons" ).draggable();
        });

i replaced the jquery-ui found in your folder, with the full jquery-ui package from official site(just in case). and changed the background color and area of the div to make its area recognizable.

Now here is the catch, The deviation added in the textarea after initilization(around 20px) remains there . Where in the plugin, i have to make the changes for position to absolute so that my layout is not disturbed in the webpage.

If i am allowed, I want to write these changes in the core so that i can use it in future. also i where in the core can i write the draggable property so that it become part of the plugin for future.

I highly suggest that  draggable property should made as part of this plugin in the future. I tried around 30 plugin for college project before i finally came across this one. I am quite sure that draggable button-panel is not a common feature in editors, i came across only 2 editors but they weren't for markdown.

Anyways. This is a great, powerful and very simple plugin for non-expert. Thanks.
This is the link of what i was trying for college project.


On Thursday, June 21, 2012 5:39:53 AM UTC+5:30, Michael Shepanski wrote:
The button panel was never meant to be draggable.  However, there is an option to put the buttons in a container of your choice.  I would imagine if you can get an element on the page to be draggable first, then specify that element as the container to place the buttons, it should just work.

Mike

Mike Shepanski

unread,
Jun 23, 2012, 1:23:55 AM6/23/12
to jquery-...@googlegroups.com
Hello Abhinav,

Thanks for the kind words! :D

While I like to offer features people request.  I really think a draggable button panel is a bit out of the scope for this project.  One of my main goals of this is to keep it as simple as possible.  This allows people to easily modify it to fit their specific needs, such is the case with you.  I find that every project needs to tweak the editor slightly in some direction.  Rather than offer the kitchen sink, I want to offer a good simple & easy to understand base to work off of.

Another down side of draggable buttons is that right now the editor works without jQuery-UI.  I would really prefer not to bring another (quite large) dependency into scope for such a unique feature request.  I hope this makes sense. :)

Mike

Abhinav Kulshreshtha

unread,
Jun 23, 2012, 3:29:59 AM6/23/12
to jquery-...@googlegroups.com
Ok.. didnt thought about the dependencies. Just thought it would be nice if it had it inbuilt like the way to enable the help.

Can you tell me something like showdown, but for bbcode and mediawiki. I have the markdown version ready, but dont know what to look for bbedit converter and media wiki converter. everything i get in google search is full software, not some script to connect to it. Since web-editor is not big enough to submit as college project, I want to add many option available in it.

On Saturday, June 23, 2012 10:53:55 AM UTC+5:30, Michael Shepanski wrote:
Hello Abhinav,

Thanks for the kind words! :D

While I like to offer features people request.  I really think a draggable button panel is a bit out of the scope for this project.  One of my main goals of this is to keep it as simple as possible.  This allows people to easily modify it to fit their specific needs, such is the case with you.  I find that every project needs to tweak the editor slightly in some direction.  Rather than offer the kitchen sink, I want to offer a good simple & easy to understand base to work off of.

Another down side of draggable buttons is that right now the editor works without jQuery-UI.  I would really prefer not to bring another (quite large) dependency into scope for such a unique feature request.  I hope this makes sense. :)

Mike
Reply all
Reply to author
Forward
0 new messages