Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Any solution to find and use the uploaded images in article?
Thank you for testing and proposals, gentlemen, will integrate it in the next iteration.
Pat64 wrote #335179:
And the corresponding input could have this CSS rule:
#article-file-name{padding-right: calc(.3076923077em + 34px)}...
Aren’t these dimensions theme-related? I would like (you) to find a nifty way to insert a button ‘inside’ a text input that would work independently of the input style.
phiw13 wrote #335181:
bonus: set
tabindex="0"
on the image containers (.com-image-container
), similar to what is done on the list panels around the table.
This makes them focusable, why?
Another question: shortcuts. Currently, Shift+Enter
on the article image field triggers the images preview update, Alt+Enter
on the image search triggers ‘invert’, and so on. What would be most useful shortcuts?
Offline
Re: Any solution to find and use the uploaded images in article?
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Any solution to find and use the uploaded images in article?
version 0.9
- thanks for simplifying the UI a little !
- one issue I noticed – with Safari (16.4) – but not with Firefox & Brave (Blink): dragging an image from another webpage (site) inserts the image twice in preview and after saving (one is saved as
image.ext
, the other assome_name.ext
wheresome_name
is what the originating server has set. Nothing interesting in the error console.
PS – one possible improvement: align the images to the bottom of their individual containers (by default images are aligned on the baseline, leaving a small gap below).
@#txp-image-group-content img {
max-width: 100%;
height: auto;
vertical-align: bottom; /* <-- add */
}
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Any solution to find and use the uploaded images in article?
phiw13 wrote #335203:
thanks for simplifying the UI a little !
Thanks for testing, I think it’s close to its final shape now.
one issue I noticed – with Safari (16.4) – but not with Firefox & Brave (Blink): dragging an image from another webpage (site) inserts the image twice in preview and after saving (one is saved as
image.ext
, the other assome_name.ext
wheresome_name
is what the originating server has set. Nothing interesting in the error console.
Yep. I thought browsers dully behave consistently, since IE retirement, but the fun is still there. It looks like Safari adds a temporary image file to the package when dragging from a web page, but only if the data contains one image (try dragging multiple images before the plugin update, it should work ok). The plugin thus creates one image from URL and another one from this added file. I have sort of fixed it, as much as Safari console allows to see.
PS – one possible improvement: align the images to the bottom of their individual containers (by default images are aligned on the baseline, leaving a small gap below).
Will do, thanks.
Offline
Re: Any solution to find and use the uploaded images in article?
etc wrote #335205:
Thanks for testing, I think it’s close to its final shape now.
Yes, it looks quite good now.
Yep. I thought browsers dully behave consistently, since IE retirement, but the fun is still there. It looks like Safari adds a temporary image file to the package when dragging from a web page, but only if the data contains one image (try dragging multiple images before the plugin update, it should work ok). The plugin thus creates one image from URL and another one from this added file. I have sort of fixed it, as much as Safari console allows to see.
seems to work now. I “feels” a little slower – before the preview blob
is generated – when adding from remote server. That might be subjective though.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Any solution to find and use the uploaded images in article?
phiw13 wrote #335207:
I “feels” a little slower – before the preview
blob
is generated – when adding from remote server. That might be subjective though.
Really? It’s a usual lazy image load (possibly from cache), as before. No explicit blob is created from remote images by the plugin (just inspect the preview src
).
Were you able to configure a strict CSP without breaking some plugin features?
Offline
Re: Any solution to find and use the uploaded images in article?
etc wrote #335210:
Really? It’s a usual lazy image load (possibly from cache), as before. No explicit blob is created from remote images by the plugin (just inspect the preview
src
).
Hmm, maybe my impression was wrong, I have not timed anything.
Were you able to configure a strict CSP without breaking some plugin features?
I think all is working correctly (compared to a non-CSP install) and I have not seen any error in the console (Safari / Brave, two different level users) it. I am not clear what Firefox (beta) is trying with its error reporting regarding CSP (lots of noise), but things work… the preview for fetching of images from remote websites is (of course) blocked at first (the remote site is not in the allowed list for img-src
), and once the article is saved and the image uploaded, all is fine.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Any solution to find and use the uploaded images in article?
I had to add blob:
to img-src
to enable file preview, and comment out style-src-attr
and style-src-elem
to suppress warnings.
Offline
Re: Any solution to find and use the uploaded images in article?
etc wrote #335213:
I had to add
blob:
toimg-src
to enable file preview, and comment outstyle-src-attr
andstyle-src-elem
to suppress warnings.
Yes, blob:
is needed( I had that for some time in my set); it should probably be part of the default set. The style-src-*
are the ones that cause lots of noise in the Firefox console, but not in Safari & Brave. I have no clue what is wrong according to Firefox.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Any solution to find and use the uploaded images in article?
phiw13 wrote #335214:
The
style-src-*
are the ones that cause lots of noise in the Firefox console, but not in Safari & Brave. I have no clue what is wrong according to Firefox.
Yes, they come from FF own NetUtil.jsm
module (and another plugin in my case).
A nifty plugin it has become, I might even use it myself :-)
BTW, the plugin in question was etc_date_picker. But why don’t we use standard date inputs?
Offline
Re: Any solution to find and use the uploaded images in article?
etc wrote #335216:
A nifty plugin it has become, I might even use it myself :-)
Yes, com_article_image has become quite a nice little tool!
But why don’t we use standard date inputs?
With the 4.9 branch it should be possible. <input type="date" />
(and time
) are well supported cross browser. I vaguely remember Phil Wareham talking about some compatibility issues with the expected date format expected by Textpattern (??), but all details are missing from my memory.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Any solution to find and use the uploaded images in article?
Another CSP-related round of small changes, to make blocked images preview more readable. Also got rid of unnecessary remote image request when dragging them on body/excerpt.
Offline