Image issues with CKEditor
I enabled the CKEditor so I can add extra buttons for tables and other styles for our client. Our client doesn't know HTML so having the WYSIWYG editor is a must. There seems to be an issue adding images to my pages using this editor.
If I upload and add the image on the editor view, it looks like it is added correctly. However, if I browse to the source view, the image vanishes (along with the entire img tag) and I get this error in the Firebug console:
TypeError: src is undefined in /assets/js/fuel/custom_fields.js?c= on line 197
Now, if I upload and add the image through the source view, the img tag is added correctly and it will also save correctly. However, if I now try to make any kind of edit to this page in the editor view, I will get the same error I listed above. I can still make any edits I want through the source editor though.
Is there something I can do to fix this?
Comments
Yes, the latest version of both Fuel CMS and CKEditor
2. Also, what does the source code look like (so you by chance have "style" tags in your HTML)?
MANAGEMENT
Founder and Managing Member
Business Development
RESEARCH
SALES
All links and images were added using the editor in the source view.
3. And is this consistent across browsers?
I can reproduce this issue in both Firefox and Chrome. However, the console in Chrome gives this error:
"Uncaught TypeError: Cannot call method 'replace' of undefined" in the same file on the same line as the Firefox error
<div class="ourstaff"> <table class="management"> <tbody> <tr> <td> <h3>MANAGEMENT</h3> </td> </tr> <tr> <td><img src="/assets/images/staff/s_Adam_96x96.jpg" alt="" /><a href="{site_url('ourstaff/adam')}">---</a><br /> <em>Founder and Managing Member</em></td> <td><img src="/assets/images/staff/s_Paul_96x96.jpg" alt="" /><a href="{site_url('ourstaff/paul')}">---</a><br /> <em>Business Development</em></td> </tr> <tr></tr> </tbody> </table> <hr /> <table> <tbody> <tr> <td> <h3>RESEARCH</h3> </td> </tr> <tr> <td><a href="{site_url('ourstaff/anthony')}">---</a></td> <td><a href="{site_url('ourstaff/alexander')}">---</a></td> <td><a href="{site_url('ourstaff/judah')}">---</a></td> </tr> <tr> <td><a href="{site_url('ourstaff/justin')}">---</a></td> <td><a href="{site_url('ourstaff/biana')}">---</a></td> <td><a href="{site_url('ourstaff/ross')}">---</a></td> </tr> <tr> <td><a href="{site_url('ourstaff/scott')}">---</a></td> <td><a href="{site_url('ourstaff/robert')}">---</a></td> <td><a href="{site_url('ourstaff/matt')}">---</a></td> </tr> <tr></tr> </tbody> </table> <hr /> <table> <tbody> <tr> <td> <h3>SALES</h3> </td> </tr> <tr> <td><a href="{site_url('ourstaff/mary')}">---</a></td> <td><a href="{site_url('ourstaff/tanja')}">---</a></td> <td><a href="{site_url('ourstaff/meg')}">---</a></td> </tr> <tr> <td><a href="{site_url('ourstaff/richard')}">---</a></td> <td><a href="{site_url('ourstaff/rob')}">---</a></td> <td></td> </tr> </tbody> </table> </div>
<img src="{img_path('staff/s_Adam_96x96.jpg')}" alt="" />