{"id":2580,"date":"2013-01-14T20:30:38","date_gmt":"2013-01-15T01:30:38","guid":{"rendered":"http:\/\/www.kayak2u.com\/blog\/?p=2580"},"modified":"2013-01-15T00:03:20","modified_gmt":"2013-01-15T05:03:20","slug":"ckeditor-4-0-with-after-the-deadline-ckeditor-spellgrammar-plugin","status":"publish","type":"post","link":"http:\/\/www.kayak2u.com\/?p=2580","title":{"rendered":"CKEditor 4.0 with After the Deadline CKEditor spell\/grammar plugin"},"content":{"rendered":"<p>What better way to spend a relentlessly rainy day than banging head against PHP and <span class=\"mceItemHidden\"><span class=\"hiddenSpellError\" pre=\"\">Javascript<\/span><\/span>.<\/p>\n<p>So, the <a href=\"http:\/\/wordpress.org\/extend\/plugins\/ckeditor-for-wordpress\/\" target=\"_blank\"><span class=\"mceItemHidden\"><span class=\"hiddenSpellError\" pre=\"\">CKEditor<\/span><\/span><\/a> doesn&#39;t want to use its <span class=\"mceItemHidden\"><span class=\"hiddenGrammarError\" pre=\"\">built in<\/span><\/span> Spell Check &#39;gorythms in the Opera browser. &nbsp;After rummaging around, I found the <a href=\"http:\/\/www.afterthedeadline.com\/download.slp?platform=CKEditor\" target=\"_blank\">After the Deadline for CKEditor plugin<\/a>, with its <a href=\"http:\/\/www.polishmywriting.com\/atd-ckeditor\/readme.html\" target=\"_blank\">README file<\/a>.<\/p>\n<p>To start, extract the AtD files to the <span class=\"mceItemHidden\"><span class=\"hiddenSpellError\" pre=\"\">ckeditor<\/span><\/span>\/plugins directory. &nbsp;Then copy the contents of atd.css and append them to <span class=\"mceItemHidden\"><span class=\"hiddenSpellError\" pre=\"\">ckeditor-for-wordpress<\/span><\/span>\/ckeditor\/contents.css. &nbsp;That&#39;s the easy parts.<\/p>\n<p>Then ckeditor-for-wordpress\/ckeditor.config.js needs <span class=\"mceItemHidden\"><span class=\"hiddenGrammarError\" pre=\"\">to be<\/span><\/span> tweaked.<\/p>\n<p>The AtD <span class=\"mceItemHidden\"><span class=\"hiddenSpellError\" pre=\"\">readme<\/span><\/span> says to add&#8230;&nbsp;<\/p>\n<blockquote>\n<p>config.extraPlugins = &#39;atd-ckeditor&#39;;<\/p>\n<\/blockquote>\n<p>&#8230; but while that alone might have worked in <span class=\"mceItemHidden\"><span class=\"hiddenSuggestion\" pre=\"\">previous<\/span><\/span> versions of CKEditor, more <span class=\"mceItemHidden\"><span class=\"hiddenGrammarError\" pre=\"\">is needed<\/span><\/span>, now. &nbsp;Also add&#8230;&nbsp;<\/p>\n<blockquote>\n<p>CKEDITOR.plugins.addExternal(&#39;<span class=\"mceItemHidden\"><span class=\"hiddenSpellError\" pre=\"\">atd-ckeditor<\/span><\/span>&#39;, ckeditorSettings.pluginPath + &#39;plugins\/atd-ckeditor\/&#39;);<\/p>\n<\/blockquote>\n<p>Then, in the toolbar section of the same file, add [&#8216;atd-ckeditor&#8217;] wherever you want the spell check button located. &nbsp;See <a href=\"https:\/\/www.kayak2u.com\/?p=2578\" target=\"_blank\">previous post<\/a> for toolbar layout.<\/p>\n<p>But THEN, it turns out there&#39;s a small bug in the AtD plugin.js file. &nbsp;Down around line 182&#8230;&nbsp;<\/p>\n<blockquote>\n<p>var proxy_server = editor.config.atd_rpc == undefined ? path + &#39;proxy.php?url=\/checkDocument&#39; : editor.config.atd_rpc;<\/p>\n<\/blockquote>\n<p>&#8230; <span class=\"mceItemHidden\"><span class=\"hiddenSuggestion\" pre=\"\">delete<\/span><\/span> &quot;\/<span class=\"mceItemHidden\"><span class=\"hiddenSpellError\" pre=\"\">checkDocument<\/span><\/span>&quot;. &nbsp;The string <span class=\"mceItemHidden\"><span class=\"hiddenGrammarError\" pre=\"\">is appended<\/span><\/span> a few lines later.<\/p>\n<p>And then it WORKS in Opera. &nbsp;Sort of. &nbsp;The plugin flags misspellings right enough, but the suggestion\/correction feature is <span class=\"mceItemHidden\"><span class=\"hiddenSpellError\" pre=\"\">borked<\/span><\/span>, but that&#39;s Opera&#39;s fault.<\/p>\n<p>All in all I like it. &nbsp;Not only does AtD find misspellings, it flags questionable grammar, too. &nbsp;Passive voice much?<\/p>\n<p>ps. &nbsp;Which makes it official: &nbsp;I now spend more time preparing to blog than I actually spend blogging.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What better way to spend a relentlessly rainy day than banging head against PHP and Javascript. So, the CKEditor doesn&#39;t want to use its built in Spell Check &#39;gorythms in the Opera browser. &nbsp;After rummaging around, I found the After the Deadline for CKEditor plugin, with its README file. To start, extract the AtD files [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-2580","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"http:\/\/www.kayak2u.com\/index.php?rest_route=\/wp\/v2\/posts\/2580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.kayak2u.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.kayak2u.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.kayak2u.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.kayak2u.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2580"}],"version-history":[{"count":0,"href":"http:\/\/www.kayak2u.com\/index.php?rest_route=\/wp\/v2\/posts\/2580\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.kayak2u.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.kayak2u.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2580"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.kayak2u.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}