System posts - Tips [closed]

0

Hello, I'm trying to create a posts system for my site and I have an initial idea of how to do it, very basic.

In the basics, I would have one that will send the text of a <textarea> to the database, along with the author, date, etc.

In textarea I noticed that it is possible for the user to put html tags ( <div> , <p> ..) so I will use php htmlentities to prevent the user from using such tags and end up damaging the site layout Is this normal?).

With this, I would like to know how to implement options such as leaving bold text, put image, a url, etc. I would just like some tips on how to implement this ...

This url has some sites that in the post it shows a preview of the site and tals ..

    
asked by anonymous 17.05.2016 / 05:09

1 answer

0

Hello, you can use plugins that "mount" an editor for you. I recommend CKEditor ( link ), be careful when handling the value that the CKEditor textarea will return because it allows you to edit a post visually but returns a HTML. There are several others too, such as TinyMCE and Froala / a>.

    
17.05.2016 / 05:52