I have log files that are stored in the database.
This was done by another app using php/gzcompress.
I had to add a gzip header to the content because it appears IE8 does not recognize deflate (but that's another story).
Anyway, the browser unzips the content and I'm using an HTMLPane to display it as a fragment and CSS to style the "pre" tag.
This all works great in FireFox.
A bug in IE8 (really?) on the other hand does not recognize carriage returns unless there are pre tags present when the content is rendered.
I looked at transformHTML and thought this would be just what I needed.
I couldn't find any usage examples of it so I assume this is how to use it...
Unfortunately, nothing seems to happen.
The workaround was using get/set Contents and the switch to prevent infinite recursion on the set.
If I'm not using transformHTML correctly, would it be possible to give an example usage snippet or point me somewhere that shows how to use it?
Thanks
This was done by another app using php/gzcompress.
I had to add a gzip header to the content because it appears IE8 does not recognize deflate (but that's another story).
Anyway, the browser unzips the content and I'm using an HTMLPane to display it as a fragment and CSS to style the "pre" tag.
This all works great in FireFox.
A bug in IE8 (really?) on the other hand does not recognize carriage returns unless there are pre tags present when the content is rendered.
I looked at transformHTML and thought this would be just what I needed.
I couldn't find any usage examples of it so I assume this is how to use it...
Code:
this.addContentLoadedHandler(new ContentLoadedHandler() { @Override public void onContentLoaded(ContentLoadedEvent event) { if (htmlTagApplied) return; // transformHTML("<PRE>" + getContents() + "</PRE>"); htmlTagApplied = true; setContents("<PRE>" + getContents() + "</PRE>"); } });
The workaround was using get/set Contents and the switch to prevent infinite recursion on the set.
If I'm not using transformHTML correctly, would it be possible to give an example usage snippet or point me somewhere that shows how to use it?
Thanks
Comment