mor-texteditor{
    display: block;
    height: 100%;
    position: relative;

    .setup-form();

    &.has-cleanbtn{
        padding-bottom: 26px;
    }

    > .cleanbtn{
        right: 0;
        bottom: 0;
    }

    .editor-wrap{
        height: calc(100% - 32px);
        border: 1px @colorNeutral5 solid;
        border-radius: @borderRadius;

        &.focus{
            .setup-form-focus();
        }
    }

    > .form-name:empty + .editor-wrap{
        height: 100%;
    }

    &.hide-name{
        .editor-wrap{
            height: 100%;
        }
    }

    .toolbar{
        width: 100%;
        border-top: none !important;
        border-left: none !important;
        border-right: none !important;

        .editor-logo{
            display: inline-block;
            vertical-align: middle;
            padding: 0 @fontSize*0.5;
            background: darken(@colorComponentItemBg, 10%);
            color: @colorBlack;
            border-radius: @borderRadius;
        }
    }

    .quill{
        width: 100%;
    }

    .ql-toolbar{
        border-radius: @borderRadius @borderRadius 0 0;
    }

    .ql-container{
        border-radius: 0 0 @borderRadius @borderRadius;
        height: 100%;
        overflow-y: auto;
        overflow-x: visible;
        width: 100%;
        border: none !important;
        overflow: visible;

        .setup-scrollbar();
    }

    .ql-formats{
        > button{
            outline: none;
        }
    }

    .ql-picker-label{
        outline: none;
    }

    .ql-snow .ql-picker.ql-header,
    .ql-snow .ql-picker.ql-size{
        width: 68px;
    }

    .ql-snow .ql-tooltip[data-mode='link']::before{
        content: '链接地址：';
    }

    .ql-snow .ql-tooltip::before{
        content: '链接地址：';
    }

    .ql-snow .ql-tooltip.ql-editing a.ql-action::after{
        content: '保存';
    }

    .ql-snow .ql-tooltip a.ql-action::after{
        content: '修改';
    }

    .ql-snow .ql-tooltip a.ql-remove::before{
        content: '移除';
    }

    .emoji-palette #tab-panel{
        .setup-scrollbar();
    }

    // for quill-better-table
    button.ql-table::after {
        content: '';
    }

    .ql-table {
        margin-right: 0;
    }

    .qlbt-col-tool .qlbt-col-tool-cell:first-child{
        border-left: 1px solid @colorNeutral4;
    }

    .qlbt-col-tool .qlbt-col-tool-cell{
        border-top: 1px solid @colorNeutral4;
        border-right: 1px solid @colorNeutral4;
        border-bottom: 1px solid @colorNeutral4;
    }

    // 编辑器内样式
    .ql-editor p,
    .ql-editor ol,
    .ql-editor ul,
    .ql-editor pre,
    .ql-editor blockquote,
    .ql-editor h1,
    .ql-editor h2,
    .ql-editor h3,
    .ql-editor h4,
    .ql-editor h5,
    .ql-editor h6 {
        margin: 0;
        padding: 0;
        counter-reset: l-1 l-2 l-3 l-4 l-5 l-6 l-7 l-8 l-9;
    }

    .ql-editor ol,
    .ql-editor ul {
        padding-left: 1.5em;
    }

    .ql-editor ol > li,
    .ql-editor ul > li {
        list-style-type: none;
    }

    .ql-editor ul > li::before {
        content: '\2022';
    }

    .ql-editor li::before {
        display: inline-block;
        white-space: nowrap;
        width: 1.2em;
    }

    .ql-editor li::before {
        margin-left: -1.5em;
        margin-right: 0.3em;
        text-align: right;
    }

    .ql-editor ol li,
    .ql-editor ul li {
        padding-left: 1.5em;
    }

    .ql-editor ol li {
        counter-reset: l-1 l-2 l-3 l-4 l-5 l-6 l-7 l-8 l-9;
        counter-increment: l-0;
    }

    .ql-editor ol li::before {
        content: counter(l-0, decimal) '. ';
    }

    .ql-editor ol li.ql-i-1 {
        counter-increment: l-1;
    }

    .ql-editor ol li.ql-i-1::before {
        content: counter(l-1, lower-alpha) '. ';
    }

    .ql-editor ol li.ql-i-1 {
        counter-reset: l-2 l-3 l-4 l-5 l-6 l-7 l-8 l-9;
    }

    .ql-editor ol li.ql-i-2 {
        counter-increment: l-2;
    }

    .ql-editor ol li.ql-i-2::before {
        content: counter(l-2, lower-roman) '. ';
    }

    .ql-editor ol li.ql-i-2 {
        counter-reset: l-3 l-4 l-5 l-6 l-7 l-8 l-9;
    }

    .ql-editor ol li.ql-i-3 {
        counter-increment: l-3;
    }

    .ql-editor ol li.ql-i-3::before {
        content: counter(l-3, decimal) '. ';
    }

    .ql-editor ol li.ql-i-3 {
        counter-reset: l-4 l-5 l-6 l-7 l-8 l-9;
    }

    .ql-editor ol li.ql-i-4 {
        counter-increment: l-4;
    }

    .ql-editor ol li.ql-i-4::before {
        content: counter(l-4, lower-alpha) '. ';
    }

    .ql-editor ol li.ql-i-4 {
        counter-reset: l-5 l-6 l-7 l-8 l-9;
    }

    .ql-editor ol li.ql-i-5 {
        counter-increment: l-5;
    }

    .ql-editor ol li.ql-i-5::before {
        content: counter(l-5, lower-roman) '. ';
    }

    .ql-editor ol li.ql-i-5 {
        counter-reset: l-6 l-7 l-8 l-9;
    }

    .ql-editor ol li.ql-i-6 {
        counter-increment: l-6;
    }

    .ql-editor ol li.ql-i-6::before {
        content: counter(l-6, decimal) '. ';
    }

    .ql-editor ol li.ql-i-6 {
        counter-reset: l-7 l-8 l-9;
    }

    .ql-editor ol li.ql-i-7 {
        counter-increment: l-7;
    }

    .ql-editor ol li.ql-i-7::before {
        content: counter(l-7, lower-alpha) '. ';
    }

    .ql-editor ol li.ql-i-7 {
        counter-reset: l-8 l-9;
    }

    .ql-editor ol li.ql-i-8 {
        counter-increment: l-8;
    }

    .ql-editor ol li.ql-i-8::before {
        content: counter(l-8, lower-roman) '. ';
    }

    .ql-editor ol li.ql-i-8 {
        counter-reset: l-9;
    }

    .ql-editor ol li.ql-i-9 {
        counter-increment: l-9;
    }

    .ql-editor ol li.ql-i-9::before {
        content: counter(l-9, decimal) '. ';
    }

    .ql-editor .ql-indent-1 {
        padding-left: 3em;
    }

    .ql-editor li.ql-indent-1 {
        padding-left: 4.5em;
    }

    .ql-editor .ql-indent-2 {
        padding-left: 6em;
    }

    .ql-editor li.ql-indent-2 {
        padding-left: 7.5em;
    }

    .ql-editor .ql-indent-3 {
        padding-left: 9em;
    }

    .ql-editor li.ql-indent-3 {
        padding-left: 10.5em;
    }

    .ql-editor .ql-indent-4 {
        padding-left: 12em;
    }

    .ql-editor li.ql-indent-4 {
        padding-left: 13.5em;
    }

    .ql-editor .ql-indent-5 {
        padding-left: 15em;
    }

    .ql-editor li.ql-indent-5 {
        padding-left: 16.5em;
    }

    .ql-editor .ql-indent-6 {
        padding-left: 18em;
    }

    .ql-editor li.ql-indent-6 {
        padding-left: 19.5em;
    }

    .ql-editor .ql-indent-7 {
        padding-left: 21em;
    }

    .ql-editor li.ql-indent-7 {
        padding-left: 22.5em;
    }

    .ql-editor .ql-indent-8 {
        padding-left: 24em;
    }

    .ql-editor li.ql-indent-8 {
        padding-left: 25.5em;
    }

    .ql-editor .ql-indent-9 {
        padding-left: 27em;
    }

    .ql-editor li.ql-indent-9 {
        padding-left: 28.5em;
    }

    .ql-editor.ql-blank::before {
        color: rgba(0, 0, 0, 0.6);
        content: attr(data-placeholder);
        font-style: italic;
        left: 15px;
        pointer-events: none;
        position: absolute;
        right: 15px;
    }

    .ql-editor {
        box-sizing: border-box;
    }

    .ql-editor * {
        box-sizing: border-box;
    }

    .ql-editor .ql-stroke {
        fill: none;
        stroke: #444;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 2;
    }

    .ql-editor .ql-stroke-miter {
        fill: none;
        stroke: #444;
        stroke-miterlimit: 10;
        stroke-width: 2;
    }

    .ql-editor .ql-fill,
    .ql-editor .ql-stroke.ql-fill {
        fill: #444;
    }

    .ql-editor .ql-empty {
        fill: none;
    }

    .ql-editor .ql-even {
        fill-rule: evenodd;
    }

    .ql-editor.ql-thin,
    .ql-editor.ql-stroke.ql-thin {
        stroke-width: 1;
    }

    .ql-editor .ql-transparent {
        opacity: 0.4;
    }

    .ql-editor h1 {
        font-size: 2em;
        border-bottom: none;
    }

    .ql-editor h2 {
        font-size: 1.5em;
    }

    .ql-editor h3 {
        font-size: 1.17em;
    }

    .ql-editor h4 {
        font-size: 1em;
    }

    .ql-editor h5 {
        font-size: 0.83em;
    }

    .ql-editor h6 {
        font-size: 0.67em;
    }

    .ql-editor a {
        text-decoration: underline;
    }

    .ql-editor blockquote {
        border-left: 4px solid #CCC;
        margin-bottom: 5px;
        margin-top: 5px;
        padding-left: 16px;
    }

    .ql-editor code,
    .ql-editor pre {
        background-color: @colorNeutral1;
        border-radius: 3px;
    }

    .ql-editor pre {
        white-space: pre-wrap;
        margin-bottom: 5px;
        margin-top: 5px;
        padding: 5px 10px;
    }

    .ql-editor code {
        font-size: 85%;
        padding: 2px 4px;
    }

    .ql-editor pre.ql-syntax {
        background-color: #23241F;
        color: #F8F8F2;
        overflow: visible;
    }

    .ql-editor img {
        max-width: 100%;
        margin: 0;
        padding: 0;
        border: none;
    }

    .ql-editor a {
        color: #06C;
    }

    &.st-normal{}

    &.st-disabled,
    &.st-readonly{
        .ql-container{
            background: @colorFormBackgroundDisable;
        }
    }

    // default status
    &{
        .st-normal;
    }
}

.mo-texteditor-dialog{
    header{
        .mo-icon{
            color: @colorNeutral6;

            &:hover{
                color: @colorNeutral8;
            }
        }
    }
}
