Inserting a pdf natively with the tinyMCE button generates a code:
<object data="0_medias/jdll.pdf" type="application/pdf" width="800" height="600">
Displaying the pdf breaks the display in a blog or in an article
Make the code of the inserted pdf responsive with a button?
Labels |
Added:
No Code Attached Yet
|
@dgrammatiko they are user editable
object[type="application/pdf"] {
max-width: 100%;
.
.
.
}
The width and height are for the browser to calculate the blank space UNTILL there is something there to display, they are not for styling purposes...
Hi
First of all, thank you for answering me while I know that you are important developers of joomla who had little time on this kind of questions!
Yes I understand that the default value sets a frame
Yes, I know that it should be possible to solve this with css.
I would suggest adding a checkbox (responsive) as I think 90% of site builders will not know how to do this.
h2 {background-color: coral; /* css ok */}
object[type="application/pdf"] {
max-width: 100%;
background-color: coral; /* css ok */
}
I tested on joomla 4 and joomla 4.1 beta3, it seems to me that there is still a problem by putting
I put h2 to be sure to apply the css!
See the test site.
https://joom41test.88h.ovh/index.php/mon-1er-article
It is not serious if you do not have the solution css, I will seek on my side another css. The question of having a button for a responsive rendering in blog and article mode, remains the main question :-)
Sorry for my bad English translation.
regards
@HDInfautre the code I gave was pseudo. The width: 100%
seems the right one here
its not max-widht but just width
Hi
@dgrammatiko
yes I'm purposely setting smaller values to see if the css works
@brianteeman @dgrammatiko
yes it works with "with" only
After 2 small problems, but probably not related to joomla!
1/ if I reduce the size of the article window, I have a horizontal navigation bar on the pdf!
2/ no pdf viewing on firefox android but I think I remember there may be a problem viewing on smartphone?
Labels |
Added:
?
|
You do realise that both attributes width and height are not for sizing, right?
Sizing happens with CSS and preferably classes
Pull requests are welcome