You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to embed views which are not valid XML in other Picto views fails at the moment as reported in this forum post. A minimal example with a standalone Picto file and two custom HTML views follows.
Trying to render Root/View2 produces a Content is not allowed in prolog. error message in Picto because view1.html is not valid XML.
To fix this we could try to parse the content of the view to embed as XML and if this fails, put it in an iframe instead.
It would also be nice to support a custom iframe attribute in <picto-view> elements to allow the user to force an iframe (e.g. if the other view is XHTML but the user doesn’t want its CSS/JavaScript to mess up the host page’s style/functionality).
The text was updated successfully, but these errors were encountered:
I have found a solution that also solves an extra problem with iframes: detecting the proper height and width of the contents.
Using the iFrame Resizer library, it's possible to fix iframe weight at 100% and then determine the height of the contents after rendering (example).
This library requires adding a js file to the upper html, and another js file to the inner one (i.e. the one contained in the iframe). Would this last part be much of a hussle?
Trying to embed views which are not valid XML in other Picto views fails at the moment as reported in this forum post. A minimal example with a standalone Picto file and two custom HTML views follows.
<!--view1.html--> View 1
Trying to render
Root/View2
produces aContent is not allowed in prolog.
error message in Picto becauseview1.html
is not valid XML.To fix this we could try to parse the content of the view to embed as XML and if this fails, put it in an
iframe
instead.It would also be nice to support a custom
iframe
attribute in<picto-view>
elements to allow the user to force an iframe (e.g. if the other view is XHTML but the user doesn’t want its CSS/JavaScript to mess up the host page’s style/functionality).The text was updated successfully, but these errors were encountered: