UNPKG

@progress/kendo-angular-editor

Version:
307 lines (262 loc) 7.04 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ /** * @hidden */ export const defaultStyle = ` html, body { margin: 0; height: 100%; padding: 0; } html { min-height: 100%; } body { box-sizing: border-box; position: relative; word-wrap: break-word; padding: 8px; } body > .k-content { outline: 0; height: 100%; white-space: pre-wrap; } div.ProseMirror { position: relative; word-wrap: break-word; white-space: pre-wrap; white-space: break-spaces; -webkit-font-variant-ligatures: none; font-variant-ligatures: none; font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ } .ProseMirror pre { white-space: pre-wrap; } .k-content > p { margin: 0 0 1em; } .k-content table { white-space: pre-wrap; } .k-content .k-text-selected, .k-content::selection { color: HighlightText; background-color: Highlight; } .k-content .k-text-highlighted { background-color: #bbdefb; } .k-content .ProseMirror-selectednode { outline: 2px solid #8cf; } .ProseMirror-hideselection *::selection { background: transparent; } .ProseMirror-hideselection *::-moz-selection { background: transparent; } .ProseMirror-hideselection { caret-color: transparent; } .ProseMirror-gapcursor { display: none; pointer-events: none; position: absolute; } .ProseMirror-gapcursor:after { content: ""; display: block; position: absolute; top: -2px; width: 20px; border-top: 1px solid black; animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; } @keyframes ProseMirror-cursor-blink { to { visibility: hidden; } } .ProseMirror-focused .ProseMirror-gapcursor { display: block; } .k-editor-resize-handles-wrapper { position: absolute; visibility: hidden; } .k-editor-resize-handle { position: absolute; visibility: visible; background-color: #fff; border: 1px solid #000; z-index: 100; width: 5px; height: 5px; } .k-editor-resize-handle.northwest { top: 0; left: 0; transform: translate(-50%, -50%); cursor: nw-resize; } .k-editor-resize-handle.north { top: 0; left: 50%; transform: translate(-50%, -50%); cursor: n-resize; } .k-editor-resize-handle.northeast { top: 0; right: 0; transform: translate(50%, -50%); cursor: ne-resize; } .k-editor-resize-handle.southwest { left: 0; bottom: 0; transform: translate(-50%, 50%); cursor: sw-resize; } .k-editor-resize-handle.south { bottom: 0; left: 50%; transform: translate(-50%, 50%); cursor: s-resize; } .k-editor-resize-handle.southeast { right: 0; bottom: 0; transform: translate(50%, 50%); cursor: se-resize; } .k-editor-resize-handle.west { top: 50%; left: 0; transform: translate(-50%, -50%); cursor: w-resize; } .k-editor-resize-handle.east { top: 50%; right: 0; transform: translate(50%, -50%); cursor: e-resize; } .ProseMirror .k-placeholder::before { content: attr(data-placeholder); height: 0; color: #8a8a8a; float: left; opacity: 1; cursor: text; -webkit-user-select: none; -ms-user-select: none; user-select: none; } .ProseMirror li { position: relative; } li.ProseMirror-selectednode { outline: none; } li.ProseMirror-selectednode:after { content: ""; position: absolute; left: -32px; right: -2px; top: -2px; bottom: -2px; border: 2px solid #8cf; pointer-events: none; } .ProseMirror[contenteditable="false"] img { pointer-events: none; } `; /** * @hidden */ export const tablesStyles = ` .ProseMirror .tableWrapper { overflow-x: auto; margin: 1em 0; } .ProseMirror table { margin: 0; border-collapse: collapse; table-layout: fixed; width: 100%; overflow: hidden; } .ProseMirror td, .ProseMirror th { min-width: 1em; border: 1px solid #ddd; padding: 3px 5px; vertical-align: top; box-sizing: border-box; position: relative; } .ProseMirror th { font-weight: bold; text-align: left; } .ProseMirror .column-resize-handle { position: absolute; right: -2px; top: 0; bottom: 0; width: 4px; z-index: 20; background-color: #adf; pointer-events: none; } .ProseMirror.resize-cursor { cursor: ew-resize; cursor: col-resize; } /* Give selected cells a blue overlay */ .ProseMirror .selectedCell:after { z-index: 2; position: absolute; content: ""; left: 0; right: 0; top: 0; bottom: 0; background: rgba(200, 200, 255, 0.4); pointer-events: none; } /* Resizing */ .k-editor-resize-wrap-element { display: inline-block; position: relative; } .ProseMirror .row-resize-handle { position: absolute; right: 0; left: 0; bottom: 0; transform: translate(0, 50%); height: 4px; z-index: 20; background-color: #adf; pointer-events: none; } .ProseMirror.resize-cursor-vertical { cursor: sn-resize; cursor: row-resize; } .k-editor-resize-wrap-element table td p, .k-editor-resize-wrap-element table th p { margin: 0 auto; } .ProseMirror[contenteditable="false"] .k-editor-resize-handle, .ProseMirror[contenteditable="false"] .k-editor-resize-handles-wrapper, .ProseMirror[contenteditable="false"] .row-resize-handle, .ProseMirror[contenteditable="false"] .column-resize-handle { display: none; } .ProseMirror[contenteditable="false"] table { pointer-events: none; } .ProseMirror[contenteditable="false"] .ProseMirror-selectednode { outline: none; } .ProseMirror[contenteditable="false"] { cursor: unset !important; } `; /** * @hidden */ export const rtlStyles = 'body { direction: rtl }';