Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
User avatar
Veteran Member
Posts: 147
Joined: 2015-08-08 10:12
Location: Cheltenham UK +Weatherford USA


Post by ronwill » 2018-08-05 23:08

Sketcheditor.png (38.62 KiB) Viewed 1312 times
If you should want to change to another html editor (you can resize images etc. in this one), then this is how I do it - hope I've explained it clearly:

In the pages hook file:>>>>>

function XXXXX_header($contentType, $memberInfo, &$args){

case 'tableview':

case 'detailview':
/* ADD following line, change /standard to option that suits your needs */
$header='<%%HEADER%%><script src=" ... "></script>';
/* There are 5 versions: /basic /standard /standard-all /full /full-all */
/* Visit: to see differences */

In the pages pagetemplate.dv file:>>>

Add to bottom of page:

<script> CKEDITOR.replace( 'text' );</script>

Where the reference to 'text' is the name of the text area you want to apply the ckeditor to, below is the text area for this example
taken from the pagetemplate.dv file:

<div class="form-group">
<label for="text" class="control-label col-lg-2">Article</label>
<div class="col-lg-9">
<textarea class="form-control" name="text" id="text" rows="5"><%%VALUE(text)%%></textarea>

Make sure you have it set as a 'text area' not varchar or 'rich(html)text' Note this file gets overwritten on generating application.

ALTERNATIVE METHOD, PLACE: <script> CKEDITOR.replace( 'text' );</script>
in hooks/footer-extras.php instead of the pagetemplate.dv file
This is best way if you don't want to write protect the pagetemplate.dv file as it gets over written on generating the appgini file.
Note this will apply CKEDITOR to all 'text' named text areas of all pages that footer-extras is applied to so avoid if required by using
unique text field names, adding respective script for each text area as required.

You don't need to make any other changes, nor do you need to remove standard NICEDIT (can use either text editor as/where you want to).

Hope that helps someone (newbies etc.) just trying to give back as always receiving help in this great forum

Cheers, Ron

Sketcheditor.png (38.62 KiB) Viewed 1312 times
Ron - AppGini Pro V 5.82 Rev 1101
Plugins: Mass Update + Search Page Maker + Summary Reports + Calendar + AppGiniHelper + Udemy Course
Gloucestershire, UK

Post Reply