mirror of
https://github.com/codex-team/editor.js
synced 2024-06-29 10:50:23 +02:00
6a90784b69
* initial commit for feature * selection with cmd+a * copy to clipboard * use div instead of textarea * select and copy improvements * requested changes * update * improve styles * remove missclick * clear selection with escape and other keydowns except shift * copy to clipboard with cmd+a&cmd+c * restore selection after clearing block selection * update submodules * update * rename func name * rename getter selected * small naming changes * native selection fix * fix with appendCallback * add light animations to selection * move appendcallback to the toolbox insertnew function * upd styles * update * missed {} * last fixes * upgrade version
51 lines
809 B
CSS
51 lines
809 B
CSS
/**
|
|
* Editor wrapper
|
|
*/
|
|
.codex-editor {
|
|
position: relative;
|
|
box-sizing: border-box;
|
|
|
|
.hide {
|
|
display: none;
|
|
}
|
|
|
|
&__redactor {
|
|
padding-bottom: 300px;
|
|
}
|
|
|
|
&-copyable {
|
|
position: absolute;
|
|
height: 1px;
|
|
width: 1px;
|
|
top: -400%;
|
|
opacity: 0.001;
|
|
}
|
|
|
|
svg {
|
|
fill: currentColor;
|
|
vertical-align: middle;
|
|
max-height: 100%;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Set color for native selection
|
|
*/
|
|
::selection{
|
|
background-color: var(--selectionColor);
|
|
}
|
|
|
|
/**
|
|
* Add placeholder to content editable elements with data attribute
|
|
* data-placeholder="Hello world!"
|
|
*/
|
|
[contentEditable=true][data-placeholder]:empty::before{
|
|
content: attr(data-placeholder);
|
|
color: var(--grayText);
|
|
font-weight: normal;
|
|
}
|
|
|
|
[contentEditable=true][data-placeholder]:empty:focus::before {
|
|
opacity: 0.3;
|
|
}
|