I have a form, where users can write and submit article to a database.
These articles are then published on the site using mysgli (finally got prepared statements to work :P)
What I now ideally would like to have; is the user to be able to do some styling. Just like as I’m writing this I have the option to style some text as ‘code’.
However I’m completely lost on how to do this. Could anyone please point me in the right direction?
Cheers,
Ziggy
This is not a simple problem.
You should make your mind up regarding:
E.g. you could use Wiki formatting. In your database entries you would have the formatting as part of the text (e.g. the 4 spaces indentation for code blocks). You further will need a renderer that is able to present this text with the formatting info on your site.
Possible formats to consider are Wikitext, HTML+CSS, Richtext.
However, you could ask yourself if maybe using an existing Wiki will be easier insted. Not sure what your project is.