Opened 13 years ago
Closed 13 years ago
#8073 closed Bug (invalid)
insertHtml() causes dangling p tag
Reported by: | dalin | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Parser | Version: | 3.6 |
Keywords: | Cc: |
Description
If the following exists in the editor:
<p>Lorem ipsum dolor sit amet. </p>
And the insertHtml() method is called to insert the following in the middle of the paragraph
<hr class="pagebreak">
then the resulting HTML will be:
<p>Lorem ipsum dolor</p><hr class="pagebreak"> sit amet. </p>
Notice that the text after the hr does not have an opening p tag.
Change History (6)
comment:1 Changed 13 years ago by
Status: | new → pending |
---|
comment:2 Changed 13 years ago by
Firefox 5 OS X Snow Leopard Drupal 7 WYSIWYG API module 7.x-2.0 CKEditor 3.6
This text is inserted via a custom button that calls insertHtml(). Though I'm pretty sure that I narrowed the problem down to insertHtml(). I suppose it is possible that the problem happens after that method is called.
comment:3 Changed 13 years ago by
I assume you have used the following code:
<script type="text/javascript" > function myclick(){ CKEDITOR.instances.editor1.insertHtml('<hr class="pagebreak" />'); } </script> <input type="button" value="myButton" onclick="myclick();"/>
I have tested this the same way.
There has been no official Firefox 5 release yet and thus we don't support it yet. What is more I have tried to reproduce the issue on FF4, Safari5, Latest Chrome and Opera under MAC but with no result. Are you able to reproduce the problem in any of the browsers I have mentioned or is this issue only related to FF5?
comment:5 Changed 13 years ago by
Actually on further inspection it appears that I'm looking in the wrong place. I think I actually found a jQuery bug. This issue can be closed. Sorry for the noise.
comment:6 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
I have followed your steps but no result. The code was always:
Could you tell me what browser and operating system are you using and how did you configured your CKEditor?