tinymce in bootstrap modal: wrong dropdown position on scroll

爱⌒轻易说出口 提交于 2019-12-05 08:56:20

In addition to user206056 css answer:

.mce-menu {position:fixed !important}

try adding to your TinyMCE init method, adding the ui_container parameter and set it to the selector of your bootstrap modal.

Something like:

 tinymce.init({
    selector: '.my-mce-selector',
    ui_container: '.modal', // bootstrap modal
    // your other options ... 
});

Although, this doesn't work in all cases (like inline: true), you may want to follow the GitHub issue for updates.

Just stumbled upon the same problem. Solved this by adding

.mce-menu {position:fixed !important}

to my css file holding page styles. Hope this helps

for newer tinymce version, try this:

.tox-tinymce-aux {
     position: relative !important;
     z-index: 10055;
}

just make sure the value of your z-index is larger than your modal's z-index.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!