[TYPO3-rte] Using custom tag with paragraphs enclosed

Christian Lerrahn typo3 at penpal4u.net
Thu Aug 2 14:32:09 CEST 2012


Hi Stanislas,
On Wed, 01 Aug 2012 23:05:38 -0400
Stanislas Rolland <typo3 at sjbr.ca> wrote:
> > I have introduced a new custom tag to handle footnotes. Now, this
> > works great in principle but I cant figure out how I would make it
> > work with paragraphs in footnotes.
> >
> > Basically what I have in the RTE is code like
> >
> > <p>Lorem ipsum<fn>Praesent id.</fn>dolor sit amet,...</p>
> >
> > If I now try to make that
> >
> > <p>Lorem ipsum<fn><p>Aliquam sodales porta vulputate. Fusce commodo,
> > justo tristique convallis suscipit, ligula mi fringilla augue,
> > convallis tempus diam lorem id quam.</p>
> > <p>Nunc risus erat, volutpat sit amet elementum sed, cursus at
> > neque. Quisque sed neque mi./p></fn>dolor sit amet,...</p>
> 
> But this is not valid HTML. You cannot have a paragraph inside a
> paragraph.

Yes, you are right it is not at this point. However, I post-process
this removing everything inside the fn tags and replacing the text with
just a footnote link. The paragraph then shows up in a complete
different place (the footnote) where it is not a paragraph within a
paragraph. In other words, whatever is in footnotes, isn't really
there. So, I'd like to tell the computer "this looks wrong to you
but trust me, it's not". ;)

I'm happy to consider a different way of handling footnotes as long as
it is user-friendly. What I'm currently doing was inspired by LaTeX
which also puts the footnote inline and then only moves the text in the
right place when the typesetting process happens.

Cheers,
Christian


More information about the TYPO3-project-rte mailing list