You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Online

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

#100607 NaN not accepted

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Thursday, 25 July 2019 09:46 BST

zegenrijk
Hello,

I used the insert edit/media icon (pro, JCE 2.7.15).

I used a long time for my width the 'NaN' value, but (i think after a update) the NaN value is empty and if set the value to NaN i can not save.
How to solve?

Here is the code before:
<p><a href="https://www.joomlacontenteditor.net/images/stories/images/stories/planning_wijers_14-3-2017.pdf"><iframe src="https://www.joomlacontenteditor.net/images/stories/planning_24-7-2019_wijers.pdf" width="NaN" height="800" type="application/pdf"></iframe></a></p>

Regards Michel

Ryan
"Nan" is an invalid value for the iframe width or height. If you do not wish to specify an actual value, then leave the value blank.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

zegenrijk
Hello Ryan,

If i leave the width empty i can not save, see attachment.

Note: i wrote 'insert/edit media icon', but this should be 'Insert/edit Iframe icon'.

Regards Michel

Attachments

Ryan
To correct my previous post, an iframe must have a width and a height value, as the browser needs to be told how big to render it, as the dimensions cannot be determined by the iframe content, unlike images or video. If the height is being set by the parent container, then set the height to 100%

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

zegenrijk
Ok, i filled 100%, it's accepted and saved and looks good. But now if i open the post again and go to the iframe with the insert/edit Media icon the value 100% is changed to 100. If i store this, the height is set to 100 and not 100%

Regards Michel

Ryan
Ok, I'm really not on form today, it must be the heat..:(

The rules - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe - say that both the width and height must be a pixel value.

If you want to create a responsive iframe, installing this plugin will help - https://github.com/widgetfactory/wf_responsive_widgets

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.