How to Make TinyMCE's modal dialogs Responsive?

前端 未结 4 899
清酒与你
清酒与你 2021-02-13 02:48

I\'m working with TinyMCE4 on a responsive CMS using Bootstrap 3. I\'ve noticed that the dialog/modals aren\'t responsive in TinyMCE4 which is a bit of a bummer. I started writi

4条回答
  •  北荒
    北荒 (楼主)
    2021-02-13 03:06

    @media all and (max-width: 820px) {
      .mce-window                         {width:auto !important; top:0px !important; left:0px !important; right:0px !important; bottom:0px !important; background:none !important;}
      .mce-window-head                    {background:#FFFFFF !important;}
      .mce-window-body                    {background:#FFFFFF !important;}
      .mce-foot > .mce-container-body     {padding:10px !important; width:80% !important;}
      .mce-panel                          {max-width:100% !important;}
      .mce-container                      {max-width:100% !important; height:auto !important; overflow:auto;}
      .mce-container-body                 {max-width:100% !important; width: auto !important; height:auto !important; overflow:auto;}
      .mce-form                           {padding:10px !important;}
      .mce-tabs                           {max-width:100% !important;}
      .mce-formitem                       {margin:10px 0 !important;}
      .mce-abs-layout-item                {position:relative !important; left: 0 !important; top: 0 !important; width:auto !important;}
      .mce-slider                         {margin-top: 20px !important; margin-bottom: 20px !important;}
      .mce-abs-layout-item.mce-label      {display:block !important;}
      .mce-abs-layout-item.mce-textbox    {-webkit-box-sizing:border-box !important; -moz-box-sizing:border-box !important; box-sizing:border-box !important; display:block !important; width:100% !important;}
      .mce-abs-layout-item.mce-combobox   {display:flex !important;}
      .mce-abs-layout-item.mce-combobox > .mce-textbox {-ms-flex:1 1 auto; -webkit-flex:1 1 auto; flex:1 1 auto; height:29px !important; width:80% !important;}
      .mce-container-body.mce-window-body.mce-abs-layout iframe {height:500px !important;} /*this only use with responsive file manager 9*/
      .mce-tinymce-inline                  {left: 0 !important; right: 0 !important; margin-left: auto !important; margin-right: auto !important;}
      .mce-tinymce-inline .mce-flow-layout {white-space: normal !important;}
      .mce-menu.mce-fixed                  {max-height: 90%; overflow: auto;}
    
    .mce-title                          {white-space:normal !important;}
    .mce-btn-group                      {overflow-y: hidden !important;}
    }
    

提交回复
热议问题