Newer
Older
labs / tiddlers / system / macros / $__ou_macros_system_EditMode.tid
tags: $:/tags/Macro
title: $:/ou/macros/system/EditMode
type: text/vnd.tiddlywiki

\define editMode()
<$fieldmangler  tiddler="$:/core/ui/SideBar/More">
<$action-sendmessage $message="tm-add-tag" $param="$:/tags/SideBar"/>
</$fieldmangler>
<$action-setfield $tiddler="$:/config/PageControlButtons/Visibility/$:/plugins/tiddlywiki/markdown/new-markdown-button" text="show"/>
<$action-setfield $tiddler="$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/edit" text="show"/>
<$action-setfield $tiddler="$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/more-tiddler-actions" text="show"/>
<$action-setfield $tiddler="$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/info" text="show"/>
\end

\define publishMode()
<$fieldmangler  tiddler="$:/core/ui/SideBar/More">
<$action-sendmessage $message="tm-remove-tag" $param="$:/tags/SideBar"/>
</$fieldmangler>
<$action-setfield $tiddler="$:/config/PageControlButtons/Visibility/$:/plugins/tiddlywiki/markdown/new-markdown-button" text="hide"/>
<$action-setfield $tiddler="$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/edit" text="hide"/>
<$action-setfield $tiddler="$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/more-tiddler-actions" text="hide"/>
<$action-setfield $tiddler="$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/info" text="hide"/>
\end