------
Flare 11 and/or Flare 2017 (trial instance) if it makes a difference.
Has anyone discovered an efficient way to get Flare to add links to supplementary CSS stylesheets or JavaScript files to a topic file's XHTML?
I'm working with some third-party JavaScript libraries that use their own JavaScript and CSS files to format samples of structured text (Python, BASH, CSS, et cetera). So I need to insert links to multiple CSS and JavaScript files.
■ Flare's Topic Properties GUI seems designed to make it functionally impossible to select multiple CSS stylesheets. The u.i. is confusing and the result too often unpredictable.
■ Similarly, Ribbon -> Insert -> Script requires quite a few hand-motions and clicking to insert references to JavaScript resource files.
So in Flare's Text Editor (ugh!) I resort to hand coding references to supplementary CSS style sheets, copy-and-pasting my initial <link href=" and <script src=" lines, then hand-editing them to get all the references to resource files in place. That sounds inefficient, and it is. But it's more efficient than repeatedly click-click-click-clicking my way through GUI interfaces that always start from "zero" in terms of remembering their last actions.
I had hoped that I could drag-and-drop files into the either Flare's XML Editor (a.k.a. the topic editor) or into the XHTML in Flare's text editor. Nope. Errors or other unsuccessful results.
SO -- Has anyone figured out a cleverer way to get references to third-party resources into Flare topics?
Cheers & thanks,
Riley
SFO
With Flare text editor, easy way to link to stylesheets?
Re: With Flare text editor, easy way to link to stylesheets?
From memory a number of years ago I manually added the links into the master page. So every topic gets all the links whether they are used or not in that topic. However, if you don't apply a master page to all your topics that won't work for you. I'm afraid I don't have any other suggestions at the moment.
Re: With Flare text editor, easy way to link to stylesheets?
The stylesheet option will be unavailable if you have set a master stylesheet for the target (the primary target). That's because if you used a master stylesheet for the target, that would omit any stylesheets set in the topic or master page, when you build the target's output.
* If you're using v11, that means you cannot have multiple stylesheet links if you want to use a master stylesheet - the master stylesheet has to be set to 'default'. If you want to set a master stylesheet though, a workaround is to add other stylesheets from the master stylesheet using an @import - as described here: viewtopic.php?f=75&t=28850
* If you're using 2017, there's an option to 'Allow local stylesheets in the target, which allows you have additional stylesheet links in topics and master pages. So you need to select this option to make the stylesheet option available.
Anyway - do you want these stylesheet/scripts available for individual topics, or all topics?
* If you just want to add stylesheets/scripts to a single topic, then you can add the stylesheets using Home > Stylesheet Links. But note the info about what happens when you use master stylesheets above.
* If you want the links in all topics, then I'd just include them in your master page(s). But again, note the behaviour of what happens if you use a master stylesheet above.
I find that a handy way to handle multiple stylesheets is to use @import, as described in this post:
viewtopic.php?f=75&t=28850
* If you're using v11, that means you cannot have multiple stylesheet links if you want to use a master stylesheet - the master stylesheet has to be set to 'default'. If you want to set a master stylesheet though, a workaround is to add other stylesheets from the master stylesheet using an @import - as described here: viewtopic.php?f=75&t=28850
* If you're using 2017, there's an option to 'Allow local stylesheets in the target, which allows you have additional stylesheet links in topics and master pages. So you need to select this option to make the stylesheet option available.
Anyway - do you want these stylesheet/scripts available for individual topics, or all topics?
* If you just want to add stylesheets/scripts to a single topic, then you can add the stylesheets using Home > Stylesheet Links. But note the info about what happens when you use master stylesheets above.
* If you want the links in all topics, then I'd just include them in your master page(s). But again, note the behaviour of what happens if you use a master stylesheet above.
I find that a handy way to handle multiple stylesheets is to use @import, as described in this post:
viewtopic.php?f=75&t=28850
-
Phlawm53
- Sr. Propeller Head
- Posts: 442
- Joined: Tue Mar 16, 2010 10:58 am
- Location: San Francisco, CA
- Contact:
Re: With Flare text editor, easy way to link to stylesheets?
Dave:
Thanks for that excellent summary. If only Flare's documentation was as concise and informative...
Cheers & thanks 'gain,
Riley
SFO
Thanks for that excellent summary. If only Flare's documentation was as concise and informative...
Cheers & thanks 'gain,
Riley
SFO