NASA Logo, National Aeronautics and Space Administration

NASA GRC WordPress Users Guide

Category: TechNote

Technical notes about configuring or updating the NASA GRC Wordpress theme.

RSS RSS Feed for TechNote

Recommended Plugins for NASA GRC WordPress Theme

The following is a list of WordPress plugins that we use regularly with our WordPress NASA GRC Theme. Most of the plug-ins can be found, reviewed (and installed) by doing a search for their name right within WordPress administration via Plugins > Add New (*).

Clicking on a link below goes to the plugin author’s site;  but if you require more information about a plugin, we recommend going first to the WordPress Plugins Repository directly and doing a name search there, or reviewing via Plugins > Add New, as mentioned above.

Read more…

Modification to TinyMCE for Spellchecking Behind Proxy

1. TinyMCE, WordPress’ built-in visual editor isn’t discovering the NASA proxy (via http.php). Therefore, when upgrading to a new version of WordPress, be sure to change setting in following file to use the internal PSpell spellchecker rather than going outside the proxy to use the Google spellchecker:

/wp-includes/js/tinymce/plugins/spellchecker/config.php

Uncomment out PSpell and comment out GoogleSpell:

// $config['general.engine'] = ‘GoogleSpell’;
$config['general.engine'] = ‘PSpell’;

Resolving Issue with Pasting from Word into TinyMCE Visual Editor, Extra Style Information

Users who have pasted from Microsoft Word or HTML directly into TinyMCE Advanced visual editor window, without first clicking either of the “Paste from Word” or “Paste as Plain Text”  buttons, have discovered a lot of confusing, Word-specific styling info carried over into your content. See example below. Skipping either of these “paste” buttons is easy to do, even for longtime GRC WordPress users.

What we ideally want to achieve is for users to get at least one of the above two button behaviors if the user pastes directly into the visual editor.

Note: This solution was for WordPress 2.7x and an earlier version of TinyMCE Advanced. Please see comments below for any updates regarding WordPress 2.8x and above.

Resolution: By changing both instances of the value “paste_auto_cleanup_on_paste” from “false” to “true” in the following WordPress file,

/wp-includes/js/tinymce/plugins/paste/editor_plugin.js

we achieved the following button behavior, when pasting from Word directly into the visual editor, using the following browsers (on Windows, but we suspect these browsers will behave the same way in Linux or Apple):

  1. Internet Explorer 7: “Paste fromWord.” To “Paste as Plain Text,” you must first select that button.
  2. Firefox, Safari, Opera: “Pastes as Plain Text” dialog box opens; you must then paste again. To “Paste from Word,” you must first select that buton.

Sample of Styling Information Pasted from Microsoft Word

<p><!–[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves /> <w:TrackFormatting /> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF /> <w:LidThemeOther>EN-US</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> <w:SplitPgBreakAndParaMark /> <w:DontVertAlignCellWithSp /> <w:DontBreakConstrainedForcedTables /> <w:DontVertAlignInTxbx /> <w:Word11KerningPairs /> <w:CachedColBalance /> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathPr> <m:mathFont m:val=”Cambria Math” /> <m:brkBin m:val=”before” /> <m:brkBinSub m:val=”&#45;-” /> <m:smallFrac m:val=”off” /> <m:dispDef /> <m:lMargin m:val=”0″ /> <m:rMargin m:val=”0″ /> <m:defJc m:val=”centerGroup” /> <m:wrapIndent m:val=”1440″ /> <m:intLim m:val=”subSup” /> <m:naryLim m:val=”undOvr” /> </m:mathPr></w:WordDocument> </xml><![endif]–><!–[if gte mso 9]><xml> <w:LatentStyles DefLockedState=”false” DefUnhideWhenUsed=”true” DefSemiHidden=”true” DefQFormat=”false” DefPriority=”99″ LatentStyleCount=”267″> <w:LsdException Locked=”false” Priority=”0″ SemiHidden=”false” UnhideWhenUsed=”false” QFormat=”true” Name=”Normal” /> <w:LsdException Locked=”false” Priority=”9″ SemiHidden=”false” UnhideWhenUsed=”false” QFormat=”true” Name=”heading 1″ /> <w:LsdException Locked=”false” Priority=”9″ QFormat=”true” Name=”heading 2″ /> <w:LsdException Locked=”false” Priority=”9″ QFormat=”true” Name=”heading 3″ /> <w:LsdException Locked=”false” Priority=”9″ QFormat=”true” Name=”heading 4″ /> <w:LsdException Locked=”false” Priority=”9″ QFormat=”true” Name=”heading 5″ /> <w:LsdException Locked=”false” Priority=”9″ QFormat=”true” Name=”heading 6″ /> <w:LsdException Locked=”false” Priority=”9″ QFormat=”true” Name=”heading 7″ /> <w:LsdException Locked=”false” Priority=”9″ QFormat=”true” Name=”heading 8″ /> <w:LsdException Locked=”false” Priority=”9″ QFormat=”true” Name=”heading 9″ /> <w:LsdException Locked=”false” Priority=”39″ Name=”toc 1″ /> <w:LsdException Locked=”false” Priority=”39″ Name=”toc 2″ /> <w:LsdException Locked=”false” Priority=”39″ Name=”toc 3″ /> <w:LsdException Locked=”false” Priority=”39″ Name=”toc 4″ /> <w:LsdException Locked=”false” Priority=”39″ Name=”toc 5″ /> <w:LsdException Locked=”false” Priority=”39″ Name=”toc 6″ /> <w:LsdException Locked=”false” Priority=”39″ Name=”toc 7″ /> <w:LsdException Locked=”false” Priority=”39″ Name=”toc 8″ />

<!–[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:”Table Normal”;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:”";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:”Calibri”,”sans-serif”;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:”Times New Roman”;
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:”Times New Roman”;
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]–>

NASA Logo - nasa.gov