在网络界面中,我将MarkItUp作为编辑器进行了整合。但我有渲染问题:
一方面,内部(厚蓝色)框架不适合外部框架(见下图右侧)。
另一方面,厚蓝色框架延伸到图标栏。由此产生的问题是,您必须使用下拉菜单进行非常非常平滑的鼠标移动 - 如果您不这样做,它们将非常快速地消失。
澄清小提琴:
var mySettings = {
markupSet: [
{name:'Size', key:'S', openWith:'[size=[![Text size]!]]', closeWith:'[/size]', dropMenu :[
{name:'Big', openWith:'[size=200]', closeWith:'[/size]' },
{name:'Normal', openWith:'[size=100]', closeWith:'[/size]' },
{name:'Small', openWith:'[size=50]', closeWith:'[/size]' }
]},
{name:'Size', key:'S', openWith:'[size=[![Text size]!]]', closeWith:'[/size]', dropMenu :[
{name:'Big', openWith:'[size=200]', closeWith:'[/size]' },
{name:'Normal', openWith:'[size=100]', closeWith:'[/size]' },
{name:'Small', openWith:'[size=50]', closeWith:'[/size]' }
]},
{name:'Size', key:'S', openWith:'[size=[![Text size]!]]', closeWith:'[/size]', dropMenu :[
{name:'Big', openWith:'[size=200]', closeWith:'[/size]' },
{name:'Normal', openWith:'[size=100]', closeWith:'[/size]' },
{name:'Small', openWith:'[size=50]', closeWith:'[/size]' }
]},
{name:'Size', key:'S', openWith:'[size=[![Text size]!]]', closeWith:'[/size]', dropMenu :[
{name:'Big', openWith:'[size=200]', closeWith:'[/size]' },
{name:'Normal', openWith:'[size=100]', closeWith:'[/size]' },
{name:'Small', openWith:'[size=50]', closeWith:'[/size]' }
]}
]
}
$(document).ready(function() {
$('#markitup').markItUp(mySettings);
});
.markItUp .markItUpButton1 a {
background-image:url(https://rawgit.com/markitup/1.x/master/markitup/sets/default/images/bold.png);
}
.markItUp .markItUpButton2 a {
background-image:url(https://rawgit.com/markitup/1.x/master/markitup/sets/default/images/italic.png);
}
.markItUp .markItUpButton3 a {
background-image:url(https://rawgit.com/markitup/1.x/master/markitup/sets/default/images/stroke.png);
}
.markItUp .markItUpButton4 a {
background-image:url(https://rawgit.com/markitup/1.x/master/markitup/sets/default/images/list-bullet.png);
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://rawgit.com/markitup/1.x/master/markitup/skins/markitup/style.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://rawgit.com/markitup/1.x/master/markitup/jquery.markitup.js"></script>
<!--script src="https://rawgit.com/markitup/1.x/master/markitup/sets/default/set.js"></script-->
<textarea id="markitup" cols="80" rows="20"></textarea>
我发现(通过连续排除)'bootstrap.min.css'(3.3.7)导致上述问题。但我不知道如何解决我的问题。
有没有人有解决方案?
答案 0 :(得分:0)
问题是css属性&box-sizing&#39; - 它被设置为&#39; box-sizing:border-box;&#39;通过bootstrap。我通过添加&#39; box-sizing:content-box;&#39;来解决我的问题。到班级&#39; markItUp&#39;在相应的css文件中。