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
|
@ -16,5 +16,5 @@ using System.Reflection;
|
|||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("3.0.1.448")]
|
||||
[assembly: AssemblyFileVersion("3.0.1.448")]
|
||||
[assembly: AssemblyVersion("3.0.1.449")]
|
||||
[assembly: AssemblyFileVersion("3.0.1.449")]
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -267,18 +267,11 @@ namespace ScrewTurn.Wiki {
|
|||
/// <param name="content">The content.</param>
|
||||
/// <param name="useVisual"><c>true</c> if the visual editor must be used, <c>false</c> otherwise.</param>
|
||||
public void SetContent(string content, bool useVisual) {
|
||||
inWYSIWYG = useVisual;
|
||||
lblWYSIWYG.Text = "";
|
||||
txtMarkup.Text = content;
|
||||
if(useVisual) btnVisual_Click(this, null);
|
||||
else btnWikiMarkup_Click(this, null);
|
||||
/*if(useVisual) {
|
||||
txtMarkup.Text = content;
|
||||
lblWYSIWYG.Text = content;
|
||||
SelectTab(1);
|
||||
}
|
||||
else {
|
||||
txtMarkup.Text = content;
|
||||
SelectTab(0);
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue