sortable_element and new ul

I have a sortable_element, as a tree. I works great to add and remove from an existing sub list. But how do you create a new list under one element that doesn't have a sub list before?

Not sure what you are asking, but maybe you could check into RJS and 'insert_html'?

pepe wrote:

Not sure what you are asking, but maybe you could check into RJS and 'insert_html'?

<ul> <li>One</li> <li>Two</li> <li>Three</li> </ul>

How do you drag Three so it's placed under One, like:

<ul> <li>One <ul><li>Three</li></ul> </li> <li>Two</li> </ul>

I might be wrong, but I think that what you're trying to do will need some manual work. I have never done what you're trying to accomplish but if I were trying to do the same thing I would first think about making One a dropable element. The problem I can see, however, is hat the <ul> and </ul> tags are going to be missing.

If I were in your position I would see if I can write some Javascript that inserts the <ul> tags around your <li> element if they are not already there when the element is dropped.

I'm sorry I can't be of much help.

Sorry, not to make One a dropable element but to be able to receive dropable elements.

pepe wrote:

I might be wrong, but I think that what you're trying to do will need some manual work. I have never done what you're trying to accomplish but if I were trying to do the same thing I would first think about making One a dropable element. The problem I can see, however, is hat the <ul> and </ul> tags are going to be missing.

If I were in your position I would see if I can write some Javascript that inserts the <ul> tags around your <li> element if they are not already there when the element is dropped.

I'm sorry I can't be of much help.

Thanks. I do have a manual solution but I hoped for an existing solution.