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
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("3.0.1.448")]
|
[assembly: AssemblyVersion("3.0.1.449")]
|
||||||
[assembly: AssemblyFileVersion("3.0.1.448")]
|
[assembly: AssemblyFileVersion("3.0.1.449")]
|
||||||
|
|
|
@ -59,19 +59,14 @@ namespace ScrewTurn.Wiki {
|
||||||
|
|
||||||
MetaDataItem item = ButtonMetaDataItemMapping[senderControl.ID];
|
MetaDataItem item = ButtonMetaDataItemMapping[senderControl.ID];
|
||||||
|
|
||||||
string content = Settings.Provider.GetMetaDataItem(item, lstNamespace.SelectedValue);
|
bool markupOnly = WikiMarkupOnlyItems.Contains(item);
|
||||||
editor.SetContent(content, Settings.UseVisualEditorAsDefault);
|
|
||||||
|
|
||||||
if(WikiMarkupOnlyItems.Contains(item)) {
|
string content = Settings.Provider.GetMetaDataItem(item, lstNamespace.SelectedValue);
|
||||||
editor.VisualVisible = false;
|
editor.SetContent(content, !markupOnly && Settings.UseVisualEditorAsDefault);
|
||||||
editor.PreviewVisible = false;
|
|
||||||
editor.ToolbarVisible = false;
|
editor.VisualVisible = !markupOnly;
|
||||||
}
|
editor.PreviewVisible = !markupOnly;
|
||||||
else {
|
editor.ToolbarVisible = !markupOnly;
|
||||||
editor.VisualVisible = true;
|
|
||||||
editor.PreviewVisible = true;
|
|
||||||
editor.ToolbarVisible = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
pnlList.Visible = false;
|
pnlList.Visible = false;
|
||||||
pnlEditor.Visible = true;
|
pnlEditor.Visible = true;
|
||||||
|
|
|
@ -267,18 +267,11 @@ namespace ScrewTurn.Wiki {
|
||||||
/// <param name="content">The content.</param>
|
/// <param name="content">The content.</param>
|
||||||
/// <param name="useVisual"><c>true</c> if the visual editor must be used, <c>false</c> otherwise.</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) {
|
public void SetContent(string content, bool useVisual) {
|
||||||
|
inWYSIWYG = useVisual;
|
||||||
|
lblWYSIWYG.Text = "";
|
||||||
txtMarkup.Text = content;
|
txtMarkup.Text = content;
|
||||||
if(useVisual) btnVisual_Click(this, null);
|
if(useVisual) btnVisual_Click(this, null);
|
||||||
else btnWikiMarkup_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>
|
/// <summary>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue