Page 1 of 1

Text Editing tools, like the ones in devnetwork

Posted: Wed Nov 07, 2007 4:59 pm
by arpowers
Hey guys,

I'm just wondering how text editing tools like the ones here on DevNetwork are processed? (I'm talking about the 'code' 'quote' etc.. tags..)

I am building a wikipedia like feature and I think the Devnetwork implementation is really nice..

initially, im guessing its a string matching function for the tag?

any enlightenment would be great.. thanks!
Andrew

Posted: Wed Nov 07, 2007 5:34 pm
by feyd
Yes, it's basically a large string matching and massaging functionality.

Take a look around for bbcode and wikicode (or variants thereof) parsers. There are many out there; a bunch have been posted about here.. including by yours-truly.

Posted: Wed Nov 07, 2007 5:57 pm
by arpowers
is there any reason to use a wikipedia type parser over the bb?

The wikipedia markup is ugly and hard to understand at first glance...

Posted: Wed Nov 07, 2007 6:11 pm
by feyd
Both have their share of merits and problems. Depending on how complex you want to go, they can equally get quite hairy. Typical parsers against each other, wiki-style ones will often be more simple and create cleaner resultant HTML. But mileage will vary.