User tests: Successful: Unsuccessful:
Pull Request for Issue #27477 .
Restores Drag and Drop images functionality for tinyMCE
lading=lazy
attributeApply the patch run npm ci
and try to drag an image into tinyMCE's edit area
No, it's a bug fix.
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
Labels |
Added:
?
|
Category | Front End Plugins | ⇒ | JavaScript Repository NPM Change Front End Plugins |
Labels |
Added:
NPM Resource Changed
|
Setting images_reuse_filename to true tells TinyMCE to use the actual filename of the image, instead of generating a new one each time.
Reading their docs this might be a limitation
images_upload_handler
option can help to break through this limitation
you are free to copy Joomla.JoomlaTinyMCE.uploadHandler
from my unfinished branch.
Nothing much critical, but would be good to use tinymce features, when it possible,
it also can display upload errors to user etc
So, using the tinyMCE's own handler is not that hard but there are some differences:
images_reuse_filename=true
loading=lazy
, although this should be doable with some more fiddling@Fedik if you want to play around with this the code is here: https://gist.github.com/dgrammatiko/1ffc213290914024817a106fc9f5f89c
But the worse is that there are instances that the file(s) might be inlined
hm, I see, that not very good
upd. well then, leave the plugin
Labels |
Added:
?
|
The image can be imported into the image folder via drag and drop. It is stored in images.
But the result in the artice is:
<p><img src="../images/xx.jpg" loading="lazy" /></p>
The alt="" is missing which is important for a11y
and the image is in src="images/ ... " not in "../images..."
But the result in the artice is:
<p><img src="../images/xx.jpg" loading="lazy" /></p>
That's weird because the code is hardcoding to /
as the first character:
https://github.com/joomla/joomla-cms/pull/28928/files#diff-3190d9429a056012da019775e53ad156R58
The alt="" is missing which is important for a11y
You can add it by clicking on the tinyMCE's image icon. By dropping an image we don't have any data to fill that attribute ;)
Why is leading slash used here?
Why is leading slash used here?
Essentially the code is copy paste from here:
Shouldn't the url start with a backslash?
PS maybe there were couple of mistakes there, updated to reflect the media field code
You can add it by clicking on the tinyMCE's image icon. By dropping an image we don't have any data to fill that attribute ;)
alt="" is all right. Then a screenreader reads nothing. If there is no alt alt all, the screenreader reads the filename - and every validation tool reports an error.
alt="" is all right
Empty alt attribute was added
Doesn't work. Getting this now:
TypeError: response.data.url is undefined plugin.js:58:13
I have tested this item
Works!
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Merging thanks.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-05-23 22:22:01 |
Closed_By | ⇒ | zero-24 | |
Labels |
Added:
?
|
you can drop
jdragndrop
and use TinyMCE image upload,I tried something with custom
images_upload_handler
, but due to new media manager limitation, it not finished 4.0-dev...Fedik:image-drop , you can use that as a hint, if you like.