Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Tuomo Kankaanpää
13,574 PointsHow can I implement simple text formatting to my web site?
Hello,
I am working on a project where I have a web site of blog posts. I am using HTML, Javascript and PHP on the site. One feature on the site is a possibility to comment on a blog post. Text of a comment is saved to SQL database.
The comments are now just plain text but I would like to enable the following formatting options for the text in the comment: bold, italic, underline. So how should I implement this kind of functionality? What would be the best way to approach this problem?
All tips and advice are welcome! Thank you!
1 Answer
Petros Sordinas
16,181 PointsHi Tuomo,
Have you looked at add ons like http://ckeditor.com/ ? I haven't used it but I think you have all the editor functionality you need which you can then take and store in your db.
Tuomo Kankaanpää
13,574 PointsTuomo Kankaanpää
13,574 PointsHi Petros,
Thanks for your reply! I tested ckeditor out as you suggested and it seems to be just what I need!
Thank you!