Not sure why PlainTextEditor was not advertising support for PlainTextObjectModel

This commit is contained in:
Michael Becker 2019-08-03 15:04:02 -04:00
parent 7d2c1a049c
commit c4ce7fc6cd

View File

@ -46,12 +46,22 @@ namespace UniversalEditor.Editors.Text.Plain
throw new NotImplementedException();
}
private TextBox txt = null;
private SyntaxTextBox txt = null;
private static EditorReference _er = null;
public override EditorReference MakeReference ()
{
if (_er == null) {
_er = base.MakeReference ();
_er.SupportedObjectModels.Add (typeof (PlainTextObjectModel));
}
return _er;
}
public PlainTextEditor ()
{
txt = new TextBox();
txt.Multiline = true;
txt = new SyntaxTextBox();
// txt.Multiline = true;
this.Layout = new BoxLayout(Orientation.Vertical);
this.Controls.Add(txt, new BoxLayout.Constraints(true, true));