I was looking to use a text editor with statuses. Statuses is neither a Node nor an Entity. I searched a lot and found a simple solution. I just has to replace
'#type' => 'textarea', with
'#type' => 'text_format', in statuses/includes/utitlity/statuses.form.inc file. It converted it to a text format enabled textarea, but there are few problems.
Ckeditor is not respecting the character limit set by the module, so I found maxlength module and added
'#maxlength_js' => TRUE,but it does not make the default work. Instead it adds a separate character counter. The markitup library is respecting this, but I want to use ckeditor as I think it is the best editor. How to overcome it?
The form is now scrollable after enabling ckeditor. I want to disable scrolling. The resizeable was already set to FALSE in the module, but ckeditor is not respecting it. How to solve it?
How to hide paragraph counter and word counter? I have not enabled it from settings. I was there by default.
Here is the SnapShot of the statuses form.
Code was added like this: Only 2 modifications were made to the code, the rest is the original code of the module.
$form['fbss-status'] = array( '#type' => 'text_format', '#rows' => variable_get('statuses_box_rows', 2), '#maxlength_js' => TRUE, '#maxlength' => 140, // 508 compliance: add a label, but visually hide it '#title' => t('Status'), '#title_display' => 'invisible', '#default_value' => $default, '#attributes' => array('class' => array('statuses-text', 'statuses-text-main')), '#resizable' => FALSE, '#prefix' => '<div class="statuses-textarea-wrapper">', '#suffix' => '</div>', '#weight' => -40, );