Add wiki ID to all internal wikilinks

Hi All,

Is there a way to have the ID of the current wiki added to any internal links if it hasn’t already been specified?

This is only on the WYSIWYG (CKEditor) as most users use that, and aren’t aware of the other editors.

E.G.
If I’m in the wiki Testing(testing) wiki and I add a link to a test page like below;

[[Test>>doc:Test.Webhome]]

Can it be transformed to save it as;

[[Test>>doc:testing:Test.WebHome]]

What I am trying to achieve to to have the wiki ID added to all internal links so users aren’t required to add them, as that won’t happen. I have a few tables on the Main wiki that uses SOLR to retrieve all objects of a type from all subwikis to display all info for easier viewing. But object properties that include a link to a page in that subwiki are invalid as they don’t include the subwiki prefix.

I couldn’t see a configuration option in CKEditor documentation to do something like this. I also haven’t played around with listeners that much yet.

Hi,

I don’t think that exists since we’re trying to do the opposite to ease refactoring

Note that you should be able to resolve the reference using our APIs so that they’re resolved as full references. See https://extensions.xwiki.org/xwiki/bin/view/Extension/Model%20Module#HResolvingaReference

Maybe you could post your code example/snippet so that we can help you?

Thanks