CKEditor image dialog forms not clickable when in a modal dialog

泄露秘密 提交于 2019-12-08 13:44:36

问题


I am using bootstrap modal popup to open ckeditor. It's working but when I to click the image icon in that dialog opens, but not clickable.


回答1:


Using this code.

<script>
    CKEDITOR.replace('help_ldesc');
    //CKEDITOR.replace('help_ldesc1');

    $.fn.modal.Constructor.prototype.enforceFocus = function() {
        var $modalElement = this.$element;
        $(document).on('focusin.modal',function(e) {
                var $parent = $(e.target.parentNode);
                if ($modalElement[0] !== e.target && !$modalElement.has(e.target).length && $(e.target).parentsUntil('*[role="dialog"]').length === 0) {
                        $modalElement.focus();
                }
        });
};
</script>


来源:https://stackoverflow.com/questions/35764393/ckeditor-image-dialog-forms-not-clickable-when-in-a-modal-dialog

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