public class ExtendedHTMLEditorKit extends HTMLEditorKit
{
+ private String BaseUrl = "";
+
/** Constructor
*/
public ExtendedHTMLEditorKit()
{
}
+
+ public ExtendedHTMLEditorKit(String baseurl)
+ {
+ BaseUrl = baseurl;
+ }
/** Method for returning a ViewFactory which handles the image rendering.
*/
public ViewFactory getViewFactory()
{
- return new HTMLFactoryExtended();
+ return new HTMLFactoryExtended(BaseUrl);
}
/* WACKY GERMAN CODE */
*/
public static class HTMLFactoryExtended extends HTMLFactory implements ViewFactory
{
+ private String BaseUrl;
+
/** Constructor
*/
- public HTMLFactoryExtended()
+ public HTMLFactoryExtended(String baseurl)
{
+ BaseUrl = baseurl;
}
/** Method to handle IMG tags and
HTML.Tag tagType = (HTML.Tag)obj;
if(tagType == HTML.Tag.IMG)
{
- return new RelativeImageView(elem);
+ return new RelativeImageView(elem,BaseUrl);
}
}
return super.create(elem);