UNPKG

@uiw/react-md-editor

Version:

A markdown editor with preview, implemented with React.js and TypeScript.

81 lines (79 loc) 1.73 kB
@md-editor:~ "w-md-editor"; .@{md-editor} { text-align: left; border-radius: 3px; padding-bottom: 1px; position: relative; color: var(--color-fg-default); box-shadow: 0 0 0 1px var(--color-border-default), 0 0 0 var(--color-border-default), 0 1px 1px var(--color-border-default); background-color: var(--color-canvas-default); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; .copied { display: none !important; } &-content { position: relative; border-radius: 0 0 3px 0; height: calc(100% - 39.1px); } &-input { width: 50%; height: 100%; } &-text-pre > code { word-break: break-word !important; white-space: pre-wrap !important; } &-preview { width: 50%; box-sizing: border-box; box-shadow: inset 1px 0 0 0 var(--color-border-default); position: absolute; padding: 10px 20px; overflow: auto; top: 0; right: 0; bottom: 0; border-radius: 0 0 5px 0; display: flex; flex-direction: column; // word-break: break-word !important; // white-space: pre-wrap !important; .anchor { display: none; } .contains-task-list { list-style: none; } } &-show-preview &-input { width: 0%; overflow: hidden; background-color: var(--color-canvas-default); } &-show-preview &-preview { width: 100%; box-shadow: inset 0 0 0 0; } &-show-edit &-input { width: 100%; } &-show-edit &-preview { width: 0%; padding: 0; } &-fullscreen { overflow: hidden; position: fixed; z-index: 99999; top: 0; left: 0; right: 0; bottom: 0; height: 100% !important; } &-fullscreen &-content { height: 100%; } }