Skip to content

Commit e507339

Browse files
authored
Merge pull request element-hq#1553 from aviraldg/feature-rte
Rich Text Editor
2 parents a5986ad + ab1f37b commit e507339

4 files changed

Lines changed: 44 additions & 10 deletions

File tree

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"babel-polyfill": "^6.5.0",
3636
"browser-request": "^0.3.3",
3737
"classnames": "^2.1.2",
38+
"draft-js": "^0.7.0",
3839
"extract-text-webpack-plugin": "^0.9.1",
3940
"filesize": "^3.1.2",
4041
"flux": "~2.0.3",
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.mx_UserPill {
2+
color: white;
3+
background-color: #76cfa6;
4+
padding: 2px 8px;
5+
border-radius: 16px;
6+
}
7+
8+
.mx_RoomPill {
9+
background-color: white;
10+
color: #76cfa6;
11+
border: 1px solid #76cfa6;
12+
padding: 2px 8px;
13+
border-radius: 16px;
14+
}
15+
16+
.mx_Markdown_BOLD {
17+
font-weight: bold;
18+
}
19+
20+
.mx_Markdown_ITALIC {
21+
font-style: italic;
22+
}

‎src/skins/vector/css/matrix-react-sdk/views/rooms/MessageComposer.css‎

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ limitations under the License.
2222
}
2323

2424
.mx_MessageComposer_row {
25-
display: table-row;
25+
display: flex;
26+
flex-direction: row;
27+
align-items: center;
2628
width: 100%;
2729
}
2830

2931
.mx_MessageComposer .mx_MessageComposer_avatar {
30-
display: table-cell;
3132
padding-left: 10px;
3233
padding-right: 28px;
33-
vertical-align: middle;
3434
}
3535

3636
.mx_MessageComposer .mx_MessageComposer_avatar .mx_BaseAvatar {
@@ -42,20 +42,30 @@ limitations under the License.
4242
}
4343

4444
.mx_MessageComposer_noperm_error {
45-
display: table-cell;
4645
width: 100%;
47-
vertical-align: middle;
4846
height: 60px;
4947
text-align: center;
5048
font-style: italic;
5149
color: #888;
5250
}
5351

5452
.mx_MessageComposer_input {
55-
display: table-cell;
56-
width: 100%;
53+
flex: 1;
5754
vertical-align: middle;
58-
height: 60px;
55+
min-height: 60px;
56+
max-height: 120px;
57+
display: flex;
58+
align-items: center;
59+
overflow: auto;
60+
transition: 0.6s border-top ease;
61+
border-top: 2px solid rgba(255, 255, 255, 0);
62+
}
63+
.mx_MessageComposer_input_rte {
64+
border-top: 2px solid #76cfa6; /* placeholder RTE indicator */
65+
}
66+
67+
.mx_MessageComposer_input .DraftEditor-root {
68+
flex: 1;
5969
}
6070

6171
.mx_MessageComposer_input textarea {
@@ -92,8 +102,8 @@ limitations under the License.
92102
.mx_MessageComposer_hangup,
93103
.mx_MessageComposer_voicecall,
94104
.mx_MessageComposer_videocall {
95-
display: table-cell;
96-
vertical-align: middle;
105+
/*display: table-cell;*/
106+
/*vertical-align: middle;*/
97107
padding-left: 10px;
98108
padding-right: 10px;
99109
cursor: pointer;

‎src/vector/index.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ require('../../vector/components.css');
2626
require('gemini-scrollbar/gemini-scrollbar.css');
2727
require('gfm.css/gfm.css');
2828
require('highlight.js/styles/github.css');
29+
require('draft-js/dist/Draft.css');
2930

3031

3132
// add React and ReactPerf to the global namespace, to make them easier to

0 commit comments

Comments
 (0)