TinyMCE - El Forum - 08-29-2010
[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?
TinyMCE - El Forum - 08-29-2010
[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">
<html >
<head>
<title>TinyMCE Test</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<!-- OF COURSE YOU NEED TO ADAPT NEXT LINE TO YOUR tiny_mce.js PATH -->
[removed][removed]
[removed]
tinyMCE.init({
mode : "textareas"
});
[removed]
</head>
<body>
<!-- OF COURSE YOU NEED TO ADAPT ACTION TO WHAT PAGE YOU WANT TO LOAD WHEN HITTING "SAVE" -->
<form method="post" action="show.php">
<p>
<textarea name="content" cols="50" rows="15">This is some content that will be editable with TinyMCE.</textarea>
<input type="submit" value="Save" />
</p>
</form>
</body>
</html>
For more info: http://wiki.moxiecode.com/index.php/TinyMCE:Installation
TinyMCE - El Forum - 08-29-2010
[eluser]rijobo[/eluser]
Done that now, but that also doesn't seem to work.
TinyMCE - El Forum - 08-29-2010
[eluser]mi6crazyheart[/eluser]
Can u show u'r VIEW file code... ?
TinyMCE - El Forum - 08-29-2010
[eluser]rijobo[/eluser]
Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="<?php echo base_url();?>css/style.css" type="text/css" media="screen" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>css/pro_dropdown_2.css" />
[removed][removed]
[removed][removed]
[removed] AC_FL_RunContent = 0; [removed]
[removed] DetectFlashVer = 0; [removed]
[removed][removed]
[removed]
<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Revision of Flash required
var requiredRevision = 45;
// -----------------------------------------------------------------------------
// -->
[removed]
<!-- OF COURSE YOU NEED TO ADAPT NEXT LINE TO YOUR tiny_mce.js PATH -->
[removed][removed]
[removed]
tinyMCE.init({
mode : "textareas"
});
[removed]
<title><?php echo $title; ?></title>
</head>
<body>
<div class="container">
<div class="page">
<div class="header">
<?php $this-> load-> view('admin_header');?>
</div>
<div class="left">
<?php $this-> load-> view('admin_left');?>
</div>
<div class="content">
<?php $this-> load-> view($main);?>
<?php $this-> load-> view('fotos');?>
</div>
<div class="right">
<?php $this-> load-> view('agenda');?>
</div>
</div>
</div>
</body>
</html>
TinyMCE - El Forum - 08-29-2010
[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...
TinyMCE - El Forum - 08-29-2010
[eluser]rijobo[/eluser]
That was it. Thank you very much!
TinyMCE - El Forum - 08-29-2010
[eluser]mi6crazyheart[/eluser]
Great. All d best rest of the part of u'r project...
|