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
CommentFileSizeAuthor
#4 typogrify-convert-quots.patch756 bytesnoelbush
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Tim Gambell’s picture

Hi Apostate,

Sounds like a plan. I'll get that into the module. Thanks for the suggestion!

Tim Gambell’s picture

Assigned: Unassigned » Tim Gambell
mikl’s picture

Assigned: Tim Gambell » mikl
noelbush’s picture

FileSize
756 bytes

Did 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.

sreynen’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Status: Active » Needs review

Updating status to reflect #4.