Merge pull request #2082 from aviraldg/feature-rte-formatbar

Formatting toolbar for RTE message composer.
This commit is contained in:
Matthew Hodgson 2016-09-08 13:54:39 +01:00 committed by GitHub
commit 8860c9c7fd
29 changed files with 487 additions and 7 deletions

View file

@ -20,3 +20,20 @@
.mx_Markdown_ITALIC {
font-style: italic;
}
.mx_Markdown_CODE {
padding: .2em 0;
margin: 0;
font-size: 85%;
background-color: rgba(0,0,0,.04);
border-radius: 3px;
}
.mx_Markdown_HR {
display: block;
background: #e7e7e7;
}
.mx_Markdown_STRIKETHROUGH {
text-decoration: line-through;
}

View file

@ -57,20 +57,31 @@ limitations under the License.
.mx_MessageComposer_input {
flex: 1;
vertical-align: middle;
min-height: 60px;
max-height: 120px;
display: flex;
align-items: center;
overflow: auto;
flex-direction: column;
min-height: 60px;
justify-content: center;
align-items: flex-start;
font-size: 14px;
margin-right: 6px;
}
.mx_MessageComposer_input_rte {
border-top: 2px solid #76cfa6; /* placeholder RTE indicator */
.mx_MessageComposer_input_empty .public-DraftEditorPlaceholder-root {
display: none;
}
.mx_MessageComposer_input .DraftEditor-root {
width: 100%;
flex: 1;
max-height: 120px;
overflow: auto;
}
.mx_MessageComposer_input blockquote {
color: rgb(119, 119, 119);
margin: 0 0 16px;
padding: 0 15px;
border-left: 4px solid rgb(221, 221, 221);
}
.mx_MessageComposer_input textarea {
@ -88,7 +99,8 @@ limitations under the License.
color: #454545;
background-color: #fff;
font-size: 14px;
max-height: 120px;
overflow: auto;
/* needed for FF */
font-family: 'Open Sans', Arial, Helvetica, Sans-Serif;
}
@ -122,3 +134,59 @@ limitations under the License.
pointer-events: none;
}
.mx_MessageComposer_formatting {
cursor: pointer;
margin: 0 11px;
}
.mx_MessageComposer_formatbar_wrapper {
width: 100%;
background-color: #f7f7f7;
box-shadow: inset 0 1px 0 0 rgba(0, 0, 0, 0.08);
}
.mx_MessageComposer_formatbar {
margin: auto;
max-width: 960px;
display: flex;
height: 30px;
box-sizing: border-box;
padding-left: 62px;
flex-direction: row;
align-items: center;
font-size: 10px;
color: #888;
}
.mx_MessageComposer_formatbar * {
margin-right: 4px;
}
.mx_MessageComposer_format_button,
.mx_MessageComposer_formatbar_cancel,
.mx_MessageComposer_formatbar_markdown {
cursor: pointer;
}
.mx_MessageComposer_format_button_disabled {
cursor: not-allowed;
opacity: 0.5;
}
.mx_MessageComposer_formatbar_cancel {
margin-right: 22px;
}
.mx_MessageComposer_formatbar_markdown {
margin-right: 64px;
}
.mx_MessageComposer_input_markdownIndicator {
cursor: pointer;
height: 10px;
padding: 4px 4px 4px 0;
opacity: 0.8;
}