Jump to content

Easy Styling Of Text Stored In Database


son

Recommended Posts

Having a mini content management system I wondered how it is done to incorporate icons as above for posts to make text bold, make it italic, insert a link etc. Also when displaying the text of a page (which is stored in database) how do I do it that the code is hidden as such. I mean that it just shows text in bold, italic and whatever the text is saved as? Is this the way the real content management systems work?Son

Link to comment
Share on other sites

Most programs like tinyMCE use javascript to adjust the code behind the scenes whilst displaying the result of the coding directly on the page (you click bold and it goes bold, but the code is changed). This is then sent to the database complete with the code.

Link to comment
Share on other sites

Thanks guys. Now I understand. Those systems use JavaScript to insert HTML tags into database fields (which are then displayed as intended on web page). Will have a thorough read to see if I can incorporate a system like this to make my life easier...Appreciated,Son :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...