Tuesday 5 June 2012

Fixed: Spellcheck in Magento Admin

This is a quick solution to get spellcheck in magento working.
It worked for me with magento 1.6.2.
The best solution is the creation of an extension, but I didn't take the time.
Also beware that with the next magento update the changes will be overwritten.

 1) Add the red parts to \js\mage\adminhtml\wysiwyg\tiny_mce\setup.js
        theme_advanced_buttons1 : magentoPlugins + 'magentowidget,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect',
            theme_advanced_buttons2 : 'cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,forecolor,backcolor',
            theme_advanced_buttons3 : 'tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,iespell,media,advhr,|,ltr,rtl,|,fullscreen,|,spellchecker',
            theme_advanced_buttons4 : 'insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,pagebreak',
            theme_advanced_toolbar_location : 'top',
            theme_advanced_toolbar_align : 'left',
            theme_advanced_statusbar_location : 'bottom',
            theme_advanced_resizing : true,
            convert_urls : false,
            relative_urls : false,
            content_css: this.config.content_css,
            custom_popup_css: this.config.popup_css,
            magentowidget_url: this.config.widget_window_url,
            magentoPluginsOptions: magentoPluginsOptions,
            spellchecker_languages : 'English=en,+Deutsch=de',
            ......
Add the spellchecker_languages (see lines above) according to you needs:
This enables you to specify what languages your pspell installation can handle. The value of this option should be a comma separated name value list in the following format name1=value1,name2=value,name3=value where name is the string to present in the menu and the value is a ISO language code like sv or en. If you add a + character infront of the name it will be the default value for the spellchecker. The default value for this option is: +English=en.

 2) Go to http://www.tinymce.com/download/download.php  and get the PHP Spellchecker.

3) Put the folder spellchecker from this zip inside \js\tiny_mce\plugins

That's all. Have fun.

7 comments:

  1. does this work in magento v1.4?
    it seems that it does not work ...

    ReplyDelete
    Replies
    1. Sorry for the late answer. My notifications seem to be off.
      Don't know if it works for 1.4, I haven't tried as I work with 1.6.
      But I suppose it should work because the fix doesn't target the magento core. It goes for the tinymce files.

      Delete
  2. This didn't work :( Im on 1.12 ee and I really need to get the spell checker installed.

    Any ideas?

    ReplyDelete
    Replies
    1. Sorry, no idea. Never used 1.12. Don't know the code changes since then.

      Delete
  3. I'm using version 1.12, too. I am so frustrated in adding spell checker on my magento site. I hope you'll be posting some solution for us. That would be a great help. I will surely visit your blog again.

    ReplyDelete
  4. Sorry to say, but I am not planning to adapt this to Magento Enterprise 1.12 as I have a experience with it, nor available for development.

    ReplyDelete
  5. Hello , its working for me. but one query. how can set default spell checker. currently we have to click on spellcheck toogle button. we want it default without active. please help us

    ReplyDelete

Thanks for commenting. Your comments are reviewed before listed here.