在我上一篇博客中,在解决公式插入预览无效之后,还f发现cherry-markdown是通过css的:hover来进行公式的展示,导致不好选中
上一篇博客速达:cherry-markdown公式能插入但是预览无效-CSDN博客
下面是解决方案,其实就是改用了mouseover事件:
// ---------------------- 解决公式不好选中的问题
$('.cherry-toolbar-button.cherry-insert-formula-categary__btn').on('mouseover',function(){// 移除显示$('.cherry-toolbar-button').css('color','#212529').nextAll().filter('.cherry-insert-formula-categary__func.no-scrollbar').css('display','none');// 显示当前$(this).css('color','#3582fb').next().css({'float':'left','display':'block'});
})
屏幕录制 2024-05-28 175836