Skip to content

Commit 9b8eb93

Browse files
GongJSvanoneang
authored andcommitted
feat:富文本 Tinymce (#202)
1 parent 5b24173 commit 9b8eb93

36 files changed

+9578
-2
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
},
1515
"dependencies": {
1616
"@babel/polyfill": "^7.2.5",
17+
"@tinymce/tinymce-vue": "^2.1.0",
1718
"axios": "~0.18.0",
1819
"element-ui": "^2.8.2",
1920
"event-source-polyfill": "^0.0.16",
@@ -24,6 +25,7 @@
2425
"moment": "^2.24.0",
2526
"photoswipe": "^4.1.2",
2627
"screenfull": "^4.2.0",
28+
"tinymce": "^5.0.9",
2729
"vue": "^2.6.8",
2830
"vue-awesome-swiper": "^3.1.3",
2931
"vue-croppa": "^1.3.8",

public/tinymce/langs/zh_CN.js

Lines changed: 389 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/**
2+
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
3+
* Licensed under the LGPL or a commercial license.
4+
* For LGPL see License.txt in the project root for license information.
5+
* For commercial licenses see https://www.tiny.cloud/
6+
*/
7+
body {
8+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
9+
line-height: 1.4;
10+
margin: 1rem;
11+
}
12+
table {
13+
border-collapse: collapse;
14+
}
15+
table th,
16+
table td {
17+
border: 1px solid #ccc;
18+
padding: 0.4rem;
19+
}
20+
figure {
21+
display: table;
22+
margin: 1rem auto;
23+
}
24+
figure figcaption {
25+
color: #999;
26+
display: block;
27+
margin-top: 0.25rem;
28+
text-align: center;
29+
}
30+
hr {
31+
border-color: #ccc;
32+
border-style: solid;
33+
border-width: 1px 0 0 0;
34+
}
35+
code {
36+
background-color: #e8e8e8;
37+
border-radius: 3px;
38+
padding: 0.1rem 0.2rem;
39+
}
40+
.mce-content-body:not([dir=rtl]) blockquote {
41+
border-left: 2px solid #ccc;
42+
margin-left: 1.5rem;
43+
padding-left: 1rem;
44+
}
45+
.mce-content-body[dir=rtl] blockquote {
46+
border-right: 2px solid #ccc;
47+
margin-right: 1.5rem;
48+
padding-right: 1rem;
49+
}

public/tinymce/skins/content/default/content.min.css

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/**
2+
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
3+
* Licensed under the LGPL or a commercial license.
4+
* For LGPL see License.txt in the project root for license information.
5+
* For commercial licenses see https://www.tiny.cloud/
6+
*/
7+
@media screen {
8+
html {
9+
background: #f4f4f4;
10+
}
11+
}
12+
body {
13+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
14+
}
15+
@media screen {
16+
body {
17+
background-color: #fff;
18+
box-shadow: 0 0 4px rgba(0, 0, 0, 0.15);
19+
box-sizing: border-box;
20+
margin: 1rem auto 0;
21+
max-width: 820px;
22+
min-height: calc(100vh - 1rem);
23+
padding: 4rem 6rem 6rem 6rem;
24+
}
25+
}
26+
table {
27+
border-collapse: collapse;
28+
}
29+
table th,
30+
table td {
31+
border: 1px solid #ccc;
32+
padding: 0.4rem;
33+
}
34+
figure figcaption {
35+
color: #999;
36+
margin-top: 0.25rem;
37+
text-align: center;
38+
}
39+
hr {
40+
border-color: #ccc;
41+
border-style: solid;
42+
border-width: 1px 0 0 0;
43+
}
44+
.mce-content-body:not([dir=rtl]) blockquote {
45+
border-left: 2px solid #ccc;
46+
margin-left: 1.5rem;
47+
padding-left: 1rem;
48+
}
49+
.mce-content-body[dir=rtl] blockquote {
50+
border-right: 2px solid #ccc;
51+
margin-right: 1.5rem;
52+
padding-right: 1rem;
53+
}

public/tinymce/skins/content/document/content.min.css

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/**
2+
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
3+
* Licensed under the LGPL or a commercial license.
4+
* For LGPL see License.txt in the project root for license information.
5+
* For commercial licenses see https://www.tiny.cloud/
6+
*/
7+
body {
8+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
9+
line-height: 1.4;
10+
margin: 1rem auto;
11+
max-width: 900px;
12+
}
13+
table {
14+
border-collapse: collapse;
15+
}
16+
table th,
17+
table td {
18+
border: 1px solid #ccc;
19+
padding: 0.4rem;
20+
}
21+
figure {
22+
display: table;
23+
margin: 1rem auto;
24+
}
25+
figure figcaption {
26+
color: #999;
27+
display: block;
28+
margin-top: 0.25rem;
29+
text-align: center;
30+
}
31+
hr {
32+
border-color: #ccc;
33+
border-style: solid;
34+
border-width: 1px 0 0 0;
35+
}
36+
code {
37+
background-color: #e8e8e8;
38+
border-radius: 3px;
39+
padding: 0.1rem 0.2rem;
40+
}
41+
.mce-content-body:not([dir=rtl]) blockquote {
42+
border-left: 2px solid #ccc;
43+
margin-left: 1.5rem;
44+
padding-left: 1rem;
45+
}
46+
.mce-content-body[dir=rtl] blockquote {
47+
border-right: 2px solid #ccc;
48+
margin-right: 1.5rem;
49+
padding-right: 1rem;
50+
}

public/tinymce/skins/content/writer/content.min.css

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

0 commit comments

Comments
 (0)