[Zope] Structured Text with Images -> enabled!

Oliver Keller oli@deswahnsinnsfettebeute.de
Sun, 11 Nov 2001 13:35:30 +0100


Danny William Adair wrote:

> 
> See my comment in the .py-file:
> 
> -------------------------------------------------------------
> # Technical Note:
> # This function uses two helper classes to override the standard behavior
> # of the preinstalled ...WithImages classes of the StructuredText package.
> # 
> # - The current Zope 2.4 (and 2.4.1b1) implementation has a little bug in
> #   StructuredText.DocumentWithImages.doc_img() that prevents it from 
> accepting
> #   images with underscores in their URL. This has been fixed.
> # 
> # - The current Zope 2.4 (and 2.4.1b1) implementation of
> #   StructuredText.HTMLWithImages.document() will add <html> and <body> tags
> #   to your input. I expect this to be unwanted by most users, since
> #   StructuredText.HTMLClass.document() - the standard rendering without 
> images - 
> #   doesn't do that. stx_to_html will only render "the inner part", nothing
> #   that you didn't have in your stx input will be added.
> -------------------------------------------------------------
> 
> I'm not sure, but I think both problems have been solved by today. If that is 
> the case: yes, you could use them directly.


nope. :-) DocumentWithImages adds the great <html> <body> tag "feature" 
again. but i just commented it out. the underscore was no big problem 
either. furthermore i now added aligment feature with that syntax 
:img-<align>: with <align> can be on of the possible align="" prameters 
of an <img> tag and is "passed trough".

 
> There are so many patches to the tree tag (even I made one for urlparam_expr 
> - had to) that I sometimes think this thing should be taken out of the core, 
> and put into the Products directory as an external - though pre-installed - 
> product (like SiteAccess). The ZMI pages rely on it, but most websites don't 
> use the tree tag themselves. Putting it there would make it easier and 
> clearer for people to exchange it with more current or more powerful 
> versions. Plus they're not scared of messing with core files.


i'm not scared :-) but yes, that would probably be the best solution.


>>>Did you take a look at http://dev.zope.org/Members/jim/StructuredTextWiki
>>>?
>>>
>>oh yes. many times before.(many people suggested to look there) and i
>>must say i really felt beeing left alone on that Wiki pages. i
>>definitifly found nothing usefull especially about images in stx.
>>and i don't like the Zwiki stuff itself either!
>>
> 
> ZWiki:
> De gustibus non est disputandum.
> Love it or loath it, you won't get rid of it.


well and i think i hate it.

 
> Content:
> You didn't find anything useful? LOL
> 
> Images are an extension to the classic stx (see: 
> http://www.zope.org/Documentation/Articles/STX --- Advanced Usage)


so what ? where is the info?

BTW. can you give me a page where the behaviour of 
"qwertz":img:URL1:URL2 rendered in HTML is explained?
or better for what it was for?
i can't find the page again where i've read it. the html output was 
somthing link:
<a name"qwertt"></a>
<b> Figure </b> URL2 <img src="URL1">
as it made IMHO no sense, i deletet / commented out the recent lines.


> If you're off to customizing the document processor, how did you like
> "http://www.zope.org/Members/jim/StructuredTextWiki/CustomizingTheDocumentProcessor" 
> ?


yes, i've visited that before, too.

and,ok, that was quite informational, but not much more than i figured out by myself

looking at the *WithImgaes files.

> For ready-to-use recipes, I would always start in the mailing list archives.
> 
> Btw, have you seen http://structuredtext.sourceforge.net, especially the 
> "directives" and "substitution" feature? Yes, this is not (yet) Zope 
> "out-of-the-box" stuff...


oh you mean reStructuredText there ?
yes, of course :-) but i had no clue how to use that with zope.

as there where no examples, etc.


thank you again for your suggestions,
oli