Fixed #441: editor now properly handles WikiMarkup-only content.
This commit is contained in:
parent
3a4eeaf51e
commit
2ad2497530
3 changed files with 11 additions and 23 deletions
|
@ -59,19 +59,14 @@ namespace ScrewTurn.Wiki {
|
|||
|
||||
MetaDataItem item = ButtonMetaDataItemMapping[senderControl.ID];
|
||||
|
||||
string content = Settings.Provider.GetMetaDataItem(item, lstNamespace.SelectedValue);
|
||||
editor.SetContent(content, Settings.UseVisualEditorAsDefault);
|
||||
bool markupOnly = WikiMarkupOnlyItems.Contains(item);
|
||||
|
||||
if(WikiMarkupOnlyItems.Contains(item)) {
|
||||
editor.VisualVisible = false;
|
||||
editor.PreviewVisible = false;
|
||||
editor.ToolbarVisible = false;
|
||||
}
|
||||
else {
|
||||
editor.VisualVisible = true;
|
||||
editor.PreviewVisible = true;
|
||||
editor.ToolbarVisible = true;
|
||||
}
|
||||
string content = Settings.Provider.GetMetaDataItem(item, lstNamespace.SelectedValue);
|
||||
editor.SetContent(content, !markupOnly && Settings.UseVisualEditorAsDefault);
|
||||
|
||||
editor.VisualVisible = !markupOnly;
|
||||
editor.PreviewVisible = !markupOnly;
|
||||
editor.ToolbarVisible = !markupOnly;
|
||||
|
||||
pnlList.Visible = false;
|
||||
pnlEditor.Visible = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue