Practical example: I want to be able to insert an image into a text in TinyMCE in Fred where the image is automatically inserted as <figure class = ""> <img> <figcaption> </figcaption> </figure>
and where I, via Fred, can upload the image to be used and have it auto-inserted into the <figure><img>
code?
If such a thing is possible, then I will learn how. If not, then I don’t have to spend more time on Fred.
Thanks in advance. :smile
Hi sylvaticus,
Well, I think your question is not just yes or no questio
Fred RTE (TinyMCE) has a small bar on RTE areas when you press enter to start a new paragraph, where you can insert directly an image.
Other way is (And the answer for your question is: Yes): The same area that has the RTE permission, also has fred-drop-zone=“name” where you are able to do drag and drop in it.
when you have a fred element that is an image, you can simply have it with data-fred-name with data-fred-attrs:
https://modxcms.github.io/fred/themer/elements/attributes/#data-fred-attrs
by this way. you can simply edit the image on a click as you wish to.
Now it will really depend on what you want to do.
Cheers