Drag and drop images in the editor to import and insert (#5699)

* Merge

* Clean up

* More clean up

* Ensure image import works when type is not set, clean up post import actions

* Removed spurious new line

* For non image files insert a tiddler link

* Added documentation for new settings and features
This commit is contained in:
Saq Imtiaz
2021-05-19 21:52:43 +01:00
committed by GitHub
parent c7f6cedc43
commit 05d38054c8
19 changed files with 301 additions and 28 deletions
+52
View File
@@ -1550,6 +1550,58 @@ html body.tc-body.tc-single-tiddler-window {
width: 10%;
}
/*
** Tiddler editor dropzone
*/
.tc-dropzone-editor {
position:relative;
}
.tc-dropzone-editor.tc-dragover .tc-editor-toolbar::after{
z-index: 10000;
top:0;
left:0;
right:0;
height: 100%;
background: <<colour dropzone-background>>;
content: "<<lingo DropMessage>>";
pointer-events: none;
position: absolute;
display: flex;
align-items: center;
justify-content: center;
background-color: <<color background>>;
border: 4px dashed <<color modal-border>>;
font-weight: 600;
font-size: 150%;
opacity: 0.8;
color: <<color foreground>>;
}
.tc-editor-importpopup {
width: 100%;
height: 100%;
}
.tc-editor-import {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: <<color pre-background>>;
box-shadow: 2px 2px 10px <<colour foreground>>;
padding: 10px;
width: 96%;
border: 1px solid <<color tiddler-controls-foreground>>;
text-align:center;
}
.tc-editor-import img {
max-height: 500px;
}
/*
** Storyview Classes
*/