Quick & Dirty patch to make Raw edit the default
Some people upgrading big sites to 4.2 may want to minimize the risk and keep Raw edit as the default (acceskey 'e') behavior,
and the new Wysiwyg editor a separated button, (accesskey 'w'). This has also the advantage of not changing the accesskeys relative to previous versions.
Installation:
- download
viewtopicactionbuttons.editdefault.tmpl attached to this topic to your templates/ directory
- in your
Main/TWikiPreferences topic, put a:
- Set SKIN = editdefault,pattern
Also attached for reference (you do not need to download it) is the diff between viewtopicactionbuttons.editdefault.tmpl and the original pattern file, viewtopicactionbuttons.tmpl.
--
Contributors: ColasNahaboo - 17 Jan 2008
Discussion
I think that keeping Raw edit default is the best option. Thanks for patch
--
CarlinhosCecconi - 17 Jan 2008
Changed from a patch to pattern (dirty) to a variant of the pattern skin (cleaner, survives upgrades)
--
ColasNahaboo - 23 Jan 2008
After using the new template new topics still start editing in
WYSIWYG editor. The
nowysiwyg parameter can be included in the form defined n
TWiki.WebCreateNewTopicTemplate to fully obtain the same behavior of previous TWiki version. In
TWiki.WebCreateNewTopicTemplate replace this
%TMPL:DEF{"formstart"}%<form name="newtopicform" id="newtopicform" action="%SCRIPTURLPATH{edit}%/%BASEWEB%/">
<input type="hidden" name="onlynewtopic" value="on" /> %TMPL:END%
With this
%TMPL:DEF{"formstart"}%<form name="newtopicform" id="newtopicform" action="%SCRIPTURLPATH{edit}%/%BASEWEB%/">
<input type="hidden" name="onlynewtopic" value="on" /><input type="hidden" name="nowysiwyg" value="1" />%TMPL:END%
--
EnriqueCadalso - 21 Apr 2008
I have followed these instructions and it doesn't work the damn editor continues to override the raw editor. Given the wretched nature of
TinyMCE - it litters the TWiki markup with bits of HTML, it adds no breaking spaces and will NOT let the user remove them - I do not want it as the default.
I've been forced to us
TinyMCE with Joomla - and have often resorted to holding the HTML want to create in a local editor & pasting it into the html view 9which due to space removal is otherwise utterly useless).
It's fine, i suppose, for novices editing text. It is unsuitable if the user is setting preference variables, searches (again, adding or deleting spaces and returns when it thinks suitable, or leaving html embedded in the search parameters).
I would like to leave it available in the
WYSIWYG edit button at the bottom of the screen, but I've been forced to disable it completely.
This patch only seems to work if the skin setting is in each topic - WHY?
--
ChrisHogan - 10 Jun 2008
My comments about the utility of
TinyMCE still stand, byt it helps if I haven't overridden the SKIN settings in the
WebPreferences - mea cupla
--
ChrisHogan - 10 Jun 2008
I have applied this fix and it seems to work, however...
Add a form to a topic & the raw edit is replaced by
TinyMCE which then proceeds to append my anchors onto the end of the preceding lines
Irritating, but once I save it & edit again, raw edit is restored, so it's only immediately after adding a form to a topic.
--
ChrisHogan - 12 Jun 2008
I will report this as a bug - if the
WysiwygPlugin? is enabled & action=form is set, then when creating a new topic the templatetopic (and therefore form) setting is not honoured. The new top is created without template or form
--
ChrisHogan - 20 Jun 2008