| Page 1 of 1 | [ 3 posts ] |
|
I'm using the 2.8.0 RTE and have run into a strange formatting problem in safari only. I stepped through the code and may have found a bug, but I don't understand what it is doing. In editor.js I see the following Safari only code:
Code: filter_safari: function(html) { if (this.browser.webkit) {ht: normal;"/gi, ''); ... } else { //html = html.replace(/<div>/gi, '<br>'); html = html.replace(/<div([^>]*)>([ tnr]*)<\/div>/gi, '<br>'); html = html.replace(/<\/div>/gi, ''); } I see that the last two code lines are removing div tags. I put a button on the toolbar that inserts: Code: <div class="drop_cap">...</div> but the close div is getting deleted by the above code. It seems like the intent was to remove the same number of start and end divs. Is there any work around? |
|
Safari is tricky since they don't put <br> or <p> tags in when editing, so the Editor strips all <div>'s to change them to <br>'s or <p>'s when needed.
If you need this, then you can simply noop the filter_safari method or extend it and replace the code you want to remove. You can also file a bug & I'll get to it when we start on 2.9. |
|
I'm experiencing this problem also. I took your advice and overrode the filter_safari method in my implementation. I'll file a ticket as well.
|
| Page 1 of 1 | [ 3 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© YUI Library - Site Credits
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group