Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The TinyMCE editor automatically converts all double-quotes to ", If using the TinyMCE module for editing your content, which effectively disables SmartPants' smart quotes functionality. SmartPants has the ability to convert them back by including "w" in $smartypants_attributes. I've added a few lines of code to optionally enable a first run of SmartyPants. Maybe this should be in another area of the Typogrify configuration screen, though.
92a93,95
> if( variable_get("typogrify_smartypants_attributes_w", 0) ) {
> $text = SmartyPants($text, 'w');
> }
232a236,253
>
> // Advanced SmartyPants configuration
> $form['typogrify_settings']['spadvanced'] = array(
> '#type' => 'fieldset',
> '#title' => t('Advanced SmartyPants'),
> '#collapsible' => TRUE,
> '#collapsed' => TRUE,
> );
>
>
> // SmartyPants Attribute - "w" - Convert "
> $form['typogrify_settings']['spadvanced']['typogrify_smartypants_attributes_w'] = array(
> '#type' => 'checkbox',
> '#title' => t('Translates any instance of "'),
> '#default_value' => variable_get('typogrify_smartypants_attributes_w', 0),
> );
>
>
258c279
Comment | File | Size | Author |
---|---|---|---|
#4 | typogrify-convert-quots.patch | 756 bytes | noelbush |
Comments
Comment #1
Tim Gambell CreditAttribution: Tim Gambell commentedHi Apostate,
Sounds like a plan. I'll get that into the module. Thanks for the suggestion!
Comment #2
Tim Gambell CreditAttribution: Tim Gambell commentedComment #3
mikl CreditAttribution: mikl commentedComment #4
noelbush CreditAttribution: noelbush commentedDid this ever make it in? To me it seemed like maybe it would just make sense to set the $convert_quot option for all the "do everything" values of the $attr switch, as in the attached patch (note that this is against the Drupal 6 version of this module). Any problem with that? It seems to me that this matches expected behavior when you enable the smartypants quote fixing.
Comment #5
sreynen CreditAttribution: sreynen commentedUpdating status to reflect #4.