The edit skin has a different functionality from other skins. For example, the
iej
skin is a
JavascriptBasedEditor, and it should be possible to use this skin alongside another skin like
TigerSkin for view/preview etc.
A simple solution is to add a new skin variable EDITSKIN, that is, change the
edit
script from:
my $skin = $query->param( "skin" )
|| &TWiki::Prefs::getPreferencesValue( "SKIN" );
to:
my $skin = $query->param( "skin" )
|| &TWiki::Prefs::getPreferencesValue( "EDITSKIN" )
|| &TWiki::Prefs::getPreferencesValue( "SKIN" );
Thoughts?
--
PeterThoeny - 08 May 2002
An interesting idea, but seems to lack any generic behaviour although I suppose other scripts could get their own SKIN setting if appropriate. How will this affect the
twiki.tmpl
template, would
twiki.tiger.tmpl
be used if EDITSKIN was iej, SKIN was tiger, but there was no
twiki.iej.tmpl
?
--
JohnTalintyre - 09 May 2002
Here's how I have managed the edit template: My TWiki installation is on a Linux machine where I can make symbolic links. I left the edit.iejs.tmpl file alone. When I wanted to use the edit.iejs.tmpl edit skin with another view skin, I make a symbolic link (
ln -s current_name new_name
) for the edit.<myskin>.tmpl to point to the edit.iejs.tmpl. That way, the edit.iejs.tmpl could be used in any number of other skins.
--
MikeBarton - 11 May 2002
'scuse me if I'm wrong, but can't the js script be put into a template that can be included as desired by skin makers?
--
DavidLeBlanc - 15 May 2002
Yes, but they shouldn't. IMO skins are for the look, for stylistic matters, nothing else.
Rich-edit-functionality using javascript is not a skin issue.
Discuss what to call the
WikiEditingWidget variable and have it apply independently to the skin.
--
MartinCleaver - 25 May 2002
I agree with
MartinCleaver. Skin should contain
presentation logic and nothing else, IMHO. Easier to create different skins with same js-based editor. And if editor changes, it's better than copy-paste changes all over templates. Ever heard about piece of code which never changes?
--
PeterMasiar - 25 May 2002
Martin and Peter raise very good points. So, instead of a skin setting, the
JavascriptBasedEditor should be a Plugin, possibly listening to a user preferences variable?
--
PeterThoeny - 29 May 2002
I think that is a good idea. In a related area I've been looking at a Plugin call that lets new controls be added for forms e.g. muliselect (falling back to text box if Plugin not there or Javascript not enabled). I had trouble getting the
JavaScript working outside of the html header so for now I've added %SCRIPT% inside the header area and a TWiki call to add script. We also allow for adding to other parts of the page, in this case above and below the text area.
--
JohnTalintyre - 29 May 2002