1,105,633 Community Members

Storing formatted text, not in HTML?!

Member Avatar
Junior Poster
146 posts since Nov 2007
Reputation Points: 5 [?]
Q&As Helped to Solve: 2 [?]
Skill Endorsements: 0 [?]

Simple issue...

If my website is storing text in a database (MySQL) - and will ordinarily be outputted in good ol' HTML... but possibly via XML, or JSON... how do I store the text, allowing for eg. paragraph breaks, but not using HTML to format it??


Member Avatar
Junior Poster
139 posts since Apr 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 21 [?]
Skill Endorsements: 0 [?]

Well, since nobody else has replied, I'll just throw this out there. You can use a custom markup language, that can then be easily translated to whichever language necessary. BBcode is an example of a markup language that gets translated into HTML. Make a set of tags for each format option you need.

This article has been dead for over three months: Start a new discussion instead
Start New Discussion
View similar articles that have also been tagged: