Newbie here attempting to parse the html supplied from TINYMCE. I allow the user to create TABS and a navigation section inside the page (linkable DIVs based on ID). Currently I have it setup that the user must edit the HTML source directly of TINYMCE to put in code such as: <div id="tabs"> blah blah </div>
Server parses this by using the PHP Simple DOM parser. The end result is correct, but forces the user to edit the HTML source and it can get quite sloppy as you can imagine.
Ideally, the user would not have to edit the HTML source to place their bookmarks/tabs. They would merely have to style it in a unique way, such as putting each tab title in a list with a H6 heading.
I was thinking of simply implementing something like: [tabs]Tab Title 1[/tabs], but would parsing this be practical? It is impossible to do with Simple DOM parser.
Perhaps my approach is wrong?
You could probably use a square-bracket approach, and then parse that specifically using regex to get the contained text.
Example: http://regexr.com?2uf83