📄 htmleditor.cs
字号:
namespace Codematic
{
using LTP.TextEditor;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
public class HtmlEditor : Form
{
private IContainer components;
private TextEditorControl txtContent;
public HtmlEditor()
{
this.InitializeComponent();
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.components != null))
{
this.components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.txtContent = new TextEditorControl();
base.SuspendLayout();
this.txtContent.Dock = DockStyle.Fill;
this.txtContent.Location = new Point(0, 0);
this.txtContent.Name = "txtContent";
this.txtContent.Size = new Size(0x1c9, 0x18c);
this.txtContent.TabIndex = 0;
this.txtContent.Text = "";
this.txtContent.IsIconBarVisible = false;
this.txtContent.ShowInvalidLines = false;
this.txtContent.ShowSpaces = false;
this.txtContent.ShowTabs = false;
this.txtContent.ShowEOLMarkers = false;
this.txtContent.ShowVRuler = false;
this.txtContent.Language = TextEditorControlBase.Languages.HTML;
this.txtContent.Encoding = Encoding.Default;
this.txtContent.Font = new Font("新宋体", 9f);
base.AutoScaleDimensions = new SizeF(6f, 12f);
base.AutoScaleMode = AutoScaleMode.Font;
base.ClientSize = new Size(0x1c9, 0x18c);
base.Controls.Add(this.txtContent);
base.Name = "HtmlEditor";
this.Text = "HtmlEditor";
base.ResumeLayout(false);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -