On the site you need to add news of various amounts of information, including pictures. I wanted to ask you how to organize the form of adding / editing? I heard that there is such a special thing (I do not know what the name is). alt text

Tell me, please, how this thing is called, and how to use it with reference to the database.

    4 answers 4

    What is shown in the picture is CKEditor . There are many similar editors. They will provide a visual editing, pictures that you want to add to the article, they allow you to choose from a previously specified directory on the server or upload a picture to this directory and then choose again. But how to save and get into the database from the base is already the task of the script.

      This thing is called a visual editor . A striking example of this miracle "TinyMCE"

      Install it - easy. You can read here

      And to connect with a database is also easy, you just need to display the data for editing in the textarea, and then from it back to the database.

        This is a regular WYSIWYG

        Best used by TinyMCE

        Binds in the usual input.


        Immediately answers piled up .. surprisingly, the question was asked 2 hours ago, and the answers are given with a difference of 1 minute.

          WYSIWYG - I see and receive.

          and how to use it with reference to the database.

          It did not quite reach me what you mean, so I’ll say it as understood =)

          <form action="get.php" type="post"> //WYSIWYG инструменты <textarea name="text"></textarea> <input type="submit"> </form> 

          it was the approximate code of your editor. The main field in it is <textarea> in which you draw and write what you need and when you submit the form, for example, in the file get.php you should have the code there and save the contents of your editor to the database

          • I mean that the text will be stored in the text box, and the pictures in a separate directory. Here's how to get this picture out of there and put it in the catalog and back, or some other operation with pictures should be? - new_russian_man
          • If you set up a WYSIWYG editor correctly, then you don’t need to think about the pictures, they will be saved where needed and will be displayed in the text that you edited in your editor and saved. If you format tex in such an editor, say, insert a picture, then in the database it will be saved as: What is the text thread <img src = "IMG_URL"> Continuing the text and so on. And on the site, instead of the code <img>, it will display a picture. The editor will upload the image to the server and save it. - Yoharny Babay