Welcome Guest, Not a member yet? Register   Sign In
How to embed tinymce(rich rext editor) with codeigniter php in view page.
#1

[eluser]Unknown[/eluser]
Hello everyone,

I have created 2 text area (title & comment). This is how it looks on my view page

Code:
<?php echo form_open('/blog/entrytest/','id="frmBlog"');?>
<?php
$title = array(
  'name' => 'title',
  'id' => 'title',
  'size' => '50',
  'value' => set_value('username')
  
);

$comment = array(
  'name' => 'comment',
  'id' => 'comment',
  'size' => '80',
  'value' => set_value('name')
);
  
?>


This works fine however i want to embed the text editor tinymce into the page to replace the $comment. Not sure how to do it as tinymce textbox is with html. this is how that looks. I have this textbox on the same page at the moment (it looks fine on the page) but i need to combine it into the form frmBlog so when i click submit both title and the text in tinymec text box gets sent together.

Code:
<textarea id="elm" name="elm" rows="15" cols="80"  80%" form="frmBlog" >
  
</textarea>
#2

[eluser]CroNiX[/eluser]
use form_textarea().
Code:
<?php
$title = array(
  'name' => 'title',
  'id' => 'title',
  'size' => '50',
  'value' => set_value('username')
);

$comment = array(
  'name' => 'comment',
  'id' => 'comment',
  //'size' => '80',
  'rows' => 15,
  'cols' => 80,
  'value' => set_value('name')
);
echo form_open('blog/entrytest','id="frmBlog"');
echo form_input($title);
echo form_textarea($comment);
echo form_submit();
echo form_close();
?>




Theme © iAndrew 2016 - Forum software by © MyBB