Viewing 5 replies - 1 through 5 (of 5 total)
  • I’ve the same problem, and it seems that no one has solved it yet. And it’s a pity, because xLanguage really is very useful.

    Waiting for some help…

    Okay, I wanted to use this plugin for a site and had the same problem, so I went to do a bit of debugging of the scripts and I found the cause and I think got it working (at least so it seems).

    The plugin adds the new functions to the TinyMCE editor so that when you press the apply language button it does a few transformations of the text by first striking it through using <strike> and then retransforming it back to <span lang="it"> (I haven’t understood much the logic in the process, but I saw what it does more or less).
    The problem is that when it applies the strike to the newly selected text, it uses the execCommand('Strikethrough') instruction, which does NOT add a <strike> tag, but it adds a <del> tag instead. Since the script looks for “STRIKE”, it cannot find it and the text won’t get correctly tagged.

    To fix this I opened the js/tinymce-plugin.js inside the plugin directory with a text editor and did a search/replace, replacing all occurrences of STRIKE with DEL.
    It seems to be working after doing this. I haven’t tested that much though, and also, I replaced case sensitive at the moment but I don’t know if it’s enough. I haven’t encountered troubles so far but if you do try replacing lowercase as well.
    Hope it helps others.

    I have tested your suggestions just now. All seems to work, with the exception of the “Clear the language of the selected text” button, near to the other xLanguage buttons on the TinyMCE. This would be another useful function to be able to use…

    I will wait for news. Till now, thank you.

    I found another solution for this problem. It’s described on:

    https://levbarkov.ru/lang/en/xlanguage_problem/

    That seems to be more elegant, but I didn’t check if it works.

    It works, and it just saved my sanity ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: xLanguage] Editor tools broken’ is closed to new replies.