Versiyon 2

This commit is contained in:
hOLOlu
2025-09-08 00:47:15 +03:00
parent e40cc33643
commit 150b68e44c
26 changed files with 222 additions and 41 deletions

View File

@@ -9,6 +9,9 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static System.Net.Mime.MediaTypeNames;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Tab;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TrayNotify;
namespace hMarkdown
@@ -33,12 +36,27 @@ namespace hMarkdown
string contents = File.ReadAllText(@tbDosya.Text);
var result = Markdown.ToHtml(contents);
var bas= @"<html><style type = ""text/css"">
.markdown-body {
color-scheme: light;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
margin: 0;
color: #1f2328;
background-color: #fff;
font-family: -apple-system, Threbucet, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Tahoma, Verdana, Arial, sans-serif, ""Apple Color Emoji"", ""Segoe UI Emoji"";
font-size: 16px;
line-height: 1.5;
word-wrap: break-word;}
</style><body> <div id = ""output"" class=""markdown-body"">";
webBrowser.DocumentText = result;
webBrowser.Document.Body.Style = "font-family: Tahoma, Threbucet, Verdana; font-size: large;";
webBrowser.Document.ExecCommand("SelectAll", false, "null");
webBrowser.Document.ExecCommand("font-family", false, "Tahoma");
webBrowser.Document.ExecCommand("Unselect", false, "null");
result = bas + result + "</div></body></html>";
webBrowser.DocumentText = result;
//webBrowser.Document.Body.Style.font = "font-family: Tahoma, Threbucet, Verdana; font-size: large;";
//webBrowser.Document.ExecCommand("SelectAll", false, "null");
//webBrowser.Document.ExecCommand("font-family", false, "Tahoma");
//webBrowser.Document.ExecCommand("Unselect", false, "null");
}
}