|
|
 Rank: Devotee
Joined: 4/13/2007 Posts: 57 Location: Arlington, VA
|
My apologies if this has been asked and answered already, but will there be any built-in capacity for spell-checking in the new version? If not, is there a best [ractice for adding such functionality? Thanks for your help!
|
|
 Rank: Umbracoholic
Joined: 9/8/2006 Posts: 1,698 Location: KY, USA
|
I don't think v3 will have a built-in spell checker (please correct me if I'm wrong). The challenge is to have something that works with whatever language you're using. I like Firefox 2's built-in spell checker and dictionary. Not sure if it works well in non-English languages or not, though. I've also used IEspell ( http://www.iespell.com/) with IE6 and it also worked well, though it was an extra click. I haven't tried IEspell under IE7. Of course, there are numerous tools if you want to plug in to your MS Office dictionary (assuming you have Office on your computer). I tend to stay away from those since I never know what people will have on their machines. I'm not sure what options are available on the mac, if you need that. I suppose I would recommend recent versions of Firefox unless you need more. Do you need more? And if so, what features are you looking for? Maybe someone knows of the perfect solution :) cheers, doug.
MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 649 Location: Preston, UK
|
Guys, I know that Darren Ferguson had done something with integrating an open source NetSpell checker into umbraco more information here its not something he released as such i did post comment asking for more information :cry: Regards Ismail
Level 2 certified. If it aint broke dont fix.
|
|
 Rank: Devotee
Joined: 4/13/2007 Posts: 57 Location: Arlington, VA
|
Thanks, Ismail-
I ran across that NetSpell solution as well, and was equally disappopinted that your comment wasn't answered! I'm trying to use the TinyMCE editor, and the Firefox spellchecker doesn't appear to work with it. At any rate, my client is a Safari user, so the point is moot anyway. I may try hacking away to get the NetSpell to work - I'll let you know how it goes...
--Andrew
|
|
Rank: Devotee
Joined: 8/14/2006 Posts: 212
|
Add a feature request for 3.1, thats how it works :D I added it for you: http://www.codeplex.com/umbraco/WorkItem/View.aspx?WorkItemId=11265If anyone can create the bits, i can "throw" them in the repository
Signatures suck. No reason to have one.
|
|
 Rank: Devotee
Joined: 4/13/2007 Posts: 57 Location: Arlington, VA
|
Quick update- I found a .NET spellchecker plugin for tinyMCE here: http://sourceforge.net/tracker/index.php?func=detail&aid=1510452&group_id=103281&atid=738747">http:// http://sourceforge.net/tracker/index.php?func=detail&aid=1510452&group_id=103281&atid=738747I'm not terribly in love with it, though, for the following reasons: 1) It only works in the context menu, meaning I have to disable the custom context menu in TinyMCE. It'd be much nicer as a button in the editor. 2) I had to hack up the tiny_mce.js file in the umbraco_client_mce folder to hook it up; I much rather have it as an option in the controlpanel inside settings. If anyone can point me in the right direction for making these changes, especially for issue #2, I'd be very grateful. Thanks!
|
|
 Rank: Umbracoholic
Joined: 7/20/2006 Posts: 1,074 Location: Charleston, West Virginia, United States
|
I am not 100%, but I think you can edit the tinyMCEconfig.config file in the config folder to add an option to the config. Not exactly sure how it all works, but it may be worth a try.. If you get this remotely working, I will be very interested, as I have a perspective client asking for spell checking and grammar options, which will require a bit more fun.
• 2007/2008 MVP • 2008/2009 MVP • Certified • Licensing • Support • Development • Hosting •
|
|
 Rank: Umbracoholic
Joined: 7/20/2006 Posts: 1,074 Location: Charleston, West Virginia, United States
|
Here is another option which uses google services to check spelling. http://orangoo.com/spell/
• 2007/2008 MVP • 2008/2009 MVP • Certified • Licensing • Support • Development • Hosting •
|
|
 Rank: Devotee
Joined: 4/13/2007 Posts: 57 Location: Arlington, VA
|
Well, here's what I did to get the context menu working. Very very hacky, but maybe you can take it surther than I have: 1) Download the plugin http://sourceforge.net/tracker/index.php?func=detail&aid=1510452&group_id=103281&atid=7387472) copy the code into this folder: umbraco_client\tinymce\plugins\spellchecker 3) (This is where we start getting sloppy) In the folder named "umbraco_client\tinymce", rename "tiny_mce.js" to "tiny_mce_trimmed.js". Then rename "tiny_mce_src.js" to "tiny_mce.js". This will make it easier to figure out where to add the js code you'll need. 4) Right around line 319, add this line: Code:this.loadScript(tinyMCE.baseURL + '/plugins/spellchecker/editor_plugin' + tinyMCE.srcMode + '.js'); (To find it easily, search for "// Add plugins" , which for me was line 311.) 5) In developer, select the richtext editor datatype, and uncheck the "Enable Contextmenu" checkbox. 6) Go to the content section, and right click inside a tinyMCE editor, and select "Spell check this field." Incorrectly spelled words get the red underline treatment - rightclick on them for suggested replacements. Hope this helps! [Also - I found that tinyMceConfig file and tried adding the command and plugin values I thought might do the trick, but no dice.]
|
|
Rank: Fanatic
Joined: 3/15/2007 Posts: 378 Location: Cary, NC USA
|
Andrew/Casey - I got the spellchecker working by modifying the TinyMceConfig.config. here's what I did (Andrew I'm going re-use your instructions since you did such a great job). Also saw a great post by Arjan den Boer on adding plugins as well (http://forum.umbraco.org/14788#post-14788): 1) Download the plugin http://sourceforge.net/tracker/index.php?func=detail&aid=1510452&group_id=103281&atid=7387472) copy the code into this folder: umbraco_client\tinymce\plugins\spellchecker 3) I made a couple modifications to the TinySpell.aspx file located in above folder: Code: public string getResults(string text) { string server = "www.google.com"; //string port = "443"; //string path = "/tbproxy/spell?lang=en&hl=en"; string path = "/tbproxy/spell?lang=" + lang + "&hl=" + lang; //string url = "https://" + server + ":" + port + path; string url = "https://" + server + path;
4) Copy spellchecker.gif from the plugin images directory to /umbraco/images/editor directory 5) In config/TinyMceCongig.config file, add the following spellcheck command properties and settings (I placed mine to the left of the stylepicker control, ie: 19): Code: <command> <umbracoAlias>mceSpellCheck</umbracoAlias> <icon>/images/editor/spellchecker.gif</icon> <tinyMceCommand value="" userInterface="true" frontendCommand="mceSpellCheck">spellchecker</tinyMceCommand> <priority>19</priority> </command>
also further down in the page, add the following spellchecker plugin setting: Code: <plugin loadOnFrontend="false">spellchecker</plugin>
6) In developer, select the richtext editor datatype, and check the spellchecker option to display in the tinymce toolbar:  7) Go to the content section, click the spellchecker icon inside a tinyMCE editor... Incorrectly spelled words get the red underline treatment - click on them for suggested replacements.  note: you may also need to issue an iisreset command in case the richtexteditor settings become cached and the spellchecker options do not display...
|
|
Rank: Fanatic
Joined: 3/15/2007 Posts: 378 Location: Cary, NC USA
|
another cool thing is the multi-language support (you'll need the lang files that I believe are placed in. by modifying the plugins "editor_plugin.js" file to support multiple languages, ie: Code: _buildSettingsMenu : function(inst, lang) { //var i, ar = tinyMCE.getParam('spellchecker_languages', '+English=en').split(','), p; var i, ar = tinyMCE.getParam('spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv').split(','), p;
you can now apply various languages to the spellchecker:  spellchecker firing (ie: spellchecker button click) - I still need to get this to use appropriate lang file:  mispelled word results with suggestions:
|
|
Rank: Fanatic
Joined: 3/15/2007 Posts: 378 Location: Cary, NC USA
|
ok, I got the dynamic language file loading working finally. here's what I did: -in the spellchecker editor_plugin.js file I added a new method (_dhtmlLoadScript) that allows dynamic script loading (tinyMCE.loadScript method doesn't appear appear to be supported outside of the inital page load event) Code: }, _dhtmlLoadScript : function (url) { var e = document.createElement("script"); e.src = url; e.type="text/javascript"; document.getElementsByTagName("head")[0].appendChild(e); }, cleanup : function(type, content, inst) { switch (type) {
-then in the editor_plugin.js file execCommand method I added a call to _dhtmlLoadScript: Code:
execCommand : function(editor_id, element, command, user_interface, value) { var inst = tinyMCE.getInstanceById(editor_id), self = TinyMCE_SpellCheckerPlugin, args = '', co, bb, mb, nl, i, e, mbs;
//update appropriate language file var langPath = tinyMCE.baseURL + '/plugins/spellchecker/langs/' + inst. spellCheckerLang + '.js'; TinyMCE_SpellCheckerPlugin._dhtmlLoadScript(langPath);
Also, one other thing I forgot to mention in the previous post was that the plugin directory needs to be excluded from the umbraco request handler in order for the ajax functionality to work, ie: Code: <add key="umbracoReservedPaths" value="/umbraco/,/install/,/umbraco_client/tinymce/plugins/spellchecker/" />
the initial editor_plugin.js file has also been updated (the original .NET spellchecker port version was from 8/2006. The version I updated was dated 5/2007. there appeared to be lots of browser specific updates). you can download my update version of editor_plugin.js from http://216.27.49.243/images/snapshots/editor_plugin.jsbelow are some snapshots of the modifications in action (be sure to compare with previous snapshots to see specific settings now in appropriate selected language - which are all stored in plugin/lang files):   
|
|
 Rank: Addict
Joined: 3/17/2008 Posts: 953 Location: Nyborg, Denmark
|
That's so HOT - very impressive! Any reason not to add this to umbraco 3.1?
Jeeeez, did I really start this :-)
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 649 Location: Preston, UK
|
:w00t: Guys,
This is mint! We have had a couple of clients asking about spell checker functionality. :thumbup: Regards
Ismail
Level 2 certified. If it aint broke dont fix.
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 649 Location: Preston, UK
|
Guys,
I followed instructions and it almost worked. I started getting bad xml error when clicking spell check button. I then pasted the spell checker url into browser and got node not found error.
I realised then that I needed to add umbraco_client to reserved urls in web.config and that solved the problem.
Regards
Ismail
Level 2 certified. If it aint broke dont fix.
|
|
Rank: Fanatic
Joined: 3/15/2007 Posts: 378 Location: Cary, NC USA
|
Niels: I can send you a zipped up version of the entire plugin directory if you like... Ismail: I realized I forgot to mention the config settings and mentioned it in my last post but it looks like I didn't have enough space around the code and it did not make it easy to read. let me try again:
Also, one other thing I forgot to mention in the previous post was that the plugin directory needs to be excluded from the umbraco request handler in order for the ajax functionality to work, ie: Code:
<add key="umbracoReservedPaths" value="/umbraco/,/install/,/umbraco_client/tinymce/plugins/spellchecker/" />
|
|
Rank: Fanatic
Joined: 3/15/2007 Posts: 378 Location: Cary, NC USA
|
|
|
Rank: Fanatic
Joined: 3/15/2007 Posts: 378 Location: Cary, NC USA
|
I also noticed there aren't completed lang files for all languages. So you may need to translate the setting captions into the appropriate language... ie: spanish (es.js)...
|
|
Rank: Fanatic
Joined: 3/15/2007 Posts: 378 Location: Cary, NC USA
|
looks like all languages aren't translated from the tinymce site either (if you download): http://tinymce.moxiecode.com/language.php
|
|
Rank: Fanatic
Joined: 3/15/2007 Posts: 378 Location: Cary, NC USA
|
anyone know how accurate/dependable translation services like google or babelfish may be for translating these options?
|
|
|
Guest |