Opened 11 years ago

Closed 8 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:

Description

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

Change History (8)

comment:1 Changed 11 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 11 years ago by Martin Kou

Resolution: invalid
Status: newclosed

Ticket expired.

comment:3 Changed 10 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 10 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.

Workaround:

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 10 years ago by Mike Sullivan

Anchors ARE permitted in Mediawiki, but not using the anchor tag. See http://meta.wikimedia.org/wiki/Help:Anchors.

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 10 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 9 years ago by Frederico Caldeira Knabben

Keywords: Pending removed

comment:8 Changed 8 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 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy