Code View in Text Layout Not Showing Content

1338
4
Jump to solution
04-08-2021 06:13 AM
DaveSchaab
New Contributor II

When adding custom code to a Text Layout window:

Hub 3.JPG

I switched back to Layout View and everything looked the way it was should:

Hub 2.JPG

But when I stop editing the window, nothing shows up:

Hub 1.JPG

 

Is this common?  Are there work-arounds?  Am I missing any key parts of code?

 

Any help would be fantastic, thank you!

0 Kudos
1 Solution

Accepted Solutions
KlaraSchmitt
Esri Contributor

Under the Options menu in the iFrame Card, there is a setting "Allow Scrolling" which gives you the option "no" (scrolling is not allowed) or "auto" (scroll bars show up when necessary.) We don't have "yes" because it's very similar in functionality to auto, but it will show scrollbars, regardless of whether scrolling can be performed or not.

If "auto" is not working for you, it might be a browser issue. Technically, the iframe scrolling attribute is deprecated. However, like you, we use it, because it's more consistently effective across browsers than the modern CSS-only solution. Another thing to check is that whatever content you are iframing into the card is also scrollable at the content source. It might seem like a silly suggestion, but I've encountered it at least once.

Unfortunately, you are not going to be able to use the Text Card for iframes, as what you are seeing rendered is actually a bug in that it renders at all; more recent versions do convert iframe tags to text, meaning it wouldn't even come across as code.

View solution in original post

4 Replies
KlaraSchmitt
Esri Contributor

Hi Dave,

Have you considered using the iframe Card instead of the Text Card? I don't believe we actually support iframes the HTML portion of the Text Card. When I try it on my own site, it renders as text, not code, so I think you might've found a bug. It also looks like you're using Enterprise Sites as we've done some improvements to the Text Card and added a better code editing experience. Could you tell me what version you have?

DaveSchaab
New Contributor II

Hi Klara,

 

I have considered and tried using the iframe Card, but it does not (to my knowlwedge) allow for scrolling, which at this point I need for this project to function correctly.  The Enterprise Version we are currently using is 10.7.1. 

0 Kudos
KlaraSchmitt
Esri Contributor

Under the Options menu in the iFrame Card, there is a setting "Allow Scrolling" which gives you the option "no" (scrolling is not allowed) or "auto" (scroll bars show up when necessary.) We don't have "yes" because it's very similar in functionality to auto, but it will show scrollbars, regardless of whether scrolling can be performed or not.

If "auto" is not working for you, it might be a browser issue. Technically, the iframe scrolling attribute is deprecated. However, like you, we use it, because it's more consistently effective across browsers than the modern CSS-only solution. Another thing to check is that whatever content you are iframing into the card is also scrollable at the content source. It might seem like a silly suggestion, but I've encountered it at least once.

Unfortunately, you are not going to be able to use the Text Card for iframes, as what you are seeing rendered is actually a bug in that it renders at all; more recent versions do convert iframe tags to text, meaning it wouldn't even come across as code.

DaveSchaab
New Contributor II

The Auto function under the iFrame Card will be acceptable for what we need.  Thank you for the information about iFrames not rendering in the Text Card.

0 Kudos