Welcome Guest, Not a member yet? Register   Sign In
Example?
#2

[eluser]pickupman[/eluser]
The code is several years old, but by looking at it you would something like this:

Code:
//In controller
$this->load->helper('bbcode');

//In view
< head >
  <?php echo js_insert_bbcode('form_name', 'field_to_insert');?>
</ head >
< body >

  <?php echo form_open('form_name');?>
  &lt;?php echo get_bbcode_buttons();?&gt;<br/>
  &lt;?php echo form_textarea('field_to_insert');?&gt;<br/>
  &lt;?php echo form_submit('submit', 'Submit');?&gt;
  &lt;?php echo form_close();?&gt;

< /body>

//In controller method processing form input
$textarea = $this->input->post('field_to_insert');

//Replace bbCode
$textarea = parse_bbcode($textarea);

Haven't tested any of the code, but should give a decent idea. I have never used this helper before.


Messages In This Thread
Example? - by El Forum - 02-26-2012, 11:58 AM
Example? - by El Forum - 02-26-2012, 12:54 PM
Example? - by El Forum - 02-26-2012, 12:56 PM
Example? - by El Forum - 02-26-2012, 01:11 PM
Example? - by El Forum - 02-26-2012, 01:16 PM
Example? - by El Forum - 02-26-2012, 01:29 PM
Example? - by El Forum - 02-26-2012, 01:32 PM
Example? - by El Forum - 02-26-2012, 01:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB