Opened 17 years ago

Closed 13 years ago

#1377 closed Bug (invalid)

mediawiki + fckeditor - anchor

Reported by: Jean-Marie Griess Owned by:
Priority: Normal Milestone:
Component: Project : MediaWiki+FCKeditor Version:
Keywords: Cc:


anchor ==> do not function with all the navigators!

Change History (8)

comment:1 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Pending added

Please provide more details about this problem. How are you creating anchors? What is the wikitext output you have for it? What are the current and expected results?

comment:2 Changed 16 years ago by Martin Kou

Resolution: invalid
Status: newclosed

Ticket expired.

comment:3 Changed 16 years ago by Christian

Resolution: invalid
Status: closedreopened

Steps to reproduce:

  1. Click anchor button
  2. Enter anchor name
  3. Click ok
  4. Switch to wikitext and back (or save page)

Result: Expected result: #anchor_text

comment:4 Changed 16 years ago by Christian

So I was wrong. The anchor button is supposed to generate an anchor that looks like this: <a name="AnchorName" />, not the link pointing to the anchor. Anchors aren't supported in MediaWiki so there is no way to generate anchors currently.


You can add anchor support to MediaWiki 1.13+ by picking a token to represent an anchor link (like "-" maybe) and adding it to the parser. You need to modify Parser::replaceInternalLinks to detect links that look like -AnchorName? and replace them with <a name="AnchorName" />.

Next you need to modify FCKeditor/plugins/mediawiki/fckplugin.js in the function _AppendNode. Down where it handles 'a's, you need to add some logic to look for links without an href attribute but with a name attribute and create the -AnchorName? style link.

comment:5 Changed 15 years ago by Mike Sullivan

Anchors ARE permitted in Mediawiki, but not using the anchor tag. See

Mediawiki does not support <a> tags (unless HTML is enabled), but it does support using the 'id' attribute in another supported tag (such as div).

So... to create an anchor: <div id="what_to_link_to"/>

or: <div id="what_to_link_to">text</div>

And to link to the anchor: [[Target page#what_to_link_to]]

or: [[#what_to_link_to]]

I've tested the <div> method on MW 1.13.2, but I'm pretty sure it will work with any version.

comment:6 Changed 15 years ago by Mike Sullivan

One note, most browsers don't handle an empty <div></div> or <div/> well, so we should probably require that there be something within the tag bounds. Using <div></div> or <div/> causes the sidebar in the Monobook skin to be pushed down to the bottom of the page.

comment:7 Changed 14 years ago by Frederico Caldeira Knabben

Keywords: Pending removed

comment:8 Changed 13 years ago by Krzysztof Studnik

Resolution: invalid
Status: reopenedclosed

MediaWiki and FCKeditor are no longer supported. Closing the ticket

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy