Skip to content

Commit

Permalink
refactor(tinymce): changed to npm introduction,fix #435,fix 434
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Mar 29, 2021
1 parent 37f6660 commit 39d629a
Show file tree
Hide file tree
Showing 40 changed files with 12,469 additions and 125 deletions.
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/dist/*
/public/*
public/*
2 changes: 2 additions & 0 deletions CHANGELOG.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
### ✨ Refactor

- 移除 useFullScreen 函数
- tinymce 由 Cdn 改为 npm(打包体积偏大)

### 🐛 Bug Fixes

- 确保面包屑正确的显示图标
- 修复 tinymce 上传按钮全屏模式下消失问题

## 2.1.1 (2021-03-26)

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"print-js": "^1.6.0",
"qrcode": "^1.4.4",
"sortablejs": "^1.13.0",
"tinymce": "^5.7.1",
"vditor": "^3.8.4",
"vue": "3.0.7",
"vue-i18n": "^9.0.0",
Expand Down Expand Up @@ -84,7 +85,7 @@
"dotenv": "^8.2.0",
"eslint": "^7.23.0",
"eslint-config-prettier": "^8.1.0",
"eslint-define-config": "^1.0.4",
"eslint-define-config": "^1.0.5",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-vue": "^7.8.0",
"esno": "^0.5.0",
Expand Down
57 changes: 57 additions & 0 deletions public/resource/tinymce/skins/content/default/content.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*/
body {
margin: 1rem;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
line-height: 1.4;
}

table {
border-collapse: collapse;
}

table th,
table td {
padding: 0.4rem;
border: 1px solid #ccc;
}

figure {
display: table;
margin: 1rem auto;
}

figure figcaption {
display: block;
margin-top: 0.25rem;
color: #999;
text-align: center;
}

hr {
border-color: #ccc;
border-style: solid;
border-width: 1px 0 0 0;
}

code {
padding: 0.1rem 0.2rem;
background-color: #e8e8e8;
border-radius: 3px;
}

.mce-content-body:not([dir=rtl]) blockquote {
padding-left: 1rem;
margin-left: 1.5rem;
border-left: 2px solid #ccc;
}

.mce-content-body[dir=rtl] blockquote {
padding-right: 1rem;
margin-right: 1.5rem;
border-right: 2px solid #ccc;
}
23 changes: 23 additions & 0 deletions public/resource/tinymce/skins/content/default/content.min.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*/
body{margin: 1rem;font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height: 1.4;}

table{border-collapse: collapse;}

table td,table th{padding: .4rem;border: 1px solid #ccc;}

figure{display: table;margin: 1rem auto;}

figure figcaption{display: block;margin-top: .25rem;color: #999;text-align: center;}

hr{border-color: #ccc;border-style: solid;border-width: 1px 0 0 0;}

code{padding: .1rem .2rem;background-color: #e8e8e8;border-radius: 3px;}

.mce-content-body:not([dir=rtl]) blockquote{padding-left: 1rem;margin-left: 1.5rem;border-left: 2px solid #ccc;}

.mce-content-body[dir=rtl] blockquote{padding-right: 1rem;margin-right: 1.5rem;border-right: 2px solid #ccc;}
60 changes: 60 additions & 0 deletions public/resource/tinymce/skins/content/document/content.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*/
@media screen {
html {
background: #f4f4f4;
}
}

body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
@media screen {
body {
max-width: 820px;
min-height: calc(100vh - 1rem);
padding: 4rem 6rem 6rem 6rem;
margin: 1rem auto 0;
background-color: #fff;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.15);
box-sizing: border-box;
}
}

table {
border-collapse: collapse;
}

table th,
table td {
padding: 0.4rem;
border: 1px solid #ccc;
}

figure figcaption {
margin-top: 0.25rem;
color: #999;
text-align: center;
}

hr {
border-color: #ccc;
border-style: solid;
border-width: 1px 0 0 0;
}

.mce-content-body:not([dir=rtl]) blockquote {
padding-left: 1rem;
margin-left: 1.5rem;
border-left: 2px solid #ccc;
}

.mce-content-body[dir=rtl] blockquote {
padding-right: 1rem;
margin-right: 1.5rem;
border-right: 2px solid #ccc;
}
21 changes: 21 additions & 0 deletions public/resource/tinymce/skins/content/document/content.min.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*/
@media screen{html{background: #f4f4f4;}}

body{font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;}@media screen{body{max-width: 820px;min-height: calc(100vh - 1rem);padding: 4rem 6rem 6rem 6rem;margin: 1rem auto 0;background-color: #fff;box-shadow: 0 0 4px rgba(0,0,0,.15);box-sizing: border-box;}}

table{border-collapse: collapse;}

table td,table th{padding: .4rem;border: 1px solid #ccc;}

figure figcaption{margin-top: .25rem;color: #999;text-align: center;}

hr{border-color: #ccc;border-style: solid;border-width: 1px 0 0 0;}

.mce-content-body:not([dir=rtl]) blockquote{padding-left: 1rem;margin-left: 1.5rem;border-left: 2px solid #ccc;}

.mce-content-body[dir=rtl] blockquote{padding-right: 1rem;margin-right: 1.5rem;border-right: 2px solid #ccc;}
58 changes: 58 additions & 0 deletions public/resource/tinymce/skins/content/writer/content.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*/
body {
max-width: 900px;
margin: 1rem auto;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
line-height: 1.4;
}

table {
border-collapse: collapse;
}

table th,
table td {
padding: 0.4rem;
border: 1px solid #ccc;
}

figure {
display: table;
margin: 1rem auto;
}

figure figcaption {
display: block;
margin-top: 0.25rem;
color: #999;
text-align: center;
}

hr {
border-color: #ccc;
border-style: solid;
border-width: 1px 0 0 0;
}

code {
padding: 0.1rem 0.2rem;
background-color: #e8e8e8;
border-radius: 3px;
}

.mce-content-body:not([dir=rtl]) blockquote {
padding-left: 1rem;
margin-left: 1.5rem;
border-left: 2px solid #ccc;
}

.mce-content-body[dir=rtl] blockquote {
padding-right: 1rem;
margin-right: 1.5rem;
border-right: 2px solid #ccc;
}
23 changes: 23 additions & 0 deletions public/resource/tinymce/skins/content/writer/content.min.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*/
body{max-width: 900px;margin: 1rem auto;font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height: 1.4;}

table{border-collapse: collapse;}

table td,table th{padding: .4rem;border: 1px solid #ccc;}

figure{display: table;margin: 1rem auto;}

figure figcaption{display: block;margin-top: .25rem;color: #999;text-align: center;}

hr{border-color: #ccc;border-style: solid;border-width: 1px 0 0 0;}

code{padding: .1rem .2rem;background-color: #e8e8e8;border-radius: 3px;}

.mce-content-body:not([dir=rtl]) blockquote{padding-left: 1rem;margin-left: 1.5rem;border-left: 2px solid #ccc;}

.mce-content-body[dir=rtl] blockquote{padding-right: 1rem;margin-right: 1.5rem;border-right: 2px solid #ccc;}
Loading

0 comments on commit 39d629a

Please sign in to comment.