0

在 Web 界面中,我将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)会导致上述问题。但我不知道如何解决我的问题。

有没有人有办法解决吗?

4

1 回答 1

0

问题是css属性'box-sizing' - 它被设置为'box-sizing:border-box;' 通过引导程序。我通过添加 'box-sizing: content-box;' 解决了我的问题 到相应的 css 文件中的类“markItUp”。

于 2017-09-21T09:42:48.573 回答