- // Split words by separator\r
- tx = tx.replace(new RegExp('([0-9]|[' + this._getSeparators() + '])', 'g'), ' ');\r
- tx = tinymce.trim(tx.replace(/(\s+)/g, ' '));\r
+ // split the text up into individual words\r
+ if (ed.getParam('spellchecker_word_pattern')) {\r
+ // look for words that match the pattern\r
+ rawWords = tx.match('(' + ed.getParam('spellchecker_word_pattern') + ')', 'gi');\r
+ } else {\r
+ // Split words by separator\r
+ tx = tx.replace(new RegExp('([0-9]|[' + this._getSeparators() + '])', 'g'), ' ');\r
+ tx = tinymce.trim(tx.replace(/(\s+)/g, ' '));\r
+ rawWords = tx.split(' ');\r
+ }\r