Jump to content

Insert Link Module (TinyMCE) with "Link to Page" language support


Relmos
 Share

Recommended Posts

Hi,

I have a page with multiple languages (Language Plugins installed). When I first used the TinyMCE I actually though that setting a link would open the "Link to Page" page structure based on the language that I am just using the Editor with. But unfortunately it's always the language I picked in my profile. That means I would not be able to set a link to a page in a different language without switching my user language every time.

Are there any solutions to show the "Link To Page" Field for all languages that a currently being used? So that the Editor would be able to set a link to to a page in language 1 or 2 or 3 and so on?

Thank you.

- Melrors

post-1857-0-46192800-1382993199_thumb.pn

  • Like 1
Link to comment
Share on other sites

Edit:

Oh, I should have known, that Soma is not only faster at answering but also already has a probably great solution for it!   :)

So, nevermind, I'll keep this post here for reference, though.

---

Hi Meiros,

that is definitely something you stumbled upon that should be possible but I don't think it has been implemented by anyone.

The obvious and quick workaround would be to manually enter the URL in the right language, for sure, but this is not really satisfactory.

It'll definitely need a patch to the core to get this working, because the TinyMCE module is part of it. The places to look for are:

  • the TinyMCE PwLink Plugin to enable a language switching behaviour, and
  • the ProcessPageList module that is delivering the data to the "Insert link" modal via Ajax and doesn't support fetching the list for different languages  indepentently of the currently selected user's language.

It would really be great to have a solution for this problem.

Link to comment
Share on other sites

Rest assured this will be added soon (along with Horst's updated ImageSizer stuff), and certainly before the version is bumped to 2.4. Thanks Soma for your updates here. There are a lot of people using dev in production, and there were just enough code changes/additions in this one that made me want to be sure I took the time go go through it thoroughly line-byline in the code, and then test thoroughly. It often takes me a couple hours to work through individual pull requests to feel like I've given them all the attention they deserve. So while I'm not good at being timely with it, I am generally good at being thorough with it. Also, as Soma mentioned, busy times (looming client project deadlines, which always seem to gravitate towards the final months of the year). But thankfully those busy times are just temporary, as ProcessWire is where I prefer to spend my time. 

  • Like 5
Link to comment
Share on other sites

  • 3 weeks later...

I've updated the CKEditor plugin to work for multiple languages too.

Embarassingly I've forgotten how to do a pull request for someone else's repo on Github, so here's the changed .js file - just put it in site\modules\InputfieldCKEditor\ckeditor-4.2.0\plugins\pwlink

It's largely based on Soma's code but altered marginally for CKEditor.

plugin.zip

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...