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.
Goals
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.
- Also, the problem with CKEditor (except for the need for styling, which I did not want to do) was that JavaScript could not be moved around the page using JavaScript. Or rather it could be, but he just stopped working. In the self-written WYSIWYG, I do not have this problem.
- 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.
Добрый день!
В браузере Edge описанный функционал не работает. Обрезать и загрузить фотографию нельзя. Издержки кастомного WYSIWYG-редактора.
Добрый день. Спасибо за информацию, по возможности проверю проблему.
Ещё небольшая просьба, если, по-вашему мнению, чего-то не хватает на сайте или что-то работает не совсем корректно, то не стесняйтесь писать об этом в раздел идей и предложений .
Это трекер для фидбека и доработки сайта.