This content has been marked as final. Show 6 replies
I have had problems with the <img src="..." /> tag also. It rendered the /> as plain text for some reason. I took out the "/>" and replaced it with </img> instead and it worked.
Reign_Of_Chaos wrote:That is invalid HTML. It is valid XML, but JEditorPane (used by Java Help) was only intended for HTML 3.2.
I have had problems with the <img src="..." /> tag also.
I could not be bothered trawling around for a 3.2 spec., but see the [HTML 4.01 description of the img element|http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.2] for further details.
..It rendered the /> as plain text for some reason. I took out the "/>" and replaced it with </img> instead and it worked.I suggest validating the HTML against a DTD before making random changes.
Thank you for pointing that out. I'll take note next time I need to make changes.
(1) during preparation SSCCE I found that 'empty line' problem is not caused by anchors as I had thougt. I completely overlooked empty <p> elements there, which are ignored by common web browser, but in JavaHelp there were preserved. So I made several changes in XSLT template which produces HTML code so I avoided it.
(2) Inline images I am wrapping by hair space character U+200A. It preserves standard spaces without any other consequences (non breaking space is not ideal in every case...)
(3) I've completely rewritten css style for JavaHelp. It uses px now as units. Nasty, but it works.
(4) The same as the previous. I had to hardcode all the combinations.
There were additional issues with borders as there is not possible to use border="solid silver 1px", but three properties border-color, border-style, border-top-width.
So finally I got what I've wanted. I didn't expected it is possible.
honyk wrote:I am glad to hear you got it working. :-)
..So finally I got what I've wanted. ..
..I didn't expected it is possible.It takes some work (as your solution confirms), but JEditorPane is capable of rendering some surprisingly good results.