More advanced text editor in the edit block page

edited June 2014 in Share
Is it possible to use a more advanced wysiwyg editor in the edit block page?

Comments

  • edited 5:13PM
    You can set the "text_editor" configuration in your MY_fuel.php file to:
    $config['text_editor'] = 'ckeditor';
  • edited 5:13PM
    Is it the only other option?
  • edited 5:13PM
    Are you referring to using CKEditor in general being the only option? Or do you mean, is there any other way to add that configuration?
  • edited June 2014
    I mean the CKEditor in general. Is it possible to use other third party editors?
  • edited 5:13PM
    That's the only one that is currently supported however, I haven't look into others really. You could create a custom field type or overwrite the javascript used for the wysiwyg field type. To do that, add the following to your fuel/application/config/custom_fields.php file:
    // wysiwyg field $fields['wysiwyg'] = array( 'class' => array(FUEL_FOLDER => 'Fuel_custom_fields'), 'function' => 'wysiwyg', 'filepath' => '', 'js' => array('my_wysiwyg.js') // located in the main assets/js/ folder ), 'js_function' => 'fuel.fields.my_wysiwyg', // add this function to the my_wysiwyg.js file 'represents' => array('text', 'textarea', 'longtext', 'mediumtext'), );
    Note that there is a 'my_wysiwyg.js' and a 'fuel.fields.my_wysiwyg' which you will need to create. You can look at the original files found here for reference to see how it is currently done:
    fuel/modules/fuel/config/custom_fields.php
    fuel/modules/fuel/assets/js/fuel/custom_fields.js
    http://docs.getfuelcms.com/general/forms#association_parameters

    You could also overwrite the class and function if you need to as well. The original is found here:
    fuel/modules/fuel/libraries/Fuel_custom_fields.php
Sign In or Register to comment.