creata.physics Posted June 16, 2011 Share Posted June 16, 2011 I have a rich text editor that I use for my site which was working just fine for me last night. Now I'm not sure what happened but all of a sudden it started adding div tags by default which I do not understand in the slightest. I'm assuming it is the rich text editor doing this, because when I replaced the javascript that calls the textarea with actual html, <textarea name='text'></text> it does not automatically add <div> or <br>, but when I use my code it goes ahead and does it. here is a link to the source of my text editor: http://zext.org/templates/default/scripts/richtext.js this is the html I use to call the edtior, which worked fine until yesterday: <script language="JavaScript">function submitForm() { updateRTEs(); return true; }</script> <form onSubmit="return submitForm();" method="post" enctype="multipart/form-data" action=""> <script language="JavaScript" type="text/javascript" src="templates/<#TEMPLATE#>/scripts/richtext.js"></script> <script language="JavaScript" type="text/javascript">initRTE("templates/<#TEMPLATE#>/images/bbcode/", "templates/<#TEMPLATE#>/rte/", false); </script> <table class="main" cellspacing="1" cellpadding="8"> <col width="25%"><col width="75%"> <tr class="head"><td colspan="5">› Editing Content</td></tr> <tr> <td class='row2' valign="top"> <div class='smiley_wrap' style='border: solid 1px #e1e1e1; padding: 5px; margin: 5px;background: #fff; width: 150px;text-align:center;float:right;'> <script type='text/javascript'>writeRichText('textarea', 'emoticons', '{$smilies}');</script> </div> </td> <td class='row1'> <table cellspacing="0" cellpadding="0"> <tr> <td> <table class="rte" cellspacing="1" cellpadding="2"> <tr class="rte_head"> <td><script type="text/javascript">writeRichText("textarea", "bbcode", "", 1);</script></td> </tr> <tr class="row1"> <td><script type='text/javascript'>writeRichText('textarea', 'textarea', '', '', '0', '$text', 400, 200);</script></td> </tr> </table> </td> </tr> </table> </td> </tr> I'm not sure why it's doing this or what happened to make it do this in the first place. Like I said it was working fine last night, I powered off my comp, turned it back on and now it's not working. Also yes, I've made sure <#TEMPLATE#> is properly replaced and that the directory for the source is loaded properly. Any ideas will be much appreciated. Thanks, Matt. Quote Link to comment https://forums.phpfreaks.com/topic/239522-my-rich-text-editor-automatically-adds-divs/ Share on other sites More sharing options...
creata.physics Posted June 16, 2011 Author Share Posted June 16, 2011 So I just restarded XAMPP and it now does not create divs, so I guess this is solved. Quote Link to comment https://forums.phpfreaks.com/topic/239522-my-rich-text-editor-automatically-adds-divs/#findComment-1230383 Share on other sites More sharing options...
creata.physics Posted June 16, 2011 Author Share Posted June 16, 2011 Sorry for the bump but I had thought the issue was resolved, it seems the code is doing this once more and it's quite a bother, it's making this an issue with parsing my html properly somehow. help is still needed for anybody willing to take a look. It seems the issue is with google chrome! In firefox divs aren't automatically added, but in google chrome they are, what can I do about this? Quote Link to comment https://forums.phpfreaks.com/topic/239522-my-rich-text-editor-automatically-adds-divs/#findComment-1230514 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.