Opened 17 years ago
Closed 14 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 17 years ago by
Keywords: | Pending added |
---|
comment:3 Changed 16 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Steps to reproduce:
- Click anchor button
- Enter anchor name
- Click ok
- Switch to wikitext and back (or save page)
Result: Expected result: #anchor_text
comment:4 Changed 16 years ago by
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 16 years ago by
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 16 years ago by
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 15 years ago by
Keywords: | Pending removed |
---|
comment:8 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
MediaWiki and FCKeditor are no longer supported. Closing the ticket
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?