Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commita63c380

Browse files
committed
chore(editor-js): style link-tool like zhihu
1 parentc9800b5 commita63c380

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

‎src/containers/RichEditor/logic.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ export const useInit = (_store, loaded) => {
5858
inlineCode:InlineCode,
5959
linkTool:{
6060
class:LinkTool,
61+
config:{
62+
endpoint:'http://localhost:4001/api/og-info',
63+
},
6164
},
6265
},
6366
data:{

‎src/containers/ThemeWrapper/RichEditorStyle.js‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,39 @@ import { theme } from '@utils'
77
// marker see: https://github.com/editor-js/marker
88

99
constRichEditorStyle=createGlobalStyle`
10+
// tmp
11+
.link-tool__input {
12+
border: 1px solid #e6e3e3;
13+
border-radius: 12px;
14+
}
15+
16+
.link-tool__content--rendered {
17+
border-radius: 15px;
18+
height: 120px;
19+
max-height: 140px;
20+
padding: 10px 20px;
21+
width: 65%;
22+
margin-left: 15%;
23+
min-height: 120px;
24+
max-height: 150px;
25+
padding: 12px 20px !important;
26+
background-color: hsla(0,0%,96.5%,.88) !important;
27+
}
28+
29+
.link-tool__title {
30+
margin: 0;
31+
text-overflow: ellipsis;
32+
white-space: nowrap;
33+
overflow: hidden;
34+
}
35+
36+
.link-tool__description {
37+
margin-bottom: 10px;
38+
text-overflow: ellipsis;
39+
white-space: nowrap;
40+
overflow: hidden;
41+
color: #c5c5c5;
42+
}
1043
1144
.cdx-quote__text {
1245
min-height: 0 !important;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp