Merge branch 'master' into toc

This commit is contained in:
Jori Lallo
2017-10-24 22:58:20 -07:00
committed by GitHub
9 changed files with 210 additions and 314 deletions

View File

@@ -82,6 +82,7 @@ type KeyData = {
};
handleDrop = async (ev: SyntheticEvent) => {
if (this.props.readOnly) return;
// check if this event was already handled by the Editor
if (ev.isDefaultPrevented()) return;
@@ -91,7 +92,9 @@ type KeyData = {
const files = getDataTransferFiles(ev);
for (const file of files) {
await this.insertImageFile(file);
if (file.type.startsWith('image/')) {
await this.insertImageFile(file);
}
}
};
@@ -245,22 +248,6 @@ const StyledEditor = styled(Editor)`
h5,
h6 {
font-weight: 500;
.anchor {
visibility: hidden;
color: #dedede;
padding-left: 0.25em;
}
&:hover {
.anchor {
visibility: visible;
&:hover {
color: #cdcdcd;
}
}
}
}
h1:first-of-type {