-2

i am having a text area for users to write their posts in then save their posts inside a database, i would like to offer some little formatting like line breaks, bold , or italic fonts. is there any way using jquery or php to do this? i need the same exact idea of the editor that stackoverflow is using. any help?

here is my code for the textarea :-

<p>Message : </p><textarea cols="100" rows="10" name="message"></textarea>

also, is it better to use an editable div than a textarea?

user2869402
  • 27
  • 1
  • 8
  • do you mean CKE Editor or WYSIWYG editor? – Jun Rikson May 11 '14 at 07:04
  • google `markdown`. check this [**link**](http://stackoverflow.com/questions/20863978/how-to-create-a-showdown-js-markdown-extension) – itachi May 11 '14 at 07:06
  • 1
    Asking for that in such a way is considered Off-Topic or just Too-Broad. Also please restrain from asking Installing Support Question on Stackoverflow. Thank you! – hakre May 11 '14 at 07:21
  • 1
    The error you get is `E_SETUP_EXE_NOT_FOUND`? – hakre May 11 '14 at 07:33

2 Answers2

0

There are lots of 'wysiwyg' editor (What-you-see-is-what-you-get). I prefer CKEditor - it comes with lots of tools and you can disable and enable what-ever you like.

http://ckeditor.com/demo

You can choose what options to show on the toolbar.

Jentel
  • 148
  • 2
  • 17
0

Yes,,, you can use 'wysiwyg' editor, but if you want quick start ,,,, just write the following inside header of html page (which has textarea):

<script src="http://tinymce.cachefly.net/4.0/tinymce.min.js"></script>
<script>
        tinymce.init({selector:'textarea'});
</script>
Mohammad Alabed
  • 809
  • 6
  • 17