[TYPO3-RTE] Custom tag and paragraphs

Stanislas Rolland typo3 at sjbr.ca
Mon Dec 22 03:28:26 CET 2008


Christian Lerrahn a écrit :
> Hi Stanislas,
>>>> I've written an extension that adds a common tag <fn> used for
>>>> footnotes in the editor. Generally that works fine with footnotes
>>>> just entered in the place where I want to refer to them and then
>>>> being rendered in the right place by the extension. However, I
>>>> cannot get this to work with footnotes that span several
>>>> paragraphs. The RTE will always believe that I'm ending the
>>>> paragraph I am in as soon as I start a new paragraph within the
>>>> footnote. So, if I wanted to write something like
>>>>
>>>> foo bar bla bla<fn>test line
>>>> second parageraph in footnote</fn> bla bla bar foo
>>>>
>>>> I'll get something like
>>>>
>>>> <p>foo bar bla bla<fn>test line</fn></p>
>>>> <p>second parageraph in footnote bla bla bar foo</p>
I am suprised to you do not get:
<p>foo bar bla bla<fn>test line</fn></p>
<p><fn>second parageraph in footnote</fn> bla bla bar foo</p>
>>>>
>>>> However, this should look like 
>>>>
>>>> <p>foo bar bla bla<fn><p>test line</p>
>>>> <p>second parageraph in footnote</p></fn> bla bla bar foo</p>
>>>>
>>>> Is it possible to configure the RTE to behave like that? Or at
>>>> least ignore line breaks in the footnote?
I think that if you use <br /> (shift+enter) then the footnote would not 
be broken.
>>>>
>>> Do you get this issue before or after saving?
>> I just tested it again and it happens before saving. If I enter the
>> tags correctly in the plain text editor and then load the content
>> element in the RTE, it gets stuffed up immediately. If I add the tags
>> in the RTE's HTML mode, the tags seem to get stripped completely.
> 
> Stanislas, I've put this on the bug tracker now. I assume that this is
> undesirable behaviour.
> 
Yes, I suppose so. But, perhaps some option is missing to specify if the 
custom tag should be treated as a block or as inline element. Your tag 
seems to be treated as an inline element. I would need research this 
further but I think this is reason why it is not allowed to cross block 
boundaries.

Regards,
Stanislas


More information about the TYPO3-project-rte mailing list