This question about Missing functionality: Marked for deletion
Editor: iejs
dropdown control containing all topics of current web?
Background
In TWiki, there used to be a skin with an
iejs
editor. It was removed in 2006 because it was buggy, but it had one very neat feature that I'd like to re-create: One of the controls in the formatting toolbar was
a dropdown control that contains all topics of the current web, and when the user selects one, that
topic is inserted into the text at the current cursor position. That has two advantages: First,
users don't need to memorize the exact name and spelling of all topics, and second, the
overall quality of the wiki improves when the internal linking is easier to do and therefore more often done.
I want to re-create the functionality of that dropdown control. (I'm aware that this feature becomes impractical when the web contains > ~200 topics, so a parameter would be needed to turn the feature off.)
Question
I need to get the list of topics into the editor's javascript somehow, but how?
Answer (partial)
I found the old
iejs
code
here. Here's the relevant bit that needs to be put into PatternSkin's editor:
<select name="topic" onchange="insert(this.options [this.selectedIndex].value);this.options [0].selected = true" class="editDropdown">
<option value="">Topic ...</option>
%TOPICLIST{"<option value=$qname>$name</option>" separator=" "}%
</select>
The next step is to find the relevant parts of the TinyMCEPlugin editor...
Perhaps this new
iejs
should be implemented as a new plugin, see
http://wiki.moxiecode.com/index.php/TinyMCE:Create_plugin/3.x
It should be possible to disable the dropdown control by using a preference variable in
TinyMCEPlugin#Preferences.