Ace Editor Doesn't Work With Bootstrap
I use boostrap default example theme: http://getbootstrap.com/examples/jumbotron-narrow/ and i'd like to past ace editor instead central block, but ace editor doesn't work (empty s
Solution 1:
To test what goes wrong:
- check if Ace have added other divs into
<div id="editor">
, if no, there must be some js error in console. - If Ace is there but isn't visible, remove all text from
<div id="editor">
and comment outace.edit
line to see what size ace will get (ace tries to match height of that div) - if the issue is indeed that Ace gets height=0, either add explicit height to the editor div,
- or if you want it to fit to text, set
maxLines
andminLines
options as shown in https://github.com/ajaxorg/ace-builds/blob/v1.1.6/demo/autoresize.html#L41-L43, however setting maxLines very large isn't recomended since it disables optimization of drawing only visible text, and can make editor slow for large documents.
Post a Comment for "Ace Editor Doesn't Work With Bootstrap"