[Zope] Structured Text with Images -> enabled!

Oliver Keller oli@deswahnsinnsfettebeute.de
Wed, 07 Nov 2001 18:18:00 +0100


hi folks,

I just figured out how to use images in strucured-text with syntax like
"alternative text":img:image.jpg
Because i never read how to do that anywhere (nor on zope.org!)
i feel free to tell you that simple modification to the zope source.

Goto $ZOPE/lib/python/StructurdText/ folder.
You see some files that contain "WithImages" in their names.
As i saw that i simply tried to tell the StructuredText.py file
to use them, and not the others - and it wooorked.
well now the only thing todo in StructuredText.py is:

change source (around line 90 ) to:
import HTMLWithImages, DocumentWithImages, ClassicDocumentClass

and in line 96/97 to:
Document = DocumentWithImages.DocumentWithImages()
HTMLNG = HTMLWithImages.HTMLWithImages()

thats it.
so....am i the only human beeing who figured that out?
i'm shure i'm not, but why did no one of the "big" zope
freaks/programmers advised us?
(im rellay _not_ into python. i can "just" read :-)
and know some basic programming structures..)

....or is that the way of zope => see and try !?? ;-)
(i'm rather new to zope/python...)

a truthful puzzled but happy
oli keller

P.S.: that worked with zope 2.4.2 and 2.5.0a2

P.P.S.: i want to extend the :img syntax to accept "parameters" to 
adjust the alignment of the image. any advise/suggestion what syntax to 
use?
what about just implementing :img-right and :img-center? thats probably 
not the way the structured text authors would go...wouldn't they?