urdu-web-editor
Version:
Urdu Rich Text Editor for web based on lexical
904 lines (777 loc) • 15.9 kB
CSS
.link-editor {
z-index: 10;
opacity: 0;
will-change: transform;
background-color: #fff;
border-radius: 0 0 8px 8px;
align-items: center;
width: 100%;
max-width: 400px;
transition: opacity .5s;
display: flex;
position: absolute;
top: 0;
left: 0;
box-shadow: 0 5px 10px #0000004d;
}
.link-editor-contents {
align-items: center;
width: 100%;
padding: 8px 12px;
display: flex;
}
.link-editor .button {
cursor: pointer;
border-radius: 8px;
width: 20px;
height: 20px;
margin: 0 2px;
padding: 6px;
display: inline-block;
}
.link-editor .button.hovered {
background-color: #eee;
width: 20px;
height: 20px;
display: inline-block;
}
.link-editor .button i, .actions i {
vertical-align: -.25em;
background-size: contain;
width: 20px;
height: 20px;
display: inline-block;
}
.link-editor .link-input {
box-sizing: border-box;
color: #050505;
background-color: #eee;
border: 0;
border-radius: 15px;
outline: 0;
width: calc(100% - 75px);
margin: 12px;
padding: 8px 12px;
font-family: inherit;
font-size: 15px;
display: block;
position: relative;
}
.link-editor .link-view {
color: #050505;
border: 0;
border-radius: 15px;
outline: 0;
width: calc(100% - 24px);
margin: 8px 12px;
padding: 8px 12px;
font-family: inherit;
font-size: 15px;
display: block;
position: relative;
}
.link-editor a {
word-break: break-word;
width: calc(100% - 33px);
margin: 8px 12px;
padding: 8px 12px;
}
.link-editor .link-input a {
color: #216fdb;
white-space: nowrap;
text-overflow: ellipsis;
margin-right: 30px;
text-decoration: underline;
overflow: hidden;
}
.link-editor .link-input a:hover {
text-decoration: underline;
}
.link-editor .font-size-wrapper, .link-editor .font-family-wrapper {
margin: 0 4px;
display: flex;
}
.link-editor select {
background-color: #00000013;
border: none;
border-radius: 4px;
padding: 6px;
}
.draggable-block-menu {
cursor: grab;
opacity: 0;
will-change: transform;
border-radius: 4px;
padding: 2px 1px;
position: absolute;
top: 0;
left: 0;
}
.rtl .draggable-block-menu {
left: auto;
right: 0;
}
.draggable-block-menu .icon {
opacity: .3;
background-image: url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" data-name=\"Layer 1\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path stroke=\"currentColor\" d=\"M8.5 10a2 2 0 1 0 2 2 2 2 0 0 0-2-2Zm0 7a2 2 0 1 0 2 2 2 2 0 0 0-2-2Zm7-10a2 2 0 1 0-2-2 2 2 0 0 0 2 2Zm-7-4a2 2 0 1 0 2 2 2 2 0 0 0-2-2Zm7 14a2 2 0 1 0 2 2 2 2 0 0 0-2-2Zm0-7a2 2 0 1 0 2 2 2 2 0 0 0-2-2Z\"/><script xmlns=\"\" id=\"bw-fido2-page-script\"/></svg>");
width: 16px;
height: 16px;
}
.draggable-block-menu:active {
cursor: grabbing;
}
.draggable-block-menu:hover {
background-color: #efefef;
}
.draggable-block-target-line {
pointer-events: none;
opacity: 0;
will-change: transform;
background: #00bfff;
height: 4px;
position: absolute;
top: 0;
left: 0;
}
.rtl .draggable-block-target-line {
left: auto;
right: 0;
}
.floating-text-format-popup {
vertical-align: middle;
z-index: 10;
opacity: 0;
will-change: transform;
background: #fff;
border-radius: 8px;
height: 25px;
padding: 4px;
transition: opacity .5s;
display: flex;
position: absolute;
top: 0;
left: 0;
box-shadow: 0 5px 10px #0000004d;
}
.floating-text-format-popup button.popup-item {
cursor: pointer;
vertical-align: middle;
background: none;
border: 0;
border-radius: 10px;
padding: 8px;
display: flex;
}
.floating-text-format-popup button.popup-item:disabled {
cursor: not-allowed;
}
.floating-text-format-popup button.popup-item.spaced {
margin-right: 2px;
}
.floating-text-format-popup button.popup-item i.format {
vertical-align: -.25em;
opacity: .6;
background-size: contain;
width: 18px;
height: 18px;
margin-top: 2px;
display: flex;
}
.floating-text-format-popup button.popup-item:disabled i.format {
opacity: .2;
}
.floating-text-format-popup button.popup-item.active {
background-color: #dfe8fa4d;
}
.floating-text-format-popup button.popup-item.active i {
opacity: 1;
}
.floating-text-format-popup .popup-item:hover:not([disabled]) {
background-color: #eee;
}
.floating-text-format-popup select.popup-item {
vertical-align: middle;
-webkit-appearance: none;
-moz-appearance: none;
color: #777;
text-overflow: ellipsis;
background: none;
border: 0;
border-radius: 10px;
width: 70px;
padding: 8px;
font-size: 14px;
display: flex;
}
.floating-text-format-popup select.code-language {
text-transform: capitalize;
width: 130px;
}
.floating-text-format-popup .popup-item .text {
vertical-align: middle;
color: #777;
text-overflow: ellipsis;
text-align: left;
width: 70px;
height: 20px;
font-size: 14px;
line-height: 20px;
display: flex;
overflow: hidden;
}
.floating-text-format-popup .popup-item .icon {
-webkit-user-select: none;
user-select: none;
background-size: contain;
width: 20px;
height: 20px;
margin-right: 8px;
line-height: 16px;
display: flex;
}
.floating-text-format-popup i.chevron-down {
-webkit-user-select: none;
user-select: none;
width: 16px;
height: 16px;
margin-top: 3px;
display: flex;
}
.floating-text-format-popup i.chevron-down.inside {
pointer-events: none;
width: 16px;
height: 16px;
margin-top: 11px;
margin-left: -25px;
margin-right: 10px;
display: flex;
}
.floating-text-format-popup .divider {
background-color: #eee;
width: 1px;
margin: 0 4px;
}
@media (width <= 1024px) {
.floating-text-format-popup button.insert-comment {
display: none;
}
}
.editorTheme__ltr {
text-align: left;
}
.editorTheme__rtl {
text-align: right;
}
.editorTheme__paragraph {
margin: 0;
position: relative;
}
.editorTheme__quote {
color: #65676b;
border-left: 4px solid #ced0d4;
margin: 0 0 10px 20px;
padding-left: 16px;
font-size: 15px;
}
.editorTheme__h1 {
color: #050505;
margin: 0;
font-size: 24px;
font-weight: 400;
}
.editorTheme__h2 {
color: #65676b;
text-transform: uppercase;
margin: 0;
font-size: 15px;
font-weight: 700;
}
.editorTheme__h3 {
text-transform: uppercase;
margin: 0;
font-size: 12px;
}
.editorTheme__indent {
--lexical-indent-base-value: 40px;
}
.editorTheme__textBold {
font-weight: bold;
}
.editorTheme__textItalic {
font-style: italic;
}
.editorTheme__textUnderline {
text-decoration: underline;
}
.editorTheme__textStrikethrough {
text-decoration: line-through;
}
.editorTheme__textUnderlineStrikethrough {
text-decoration: underline line-through;
}
.editorTheme__textSubscript {
font-size: .8em;
vertical-align: sub ;
}
.editorTheme__textSuperscript {
vertical-align: super;
font-size: .8em;
}
.editorTheme__textCode {
background-color: #f0f2f5;
padding: 1px .25rem;
font-family: Menlo, Consolas, Monaco, monospace;
font-size: 94%;
}
.editorTheme__hashtag {
background-color: #5890ff26;
border-bottom: 1px solid #5890ff4d;
}
.editorTheme__link {
color: #216fdb;
text-decoration: none;
}
.editorTheme__link:hover {
cursor: pointer;
text-decoration: underline;
}
.editorTheme__code {
tab-size: 2;
background-color: #f0f2f5;
margin: 8px 0;
padding: 8px 8px 8px 52px;
font-family: Menlo, Consolas, Monaco, monospace;
font-size: 13px;
line-height: 1.53;
display: block;
position: relative;
overflow-x: auto;
}
.editorTheme__code:before {
content: attr(data-gutter);
color: #777;
white-space: pre-wrap;
text-align: right;
background-color: #eee;
border-right: 1px solid #ccc;
min-width: 25px;
padding: 8px;
position: absolute;
top: 0;
left: 0;
}
.editorTheme__table {
border-collapse: collapse;
border-spacing: 0;
table-layout: fixed;
width: max-content;
margin: 30px 0;
overflow: scroll;
}
.editorTheme__tableSelection ::selection {
background-color: #0000;
}
.editorTheme__tableSelected {
outline: 2px solid #3c84f4;
}
.editorTheme__tableCell {
vertical-align: top;
text-align: start;
border: 1px solid #bbb;
outline: none;
width: 75px;
min-width: 75px;
padding: 6px 8px;
position: relative;
}
.editorTheme__tableCellSortedIndicator {
opacity: .5;
background-color: #999;
width: 100%;
height: 4px;
display: block;
position: absolute;
bottom: 0;
left: 0;
}
.editorTheme__tableCellResizer {
cursor: ew-resize;
z-index: 10;
width: 8px;
height: 100%;
position: absolute;
top: 0;
right: -4px;
}
.editorTheme__tableCellHeader {
text-align: start;
background-color: #f2f3f5;
}
.editorTheme__tableCellSelected {
background-color: #c9dbf0;
}
.editorTheme__tableCellPrimarySelected {
z-index: 2;
border: 2px solid #3c84f4;
width: calc(100% - 2px);
height: calc(100% - 2px);
display: block;
position: absolute;
top: -1px;
left: -1px;
}
.editorTheme__tableCellEditing {
border-radius: 3px;
box-shadow: 0 0 5px #0006;
}
.editorTheme__tableAddColumns {
cursor: pointer;
background-color: #eee;
border: 0;
width: 20px;
height: 100%;
animation: .2s table-controls;
position: absolute;
top: 0;
right: 0;
}
.editorTheme__tableAddColumns:after {
content: " ";
opacity: .4;
background-position: center;
background-repeat: no-repeat;
background-size: contain;
width: 100%;
height: 100%;
display: block;
position: absolute;
top: 0;
left: 0;
}
.editorTheme__tableAddColumns:hover {
background-color: #c9dbf0;
}
.editorTheme__tableAddRows {
cursor: pointer;
background-color: #eee;
border: 0;
width: calc(100% - 25px);
height: 20px;
animation: .2s table-controls;
position: absolute;
bottom: -25px;
left: 0;
}
.editorTheme__tableAddRows:after {
content: " ";
opacity: .4;
background-position: center;
background-repeat: no-repeat;
background-size: contain;
width: 100%;
height: 100%;
display: block;
position: absolute;
top: 0;
left: 0;
}
.editorTheme__tableAddRows:hover {
background-color: #c9dbf0;
}
@keyframes table-controls {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.editorTheme__tableCellResizeRuler {
background-color: #3c84f4;
width: 1px;
height: 100%;
display: block;
position: absolute;
top: 0;
}
.editorTheme__tableCellActionButtonContainer {
z-index: 4;
width: 20px;
height: 20px;
display: block;
position: absolute;
top: 6px;
right: 5px;
}
.editorTheme__tableCellActionButton {
color: #222;
cursor: pointer;
background-color: #eee;
border: 0;
border-radius: 20px;
width: 20px;
height: 20px;
display: block;
}
.editorTheme__tableCellActionButton:hover {
background-color: #ddd;
}
.editorTheme__characterLimit {
display: inline;
background-color: #fbb ;
}
.editorTheme__ol1 {
margin: 0;
padding: 0;
list-style-position: inside;
}
.editorTheme__ol2 {
margin: 0;
padding: 0;
list-style-type: upper-alpha;
list-style-position: inside;
}
.editorTheme__ol3 {
margin: 0;
padding: 0;
list-style-type: lower-alpha;
list-style-position: inside;
}
.editorTheme__ol4 {
margin: 0;
padding: 0;
list-style-type: upper-roman;
list-style-position: inside;
}
.editorTheme__ol5 {
margin: 0;
padding: 0;
list-style-type: lower-roman;
list-style-position: inside;
}
.editorTheme__ul {
margin: 0;
padding: 0;
list-style-position: inside;
}
.editorTheme__listItem {
margin: 0 32px;
}
.editorTheme__listItemChecked, .editorTheme__listItemUnchecked {
outline: none;
margin-left: 8px;
margin-right: 8px;
padding-left: 24px;
padding-right: 24px;
list-style-type: none;
position: relative;
}
.editorTheme__listItemChecked {
text-decoration: line-through;
}
.editorTheme__listItemUnchecked:before, .editorTheme__listItemChecked:before {
content: "";
cursor: pointer;
background-size: cover;
width: 16px;
height: 16px;
display: block;
position: absolute;
top: 2px;
left: 0;
}
.editorTheme__listItemUnchecked[dir="rtl"]:before, .editorTheme__listItemChecked[dir="rtl"]:before {
left: auto;
right: 0;
}
.editorTheme__listItemUnchecked:focus:before, .editorTheme__listItemChecked:focus:before {
border-radius: 2px;
box-shadow: 0 0 0 2px #a6cdfe;
}
.editorTheme__listItemUnchecked:before {
border: 1px solid #999;
border-radius: 2px;
}
.editorTheme__listItemChecked:before {
background-color: #3d87f5;
background-repeat: no-repeat;
border: 1px solid #3d87f5;
border-radius: 2px;
}
.editorTheme__listItemChecked:after {
content: "";
cursor: pointer;
border: 2px solid #fff;
border-width: 0 2px 2px 0;
width: 3px;
height: 6px;
display: block;
position: absolute;
top: 6px;
left: 7px;
right: 7px;
transform: rotate(45deg);
}
.editorTheme__nestedListItem {
list-style-type: none;
}
.editorTheme__nestedListItem:before, .editorTheme__nestedListItem:after {
display: none;
}
.editorTheme__tokenComment {
color: #708090;
}
.editorTheme__tokenPunctuation {
color: #999;
}
.editorTheme__tokenProperty {
color: #905;
}
.editorTheme__tokenSelector {
color: #690;
}
.editorTheme__tokenOperator {
color: #9a6e3a;
}
.editorTheme__tokenAttr {
color: #07a;
}
.editorTheme__tokenVariable {
color: #e90;
}
.editorTheme__tokenFunction {
color: #dd4a68;
}
.editorTheme__mark {
background: #ffd40024;
border-bottom: 2px solid #ffd4004d;
padding-bottom: 2px;
}
.editorTheme__markOverlap {
background: #ffd4004d;
border-bottom: 2px solid #ffd400b3;
}
.editorTheme__mark.selected {
background: #ffd40080;
border-bottom: 2px solid #ffd400;
}
.editorTheme__markOverlap.selected {
background: #ffd400b3;
border-bottom: 2px solid #ffd400b3;
}
.editorTheme__embedBlock {
-webkit-user-select: none;
user-select: none;
}
.editorTheme__embedBlockFocus {
outline: 2px solid #3c84f4;
}
.ContentEditable__root {
border: 0;
outline: 0;
min-height: 150px;
padding: 8px 28px 40px;
font-size: 15px;
display: block;
position: relative;
}
@media (width <= 1025px) {
.ContentEditable__root {
padding-left: 8px;
padding-right: 8px;
}
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace;
}
.ltr {
text-align: left;
}
.rtl {
text-align: right;
}
.editorInput {
resize: none;
caret-color: #444;
tab-size: 1;
outline: 0;
min-height: 150px;
padding: 15px 10px;
font-size: 15px;
position: relative;
}
.editorPlaceholder {
color: #999;
text-overflow: ellipsis;
-webkit-user-select: none;
user-select: none;
white-space: nowrap;
pointer-events: none;
font-size: 15px;
display: inline-block;
position: absolute;
top: 8px;
left: 28px;
right: 28px;
overflow: hidden;
}
.rtl .editorPlaceholder {
left: auto;
}
.editorShell {
color: #000;
border-radius: 2px;
flex-direction: column;
max-width: 1100px;
min-height: 300px;
margin: 20px auto;
font-weight: 400;
line-height: 1.7;
display: flex;
inset: 0;
}
.editorShell .editor-container {
background: #fff;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
flex-direction: column;
flex-grow: 1;
align-items: stretch;
display: flex;
position: relative;
overflow: hidden;
}
.editorShell .editor-container.tree-view {
border-radius: 0;
}
.editorShell .editor-container.plain-text {
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.editorScroller {
z-index: 0;
resize: vertical;
border: 0;
outline: 0;
flex-grow: 1;
min-height: 150px;
display: flex;
position: relative;
overflow: hidden;
}
.editor {
resize: vertical;
z-index: -1;
flex: auto;
position: relative;
}
.contentEditable {
border: 0;
outline: 0;
min-height: 150px;
padding: 8px 28px 40px;
font-size: 15px;
display: block;
position: relative;
}
/*# sourceMappingURL=index.css.map */