Welcome Guest, Not a member yet? Register   Sign In
popup data to edit in ckeditor
#1

(This post was last modified: 05-11-2017, 03:30 AM by sumant.)

i am submitting data using input text box and ckeditor  and i want to popup data to edit in text box and ckeditor but facing errors while do this... please help me...
my view code is:
<?= form_open('admin/update_post'); ?>
<?php //echo form_hidden('author',$this->session->userdata('username'));?>
<div>
<label for="Title">
<span class="required"><h4>Subject</h4></span>

<?= form_input(['name'=>'sub_heading','placeholder'=>'Your Title','tabindex'=>2,'value'=>set_value($post->sub_heading)]); ?>
</label>
</div>


<div>
<label for="content">
<span class="required"><h4>Content</h4></span>

<?php echo $this->ckeditor->editor('sub_desc',@default_value);?>

</label>
</div>
<div>

<!-- <input type="submit" name="sub" id="sub" value="SEND"> -->
<?= form_submit(['name'=>'submit','id'=>'sub','value'=>'POST']); ?>
</div>
<?= form_close(); ?>



Thanks in advance
Reply
#2

please, post errors you got
Reply
#3

This is how you use the CKeditor.

I use bootstrap so the code will be a little bit different.

Code:
<!--CKEditor, you just need to include the plugin(see at the bottom of this page) and add the class 'ckeditor' to your textarea-->
<!--More info can be found at http://ckeditor.com -->
<div class="form-group" >
    <!--<label class="control-label" for="textarea-ckeditor" > CKEditor</label > -->
    <div class="col-md-12" >
        <textarea id = "textarea-ckeditor" name = "textarea-ckeditor" class="ckeditor" ></textarea >
    </div >
</div >


<!--add before closing body and html tags-->
<!--ckeditor.js, load it only in the page you would like to use CKEditor -->
<script src = "<?php echo asset('admin/plugins/ckeditor/ckeditor.js');?>" ></script >
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

(05-11-2017, 03:42 AM)neuron Wrote: please, post errors you got

A PHP Error was encountered
Severity: Notice
Message: Undefined property: CI_Loader::$ckeditor
Filename: admin2/edit_post.php
Line Number: 34
Backtrace:
File: /home/growyour/public_html/application/views/admin2/edit_post.php
Line: 34
Function: _error_handler

File: /home/growyour/public_html/application/controllers/Admin.php
Line: 510
Function: view

File: /home/growyour/public_html/index.php
Line: 315
Function: require_once


Fatal error: Call to a member function editor() on null in /home/growyour/public_html/application/views/admin2/edit_post.php on line 34
A PHP Error was encountered
Severity: Error
Message: Call to a member function editor() on null
Filename: admin2/edit_post.php
Line Number: 34
Backtrace:
Reply




Theme © iAndrew 2016 - Forum software by © MyBB