Amit Kumar Mishra Posted September 19, 2018 Report Share Posted September 19, 2018 hi in case you require to make a wysiwyg editor like ckeditor, how to enable it in portal-cms plugin i feel i need to insert it here <?php $this->Form->label($this->_('CmsManagePlugin.index.field_content', true), 'content'); $this->Form->fieldTextarea('content', $this->Html->ifSet($vars->content), ['id' => 'content', 'class'=>'wysiwyg']); ?> i tried a few methods, but all in vain any help would be awesome thanks amit Quote Link to comment Share on other sites More sharing options...
0 Jono Posted September 19, 2018 Report Share Posted September 19, 2018 Requires a little JS <?php $this->Javascript->setInline(" $(document).ready(function() { $('#content').ckeditor(function() {}, {language: '" . substr(Configure::get('Blesta.language'), 0, 2) . "'}); }); "); ?> Amit Kumar Mishra 1 Quote Link to comment Share on other sites More sharing options...
0 Tyson Posted September 19, 2018 Report Share Posted September 19, 2018 I believe the CKEditor JavaScript file must also be set to the view in the appropriate controller, e.g. $this->Javascript->setFile('ckeditor/ckeditor.js', 'head', VENDORWEBDIR); Blesta Addons and Amit Kumar Mishra 2 Quote Link to comment Share on other sites More sharing options...
0 Amit Kumar Mishra Posted September 20, 2018 Author Report Share Posted September 20, 2018 11 hours ago, Tyson said: I believe the CKEditor JavaScript file must also be set to the view in the appropriate controller, e.g. $this->Javascript->setFile('ckeditor/ckeditor.js', 'head', VENDORWEBDIR); may be that is the reason, i was not being able to achieve it will post here, once i test it thanks to both of you for reply Quote Link to comment Share on other sites More sharing options...
Question
Amit Kumar Mishra
hi
in case you require to make a wysiwyg editor like ckeditor, how to enable it in portal-cms plugin
i feel i need to insert it here
<?php
$this->Form->label($this->_('CmsManagePlugin.index.field_content', true), 'content');
$this->Form->fieldTextarea('content', $this->Html->ifSet($vars->content), ['id' => 'content', 'class'=>'wysiwyg']);
?>
i tried a few methods, but all in vain
any help would be awesome
thanks
amit
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.