Hello,
I'm trying to create a content formatting function that will allow for nested lists. Basically where I'm stuck is the nested lists part. For every opening list tag, I want to find the correct closing list tag {to make sure it's there and to replace it with the correct HTML tag (<UL>,<OL>)}. How would I match the nested tags so it doesn't just find the first closing list tag that comes around, but finds the one that corresponds with the original opening tag. I hope I'm being clear enough.
Thanks for reading this and I hope you can help shed some light to as what I should do.



. For every opening list tag, I want to find the correct closing list tag {to make sure it's there and to replace it with the correct HTML tag (<UL>,<OL>)}. How would I match the nested tags so it doesn't just find the first closing list tag that comes around, but finds the one that corresponds with the original opening tag. I hope I'm being clear enough.

there must be some premade scripts/functions out there. or could someone please point me in the right direction into how I would make my own. Thanks!

Bookmarks