This is exactly what is happening to the openWYSIWYG editor with CodeIgniter.
The folder structure is like this
app_name
-application
-assets
--js
---openwysiwyg
----addons
----docs
----images
----scripts
This is my view file:
<script src="<?php echo base_url('assets/js/jquery.js');?>"></script>
<script type="text/javascript" src="<?php echo base_url('assets/js/openwysiwyg/scripts/wysiwyg.js');?>"></script>
<script type="text/javascript" src="<?php echo base_url('assets/js/openwysiwyg/scripts/wysiwyg-settings.js');?>"></script>
Scipt in view:
<script type="text/javascript">
WYSIWYG.attach('body_input', full);
</script>
I don't really know what is missing.
The problem is in the wysiwyg-settings.js
file. This file is located in the openwysiwyg/scripts/
folder. You have to change the settings for the image and CSS directory. Check for these lines:
//full.ImagesDir = "images/";
//full.PopupsDir = "popups/";
//full.CSSFile = "styles/wysiwyg.css";
Change these line with this (based upon your directory structure):
full.ImagesDir = "app_name/assets/js/openwysiwyg/images/";
full.PopupsDir = "app_name/assets/js/openwysiwyg/popups/";
full.CSSFile = "app_name/assets/js/openwysiwyg/styles/wysiwyg.css";
Now it should work the way it is supposed to.
Another problem that you may run into is that it will not work in Chrome. (That happened to me just now.) The solution is here.