From bfe89fcdeff54d435ba167c0b39db4739eb13ce3 Mon Sep 17 00:00:00 2001 From: augushong Date: Sat, 4 Oct 2025 10:37:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E8=A1=8C=E5=86=85?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view/admin/post/output.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/view/admin/post/output.html b/view/admin/post/output.html index 257bc2c..8b0c3f9 100644 --- a/view/admin/post/output.html +++ b/view/admin/post/output.html @@ -289,6 +289,7 @@ $('.build-inlin-style').click(function () { $('#post-content').find('p').each(function (index, elem) { $(elem).css('margin-bottom', '18px'); + $(elem).css('line-height', '1.8'); }); $('#post-content').find('h1,h2,h3,h4,h5,h6').each(function (index, elem) { @@ -306,12 +307,31 @@ $(elem).css('font-weight', 'bold'); $(elem).css('margin-top', '18px'); $(elem).css('margin-bottom', '8px'); + }); // ul,ol $('#post-content').find('ul,ol').each(function (index, elem) { $(elem).css('margin-bottom', '18px'); }); + + // 代码code + $('#post-content').find('pre').each(function (index, elem) { + $(elem).css('margin-bottom', '8px'); + $(elem).css('font-size', '14px'); + $(elem).css('padding', '2px 5px'); + $(elem).css('background-color', '#f5f5f5'); + $(elem).css('border', '1px solid #ddd'); + $(elem).css('border-radius', '2px'); + $(elem).css('color', '#333'); + $(elem).css('margin-right', '8px'); + $(elem).css('margin-left', '8px'); + $(elem).css('white-space', 'pre-wrap'); + $(elem).css('word-break', 'break-all'); + $(elem).css('overflow-x', 'auto'); + $(elem).css('tab-size', '4'); + + }); }); function copyContent(id) {