Just found another very minor, related, issue
After I make the change Dan described just inside DocumentPane.setHTMLView  
of SimplyHTML, it misses the change when the HTML code panel opens first  
on clicking a node. Say if I OK a particular change while the HTML code  
window is open, and re-click on that node, the Editor opens with the HTML  
view still open - and with our tag stripping undone.

So I tried to take care of it by making adding the same code in  
DocumentPane.setDocumentText

      case VIEW_TAB_HTML:
*      if (!Util.preferenceIsTrue("writeHead","true"))
*        sText = sText.replaceAll("(?ims)<head>.*?(<body)","$1");
        sourceEditorpane.setText(sText);
        setHTMLChanged(true);

Or, in case with the heavier replaces suggested in my previous post, that  
code replaces this.

      case VIEW_TAB_HTML:
*      if (!Util.preferenceIsTrue("writeHead","true"))
*        sText =  
sText.replaceAll("(?ims).*?<body.*?>\\s*(.*)</body.*","$1")
*                     .replaceAll("(?m)^ {0,4}","");
        sourceEditorpane.setText(sText);
        setHTMLChanged(true);

Maybe it's starting to look like the stripping code could be put into a  
separate function right? Maybe something like this?
public static String snip(String html) {
        return html.replaceAll...       // Whichever of the above code used
}

Reasamp

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Freemind-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemind-developer

Reply via email to