brad barton Posted December 11, 2019 Share Posted December 11, 2019 Is anyone aware of a way to include or reference an html file in a text area I'm looking for away to have a central file for our header and accordion menu that will be used across multiple tabs and DXP files. I'm able to reference a central css file, but haven't been able to figure out how to do this with HTML. Appreciate any help. Link to comment Share on other sites More sharing options...
Colin Gray 3 Posted December 12, 2019 Share Posted December 12, 2019 Hi there, One way to do this inside Spotfire would be to use an iframe html tag which you can then style to take up the maximum width/height of the text area. I have done this in the past to show other web pages inside Spotfire to give context to data and stories. An alternative routewouldbe to embed your Spotfire tools inside a parent web page and control the Spotfire tool's using the Web Player Javascript API (if need be). For instance, these tools have a generic header in a web page, and then the Spotfire tool is embedded in the page below: https://www.environment.gov.scot/data/data-analysis/bathing-waters/ Hope this helps. Thanks Colin Link to comment Share on other sites More sharing options...
Tyger Guzman 2 Posted December 30, 2019 Share Posted December 30, 2019 I'm not sure about HTML include either, but I would suggest creating a Javascript you can add to a text area that would build your menu in a . That should minimlize the work of creating new HTML for each accordian instance. It doesn't seem as simple as Including CSS or JS is simple with Text Areas: //required css and js resources var css1 = "//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" $("", { "rel": "stylesheet", "type": "text/css", "href": css1 }).appendTo("head") You can also use aPython script that would can add/replace the HTML to the Text Area. from Spotfire.Dxp.Application.Visuals import HtmlTextArea vis = ta.As[HtmlTextArea]() vis.HtmlContent = '''Test ''' Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now