I want to put a kind of editor in my web pages that contain html and php plugin such as dani web's editor because i want to insert some codes and then show them on the other pages such as daniweb's form .

please help me, this is for my project

i used tinymce in advanced style and basic form but the question is here that i want to put some html or php codes inside the editor and then insert them into database
after these i want to show these codes for users like daniweb's preview that shows the codes with rows and like editors in popular softwares

1. the codes here
2. the codes here
3. the codes here

and so on could you help me ?