TinyMCE4: Fix spellchecker resume
| | |
| | | { |
| | | if (ishtml) { |
| | | var ed = tinymce.get(this.env.composebody); |
| | | sp = ed.plugins.spellchecker; |
| | | |
| | | sp.active = 1; |
| | | sp._markWords(data); |
| | | ed.nodeChanged(); |
| | | ed.settings.spellchecker_callback = function(name, text, done, error) { done(data); }; |
| | | ed.execCommand('mceSpellCheck'); |
| | | ed.settings.spellchecker_callback = null; |
| | | } |
| | | else { |
| | | var sp = this.env.spellcheck; |
| | |
| | | $COMPOSE['spell_checked'] = true; |
| | | |
| | | if (!$spell_result) { |
| | | $result = $isHtml ? $spellchecker->get_words() : $spellchecker->get_xml(); |
| | | if ($isHtml) { |
| | | $result['words'] = $spellchecker->get(); |
| | | $result['dictionary'] = (bool) $RCMAIL->config->get('spellcheck_dictionary'); |
| | | } |
| | | else { |
| | | $result = $spellchecker->get_xml(); |
| | | } |
| | | |
| | | $OUTPUT->show_message('mispellingsfound', 'error'); |
| | | $OUTPUT->command('spellcheck_resume', $isHtml, $result); |