The weekend was not in vain. For a couple of days, I managed to write enough functional support for uploading photos through the WYSIWYG website editor. What I would like to inform the users of the site in the form of an article.
By writing my own WYSIWYG editor, I am currently pursuing several goals.
Ability to refuse third-party editors on the site. Until now, CKEditor was used.
In order to take into account the information about the downloaded content, it was also necessary to organize control over the downloaded images in order to get a full possibility of the initial formation of users' albums with the further possibility of re-using images in other posts, articles, etc. based on the formed albums.
Adding the possibility of inserting images into messages on the forum, comments, private messages, etc.
What was implemented
To load images, a dialog was prepared, which was called by clicking the image button in the editor toolbar.
In this dialog was added the ability to crop images, with which you can select only the part of the image necessary for uploading to the site.
Here is an example of loading and cropping an image through a dialog box. After downloading the image is added to a special photo album, called "Photos added to the content." And then they are added to the message or article.
At the moment there are no possibilities for editing albums and images, but you can already see what images users have added to the site. And also adds a link to the user's photo album so that you can go to the image from the message.
Editing of photo albums and messages will be added with further updates of the site. As well as the ability to select images from the download dialog.