[Freemind-developer] Cleaning up the HTML output a little
A premier mind-mapping software written in Java
Brought to you by:
christianfoltin,
danielpolansky
From: Robert A. <re...@sr...> - 2006-10-27 11:16:06
|
I'm not sure how to go about asking this, so I'll just give it a shot. It would be really nice if the JavaScript toggle() command output by the HTML and XHTML (map) version was compatible with the one from the XHTML(js) version. Perhaps even a better idea would be to make them more explicitely named. While I'm at it I would also like to suggest adding a <div class="Freemind"> just inside the <body> tag of all the HTML output? This would allow for more specific CSS tags to be written, which for CSS always seems useful. Here's what I'm doing that leads me to these requests. I'm trying to modify the output from exports of HTML, XHTML(js), and XHTML(map), so that I don't need to carry around the support directory and get the required CSS and JS into Plone(www.plone.org) and through all of its safe_html filters. I've been fairly successful in getting it to work with only a few modifications. I'd like to release a Plone Package that would allow others to use Freemind output as well. In my Plone package I put all the icons, CSS, and JavaScript from the exported directories and embeded scripts. Since many of the CSS tags used by Freemind are common I needed to also add the "Freemind" class, so that they wouldn't destroy the rest of the Plone site. Once my package is installed there's only a couple of changes of the HTML required. I intend to provide a script that will make these changes: 1. Insert the <div class="Freemind"> and closing </div> just inside the <body>. 2. Remove the relative directory references. The un-qualified icons get caught by my plone installed icons. 3. In the ImageMap version I need to copy out the image.png and change the HTML to reference the new name/location. This all works great EXCEPT for the fact that Plone merges all the JavaScript together and the order of my JavaScript parsing only allows me to pick wich Freemind export versions will work and which will fail. If the toggle() didn't conflict I wouldn't have any trouble making the above HTML modifications and supporting all three formats. I figured since I was asking for the name change for toggle() that I should suggest the class="Freemind" as well. Some background on why I care: I've been using Freemind for years now and find it difficult to live without. About a year ago I started using Plone for my Linux Users Group webserver and lost all my Freemind serving capabilities. My first thought was to make a nice hook for Plone that served up a view of Freemind data directly from the mm source XML. I started coding and created some python that parsed the XML and made HTML, eventually putting in Plone's existing "folding" hooks. It all worked out OK for a beginner Python programmer, as stand alone python code to generate HTML from the Freemind XML. But that code has not been touched in 9 months or so now. Since I still don't know how to get started in putting in a hook like this in Zope/Plone, I recently figured I could get back my Freemind HTML quite easily by just registering all the CSS and JS with Plone. And in two days I almost got it to work perfectly. And it looks a lot better than what I created in my ealier attempt. -- -------------------------------------------------------------- Robert E. Anderson email: re...@sr... Systems Programmer phone: (603) 862-3489 UNH Research Computing Center fax: (603) 862-1761 -------------------------------------------------------------- |