Chris89 Posted June 17, 2020 Posted June 17, 2020 I'd like to be able to use the IPS Editor on my own site, where I have several textareas etc. But I've spent a very long time looking and I simply can't find the code for it anywhere in any of the files. The most I've been able to find is including the CKEditor javascript fo it to work, @ applications/core/interface/ckeditor/ckeditor/ckeditor.js. I've checked in templates, PHP files, all sorts. I just can't find it. I know it needs to be customised so I expect in some way I'll need to run a PHP file in order to get the editor working. Can anyone point me in the right direction as to where I should be looking?
Adriano Faria Posted June 17, 2020 Posted June 17, 2020 See Adding CKEditor to Your Page: https://ckeditor.com/docs/ckeditor4/latest/guide/dev_installation.html
Chris89 Posted June 17, 2020 Author Posted June 17, 2020 Thanks for your reply but as I'm integrating my site with IPS, I'm going to need to integrate the exact same editor that IPS uses, i.e. configured in exactly the same way, essentially included from the forums including any processing which it does.
bfarber Posted June 17, 2020 Posted June 17, 2020 <?php require '/path/to/forums/init.php'; \IPS\Dispatcher\External::i(); $form = new \IPS\Helpers\Form; $form->add( new \IPS\Helpers\Form\Editor( 'name', $defaultValue, $required ) ); if( $values = $form->values() ) { var_dump( $values );exit; } \IPS\Output::i()->sendOutput( $form ); Untested, but you should get the idea from the above. Chris89 1
Recommended Posts