我在我的页面上使用ACE编辑器,
<script src="ace-builds-master/src-noconflict/ace.js" type="text/javascript" charset="utf-8">
</script>
<script>
var editor = ace.edit("editor");
editor.setTheme("ace/theme/cobalt");
editor.getSession().setMode("ace/mode/geco");
</script>默认情况下它显示的是一种字体,我想将我的字体更改为'Tahoma 10pt‘。
我该怎么做?
发布于 2015-08-30 18:55:22
据我所知,除了editor.setOptions()之外,没有什么捷径可以直接改变Ace的字体家族。
但是,您可以通过调用以下方法直接设置以像素为单位的字体大小:
editor.setFontSize(10) // will set font-size: 10pxhttps://stackoverflow.com/questions/21900938
复制相似问题