Welcome Guest, Not a member yet? Register   Sign In
TinyMCE
#1

[eluser]rijobo[/eluser]
Hello there,

I/m trying to use TinyMCE in CI. But I don't see the extra buttons of TinyMCE in my screen. I just see a normal textbox.

This is the beginning of my Paginas controller:

Code:
class Paginas extends Controller {
    function Paginas(){
        parent::Controller();
        $id = $this->session->userdata('gebruikersid');
        if ($id < 1){
            redirect('home/index','refresh');
        }
        
        $this-> tinyMce = '
        [removed][removed]
        [removed]
            tinyMCE.init({
                mode : "textareas"
            });
        [removed]
        ';
    }

In my edit page view I've got this:

Code:
echo "<p><label for='long'>Content</label><br/>";
$data = array('name'=>'content','id'=>'long','rows'=>5,'cols'=>'40','value'=>
$page['content']);
echo form_textarea($data)."</p>";

What do I do wrong?
#2

[eluser]mi6crazyheart[/eluser]
Hey, why u've kept this javascript part of tinyMCE in u'r controller. I think that should be inside of u'r "head" tag of view file...

Like this:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
&lt;html &gt;
&lt;head&gt;
&lt;title&gt;TinyMCE Test&lt;/title&gt;
&lt;meta http-equiv="content-type" content="text/html; charset=utf-8"/&gt;

&lt;!-- OF COURSE YOU NEED TO ADAPT NEXT LINE TO YOUR tiny_mce.js PATH --&gt;
[removed][removed]

[removed]
tinyMCE.init({
    mode : "textareas"
});
[removed]
&lt;/head&gt;
&lt;body&gt;
&lt;!-- OF COURSE YOU NEED TO ADAPT ACTION TO WHAT PAGE YOU WANT TO LOAD WHEN HITTING "SAVE" --&gt;
&lt;form method="post" action="show.php"&gt;
    <p>    
        &lt;textarea name="content" cols="50" rows="15"&gt;This is some content that will be editable with TinyMCE.&lt;/textarea&gt;
        &lt;input type="submit" value="Save" /&gt;
    </p>
&lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;

For more info: http://wiki.moxiecode.com/index.php/Tiny...stallation
#3

[eluser]rijobo[/eluser]
Done that now, but that also doesn't seem to work.
#4

[eluser]mi6crazyheart[/eluser]
Can u show u'r VIEW file code... ?
#5

[eluser]rijobo[/eluser]
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
&lt;html &gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;link rel="stylesheet" href="&lt;?php echo base_url();?&gt;css/style.css" type="text/css" media="screen" /&gt;
&lt;link rel="stylesheet" type="text/css" href="&lt;?php echo base_url();?&gt;css/pro_dropdown_2.css" /&gt;
[removed][removed]
[removed][removed]
[removed] AC_FL_RunContent = 0; [removed]
[removed] DetectFlashVer = 0; [removed]
[removed][removed]
[removed]
&lt;!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Revision of Flash required
var requiredRevision = 45;
// -----------------------------------------------------------------------------
// --&gt;
[removed]
&lt;!-- OF COURSE YOU NEED TO ADAPT NEXT LINE TO YOUR tiny_mce.js PATH --&gt;
[removed][removed]
[removed]
tinyMCE.init({
    mode : "textareas"
});
[removed]

&lt;title&gt;&lt;?php echo $title; ?&gt;&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;
    <div class="container">
        <div class="page">
            <div class="header">
                &lt;?php $this-> load-> view('admin_header');?&gt;
            </div>
            <div class="left">
                &lt;?php $this-> load-> view('admin_left');?&gt;
            </div>
            <div class="content">
                &lt;?php $this-> load-> view($main);?&gt;
                &lt;?php $this-> load-> view('fotos');?&gt;    
            </div>
            <div class="right">
                &lt;?php $this-> load-> view('agenda');?&gt;
            </div>
        </div>
    </div>
&lt;/body&gt;
&lt;/html&gt;
#6

[eluser]mi6crazyheart[/eluser]
Your VIEW file codes are looking perfect. BDW, have u check the tinyMCE javascript file path (src="../jscripts/tiny_mce/tiny_mce.js") is right/wrong ? Bcz, wrong file path also can be issue...
#7

[eluser]rijobo[/eluser]
That was it. Thank you very much!
#8

[eluser]mi6crazyheart[/eluser]
Great. All d best rest of the part of u'r project...




Theme © iAndrew 2016 - Forum software by © MyBB