On 16.02.2011, at 01:15, Nick Ager wrote:
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:
(aDocument hasChildren and: [ aDocument children size = 1 ])
| outerParagraph |
outerParagraph := aDocument children first.
outerParagraph class name = #PRParagraph
"remove the enclosing paragraph"
document := PRDocument withAll: outerParagraph children ] ].
ifTrue: [ document := aDocument ]
ifFalse: [ document owner: self ]
I'm sure there's a more elegant way....
Thanks. I hope there is a more elegant way. My way at the moment is to do css
display: none ;)