Hi Norbert,
I like to avoid creating a paragraph which has a big influence on styles. If
I'm not misled by firebug etc. than the verbatim
is created after the
paragraph leaving an empty paragraph right before the verbatim. Is this
possible easily?
I was holding off replying in case someone else came up with a better
suggestion as I'm not terribly proud of the solution I came up with. For
what it's worth, I've derived from PRPage (#IZPageWithoutEnclosingParagraph)
and implemented #document: as:
---
document: aDocument
(aDocument hasChildren and: [ aDocument children size = 1 ])
ifTrue: [
| outerParagraph |
outerParagraph := aDocument children first.
outerParagraph class name = #PRParagraph
ifTrue: [
"remove the enclosing paragraph"
document := PRDocument withAll: outerParagraph children ] ].
document isNil
ifTrue: [ document := aDocument ]
ifFalse: [ document owner: self ]
---
I'm sure there's a more elegant way....
Nick