[TYPO3-RTE] p after (un)ordered list gives problems

Uschi Renziehausen typo3news at otherone.de
Sun Nov 2 19:16:22 CET 2008


Walrick Bosch wrote:
> Hello Uschi,
> 
> I'm using 4.2.2.
> 
> And indeed, if I use your method it works ok. But what I did is press
> enter, then click on the ol button to get out of the list, type some
> text and then press enter again. And that produces the problem. Even
> without the text. So just enter, ol/ul button, enter is enough to cause
> the problem. Not editor-proof in my opinion.
> 

Trying to track it down:
Doing it your way switching to code view I have the folling html:
<p>A normal paragraph</p>
   <ol>
     <li>ol item 1</li>
     <li>ol item 2</li>
</ol>
Another paragraph after clicking ol-button when inside item 3.

As we can see, the last paragraph is not a p-element. If you now click 
save, it will be one, so you will get the code we want.
But if you want to get on typing and press enter again now, this is what 
we get:

<p>
    <p>A normal paragraph</p>
    <ol>
      <li>ol item 1</li>
      <li>ol item 2</li>
     </ol>
     Another paragraph by clicking ol-button when inside item 3.
</p>
<p>And now another paragraph after clicking enter.</p>

As we can see, after having clicked enter after we have clicked ol the p 
does not wrap the text it was intended for.
Now if we save that one we get two empty paragraphs in rte code view we 
most certainly do not want:

<p>&nbsp;</p>
<p>A normal paragraph</p>
<ol><li>ol item 1</li><li>ol item 2</li></ol>
<p>Another paragraph by clicking ol-button when inside item 3.</p>
<p>&nbsp;</p>
<p>And now another paragraph after clicking enter.</p>

The whole problem does not occur if we use the button 'Insert a 
paragraph after the current block' when inside ol/ul.

Conclusion: If we are in an empty last child of ol/ul li pressing ol or 
ul should behave like insert paragraph after, means the new line should 
  be wrapped by p immediately?

Prosit, Uschi

> Regards,
> 
> Walrick
> 
> Uschi Renziehausen wrote:
>> Hi Walrick,
>>
>> which version are you on. I cannot reproduce your problem (using typo3
>> 4.2.3 dev with my own configuration.
>>
>> I I want to get out of my ol I press enter twice after the last item and
>>  the resulting code is exactly what you want.
>>
>> Uschi
>> Walrick Bosch wrote:
>>> Hello,
>>>
>>> I noticed the following problem with htmlarea. Maybe this is a known
>>> issue, but I don't know which search terms to use for this. It's a bit
>>> hard to describe:
>>>
>>> I'm typing a text content element. At a certain point I create a list
>>> (numbered or bulleted). When I want to exist the list, I hit enter after
>>> the last li, and click the button for the list to exit the list. At that
>>> point the cursor is back on the left of the textfield. The status bar
>>> says just "Path: body". Now I type some text and then hit enter. This
>>> should (in my opinion) wrap the last bit of text in a p tag, instead the
>>> whole thing is wrapped in a p tag.
>>>
>>> So before I hit enter I have this:
>>>
>>>   <p>sometext</p>
>>>   <ol>
>>>   <li>item 1</li>
>>>   <li>item 1</li>
>>>   </ol>
>>>   some more text
>>>
>>> Now with the cursor after the last bit of text I hit enter. Which
>>> results in:
>>>
>>>   <p>
>>>   <p>sometext</p>
>>>   <ol>
>>>   <li>item 1</li>
>>>   <li>item 1</li>
>>>   </ol>
>>>   some more text
>>>   </p>
>>>   <p></p>
>>>
>>> Where I would expect it to produce:
>>>
>>>   <p>sometext</p>
>>>   <ol>
>>>   <li>item 1</li>
>>>   <li>item 1</li>
>>>   </ol>
>>>   <p>some more text</p>
>>>   <p></p>
>>>
>>> Is this a (known) bug? A setting problem? Can anything be done about it?
>>> This is bound to produce problems with editors without html knowledge.
>>>
>>> It works ok if I manually add the paragraph block format using the drop
>>> down selector.
>>>
>>> Regards,
>>>
>>> Walrick
>>>
> 
> 


More information about the TYPO3-project-rte mailing list