E
E
eugene1592020-09-18 23:28:15
MODX
eugene159, 2020-09-18 23:28:15

How to make it possible to create image previews in MODx or TinyMCE?

Hello.

The site has articles. The articles have pictures. Pictures are clickable - when clicked, they increase in a pop-up.

At first glance, everything is simple - I wrap the tag imgin the tag a, in the tag I aindicate href- the full picture. And I hang, for example, lightcase on the tag awhen the page loads.

But how can I make it possible to crop the image in the right way? To insert the cropped fragment into the text of the article.
Pictures are different.
Let's say we have a 100x200 image. And you need to insert 100x120.
And there is another one - 200x200. And you need to insert 100x100.
And for each, the necessary part should be visible - for some it is necessary to cut off the bottom, for some the top, for some both the bottom and the top (the desired part in the middle, for example).

You can force the content manager to save the original picture, cut the preview in Photoshop, upload the preview to the site. And insert the resulting preview into the article, when you click on it, the original picture will open.
But it's very annoying.

I would like a faster option. Something like uploading a photo to vk. There you can choose a preview (which part will be visible when leaving a comment / in private messages, etc.

I can crop the picture using phpthumbof. But how to make it possible to choose what exactly to crop / leave? You need a JS plugin, there are such in TinyMCE or MODx?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Danny Arty, 2020-09-19
@DanArst

Yes Image+

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question