Abhinav Kulshreshtha
Abhinav Kulshreshtha

Reputation: 2205

Draggable button bar in jquery-wysiwym editor

I am trying to build a markdown editor learning from this tutorial. Mostly, I just tweaked some CSS only.

I tried to make the button panel draggable using this blog post. But upon adding that code, the editor stopped working.

In the head (after all the js files):

$(function() {  
      $('#pad').wysiwym(Wysiwym.Markdown,{ helpEnabled: true, helpToggle: true });
       $('#draggables div').each(function(drag){new Drag.Move(drag);});
});

And in the body section:

<div id='draggables'>
<textarea id = 'pad' wrap="off" >
</textarea>
</div>

Textarea is converted into the Wysiwym.Markdown editor. After conversion buttons are added in a div on top of the textarea. As per the blog, that div should have been movable. but instead, the plugin stopped working, i.e. the textarea is not converted into editor.

Basic idea is to make the button bar movable so that user can use it as per their convenience. Something like on the home screen of aloha-editor. The panel is movable but the textarea is fixed. Why wasn't it working?

Upvotes: 1

Views: 189

Answers (0)

Related Questions