Skip to content

Commit 048e89c

Browse files
1.增加Microsoft JhengHei字体,2.增加跨域选择图片的accept限制,3.修复插入高亮代码时,不插入空行的bug
1 parent ec9d7e4 commit 048e89c

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎dist/js/wangEditor-1.3.12.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ $.extend($E, {
230230
'styleConfig': {
231231
'fontFamilyOptions': [
232232
'宋体', '黑体', '楷体', '隶书', '幼圆', '微软雅黑',
233-
'Arial', 'Verdana', 'Georgia', 'Times New Roman',
233+
'Arial', 'Verdana', 'Georgia', 'Times New Roman', 'Microsoft JhengHei',
234234
'Trebuchet MS', 'Courier New', 'Impact', 'Comic Sans MS'
235235
],
236236
'colorOptions': {
@@ -323,7 +323,7 @@ $.extend($E, {
323323
//代码块
324324
'codePre': '<pre style="border:1px solid #ccc; background-color: #f5f5f5; padding: 10px; margin: 5px 0px; line-height: 1.4; font-size: 0.8em; font-family: Menlo, Monaco, Consolas; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px;"><code>{content}</code></pre><p><br></p>',
325325
//代码块(highlight插件)
326-
'codePreWidthHightLight': '<pre><code class="{lang}">{content}</code></pre>'
326+
'codePreWidthHightLight': '<pre><code class="{lang}">{content}</code></pre><p><br></p>'
327327
},
328328

329329
//表情配置(1.gif, 2.gif, 3.gif ... 100.gif)
@@ -362,7 +362,7 @@ $.extend($E, {
362362
langUpload = langConfig.common.upload;
363363

364364
var content = '<form id="' + formId + '" method="post" enctype="multipart/form-data" target="' + iframeId + '">'+
365-
' <p>' +langChoose+ ':<input type="file" name="' + fileInputName + '" id="' + fileId + '"/></p>' +
365+
' <p>' +langChoose+ ':<input type="file" accept="image/*" name="' + fileInputName + '" id="' + fileId + '"/></p>' +
366366
' <p>' +langTitle+ ':<input type="text" id="' + titleTxtId + '" style="width:250px;"/></p>' +
367367
' <p><button id="' + btnId + '" type="button" class="wangEditor-modal-btn">' +langUpload+ '</button></p>' +
368368
' <span stype="color:red;" id="' + infoId + '"></span>' +

‎dist/js/wangEditor-1.3.12.min.js‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/js/parts/05-basic-config.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ $.extend($E, {
44
'styleConfig': {
55
'fontFamilyOptions': [
66
'宋体', '黑体', '楷体', '隶书', '幼圆', '微软雅黑',
7-
'Arial', 'Verdana', 'Georgia', 'Times New Roman',
7+
'Arial', 'Verdana', 'Georgia', 'Times New Roman', 'Microsoft JhengHei',
88
'Trebuchet MS', 'Courier New', 'Impact', 'Comic Sans MS'
99
],
1010
'colorOptions': {
@@ -97,7 +97,7 @@ $.extend($E, {
9797
//代码块
9898
'codePre': '<pre style="border:1px solid #ccc; background-color: #f5f5f5; padding: 10px; margin: 5px 0px; line-height: 1.4; font-size: 0.8em; font-family: Menlo, Monaco, Consolas; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px;"><code>{content}</code></pre><p><br></p>',
9999
//代码块(highlight插件)
100-
'codePreWidthHightLight': '<pre><code class="{lang}">{content}</code></pre>'
100+
'codePreWidthHightLight': '<pre><code class="{lang}">{content}</code></pre><p><br></p>'
101101
},
102102

103103
//表情配置(1.gif, 2.gif, 3.gif ... 100.gif)

‎src/js/parts/051-get-uploadImgComponent-for-cross-domain.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ $.extend($E, {
2727
langUpload = langConfig.common.upload;
2828

2929
var content = '<form id="' + formId + '" method="post" enctype="multipart/form-data" target="' + iframeId + '">'+
30-
' <p>' +langChoose+ ':<input type="file" name="' + fileInputName + '" id="' + fileId + '"/></p>' +
30+
' <p>' +langChoose+ ':<input type="file" accept="image/*" name="' + fileInputName + '" id="' + fileId + '"/></p>' +
3131
' <p>' +langTitle+ ':<input type="text" id="' + titleTxtId + '" style="width:250px;"/></p>' +
3232
' <p><button id="' + btnId + '" type="button" class="wangEditor-modal-btn">' +langUpload+ '</button></p>' +
3333
' <span stype="color:red;" id="' + infoId + '"></span>' +

‎src/js/wangEditor-1.3.12.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ $.extend($E, {
230230
'styleConfig': {
231231
'fontFamilyOptions': [
232232
'宋体', '黑体', '楷体', '隶书', '幼圆', '微软雅黑',
233-
'Arial', 'Verdana', 'Georgia', 'Times New Roman',
233+
'Arial', 'Verdana', 'Georgia', 'Times New Roman', 'Microsoft JhengHei',
234234
'Trebuchet MS', 'Courier New', 'Impact', 'Comic Sans MS'
235235
],
236236
'colorOptions': {
@@ -323,7 +323,7 @@ $.extend($E, {
323323
//代码块
324324
'codePre': '<pre style="border:1px solid #ccc; background-color: #f5f5f5; padding: 10px; margin: 5px 0px; line-height: 1.4; font-size: 0.8em; font-family: Menlo, Monaco, Consolas; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px;"><code>{content}</code></pre><p><br></p>',
325325
//代码块(highlight插件)
326-
'codePreWidthHightLight': '<pre><code class="{lang}">{content}</code></pre>'
326+
'codePreWidthHightLight': '<pre><code class="{lang}">{content}</code></pre><p><br></p>'
327327
},
328328

329329
//表情配置(1.gif, 2.gif, 3.gif ... 100.gif)
@@ -362,7 +362,7 @@ $.extend($E, {
362362
langUpload = langConfig.common.upload;
363363

364364
var content = '<form id="' + formId + '" method="post" enctype="multipart/form-data" target="' + iframeId + '">'+
365-
' <p>' +langChoose+ ':<input type="file" name="' + fileInputName + '" id="' + fileId + '"/></p>' +
365+
' <p>' +langChoose+ ':<input type="file" accept="image/*" name="' + fileInputName + '" id="' + fileId + '"/></p>' +
366366
' <p>' +langTitle+ ':<input type="text" id="' + titleTxtId + '" style="width:250px;"/></p>' +
367367
' <p><button id="' + btnId + '" type="button" class="wangEditor-modal-btn">' +langUpload+ '</button></p>' +
368368
' <span stype="color:red;" id="' + infoId + '"></span>' +

0 commit comments

Comments
 (0)