Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tecumseh Group Markup Language

Status
Not open for further replies.

styleBunny

Technical User
Jun 20, 2002
133
0
0
AU
Hi guys,

I am looking for a way, to allow users some basic formatting options for the text the enter in a form text area. Something similar to the way tek-tips lets you use their Tecumseh Group Markup Language, to format text, add links etc...

Do these types of functions exist within php already? or is there something i can install on the server? or a java applet that sits a top the text area with a word-esque tool bar?

I am interested in all your 2 cents, wax away!
sb.
 
build couple of arrays of markup code and replace code
then you can loop through the array with a str_replace()

similar to the 3rd example here



Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
Nightclub counting systems

So long, and thanks for all the fish.
 
PHP has no specific formatting functions. As ChrisHirst suggested string manipulation is the most common way these proprietary tags are replaced by standard HTML.

You can use str_replace but also work with regular expressions (which are a little more advanced, but more fun).

As for the Java question:
There is client side code in JavaScript that allows "rich text editing", where an <iframe> element is dynamically generated and put into edit mode. It then allows (with the appropriate JavaScript) word-esque text editing. There are some examples on the Web, such as This, however, has nothing to do with PHP and depends on a modern browser that supports DOM manipulation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top