I would recommend against simply providing a text area as:
- It's not obvious to the user what structure you require.
- Introduces the opportunity for them to enter invalid syntax.
However, the following methods utilised by Wordpress will be more UX friendly, and allow you to enter other attributes:
- Select parent from a list
Instead, the Wordpress drag-and-drop Menu Structure system works well.
It's a drag-and-drop system which allows the user to visually re-arrange the hierarchy.
If implementing Drag-and-drop, you'll want to follow Nielsen's advice:
Drag-and-drop designs are often the worst offenders when it's not apparent that something can be dragged or where something can be dropped. (Or what will happen if you do drag or drop.)
Common symptoms of the lack of perceived affordances are:
- Users say, "What do I do here?"
- Users don't go near a feature that would help them.
- A profusion of screen text tries to overcome these two problems.
Select parent from a list
Alternatively, Wordpress also has another method: Select a parent from a drop-down list.
- Easier to implement.
- Doesn't require you to make affordances of draggability.
- But the hierarchy is less visually obvious.