Created
October 14, 2015 17:20
-
-
Save junaidpv/dd71560d7e3ce380a952 to your computer and use it in GitHub Desktop.
Patch for quickeditor module to make the CKEditor field format available at client side. So other modules like linkit can use it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/includes/pages.inc b/includes/pages.inc | |
| index a8bac9b..764fcf0 100644 | |
| --- a/includes/pages.inc | |
| +++ b/includes/pages.inc | |
| @@ -387,6 +387,11 @@ function quickedit_ckeditor_get_untransformed_text($entity_type, $entity_id, $fi | |
| if (_quickedit_is_extra_field($entity_type, $field_name)) { | |
| $subform_id = quickedit_extra_field_info($entity_type, $field_name, 'quickedit subform id'); | |
| } | |
| + | |
| + // Get field values to get the format for the field. | |
| + $field_values = field_get_items($entity_type, $entity, $field_name); | |
| + drupal_add_js(array('quickedit' => array('format' => $field_values[0]['format'])), 'setting'); | |
| + | |
| $form_state = array( | |
| 'entity_type' => $entity_type, | |
| 'entity_id' => $entity_id, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment