Hi everyone,

Wikibar plugin, is a neat light-weight plugin, which I used to use on
a daily basis.
(Source: http://aiddlywiki.sourceforge.net/wikibar_demo_2.html)

To my sorrow, the plugin stopped working somewhere from TW core
version 2.4.1
It is only half broken, and half functioning, the half that doesn't
work, includes a 'preview' function, which to me was critical. (since
using server side ccTiddly, all revisions are saved on the server, so
it causes exessive store of not needed versions, which can be avoided
by using 'preview').

(There is a working example with 2.4.0 version on JLiki page
http://www.jgen.ws/jlikiplugins.html)

I have tested it again, on plain (empty) TW code, version 2.5.3, and
it behaves incorrectly, as follow:
1. The install function, doesn't seem to find the textarea id, so
installation of the toolbar goes by default, to the bottom of the
tiddler area. Image ref [1] below.

Where in correct functionality, the wikibar toolbar, is placed
'Before' (above) the textarea, as shown in Ref link [2] below.

Unfortunatly, my knowledge in JS and TW core, is not enough for me to
fix the problem.

In my attempts to, I think I've tracked the source of the problem to
be in a code, that attempts to find the "editorWrapper" variable, or
it may be caused by improper initialization of "theTextarea". - on
incorrect cases, the 'editorWrapper' variable returns Null.

In function wikibar_createWikibar(title)
on a call to wikibar_resolveTiddlerEditorWrapper, as follow:

--- code ---
var editorWrapper = wikibar_resolveTiddlerEditorWrapper(theTextarea);

function wikibar_resolveTiddlerEditorWrapper(obj){
  if(obj.id=='tiddlerDisplay'){return null;}
  if((obj.getAttribute && obj.getAttribute('macro')=='edit text'))
{return obj;}
  return wikibar_resolveTiddlerEditorWrapper(obj.parentNode);
}
-----------

Note the "theTextarea' parameter itself, may not be initiated
properly, I'm not sure, it is initiated few lines earlier, by:

--- code --
  var theTextarea = wikibar_resolveTiddlerEditor(tiddlerWrapper);

function wikibar_resolveTiddlerEditor(obj){
  if(obj.hasChildNodes()){
    var c = obj.childNodes;
    for(var i=0; i<c.length; i++){
      var o=wikibar_resolveTiddlerEditor(c[i]);
      if(o){ return o;}
    }
  }
  return ((obj.getAttribute && obj.getAttribute('edit')=='text')?
obj : null);
}
---

So, if you got down to hear, I hope one of you could solve the
mystery, what had changed on kernel 2.4.1 that prevented this from
working, and hopefuly, one of you could suggest a fix to the plugin.

Appreciates whatever help I could get.

Thanks in advance,

YA.

p.s. - I'm aware of several alternatived like FCKEditor and WikiEdit,
and others, who once do HTML formatting, has also preview
capabilities. I've tested few of them.
My wish, is still, to get wikibar plugin working !, it still has it's
benefits, to my view.


Ref links:
-------------
[1] Faulty 'installation' when checked with 2.5.3 TW version.
http://picasaweb.google.com/lh/photo/NlQLFzpSxuXkndOceRvtOw?authkey=Gv1sRgCNWJ8KGio4m7BQ&feat=directlink
[2] Properly installed toolbar:
http://picasaweb.google.com/lh/photo/mTQzeZmyWm8-Im-VXU_nvw?authkey=Gv1sRgCNWJ8KGio4m7BQ&feat=directlink
[3] Preview mode in action -
http://picasaweb.google.com/lh/photo/sdK8IOnpLprDydOHOgWacA?authkey=Gv1sRgCNWJ8KGio4m7BQ&feat=directlink



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to