Ace: How to set ace-editor content when container block is hidden

Created on 16 May 2015  ·  3Comments  ·  Source: ajaxorg/ace

I am trying to set ace editor content when container block is hidden.

I am not able to to the same.

Here is what i am trying http://jsfiddle.net/U5JtP/408/

Why ace editor did not updated the content and how to update in such scenario?

Most helpful comment

  1. use newest version of ace: 1.1.9
  2. call editor.resize() after showing the panel
    see http://jsfiddle.net/U5JtP/409/

All 3 comments

  1. use newest version of ace: 1.1.9
  2. call editor.resize() after showing the panel
    see http://jsfiddle.net/U5JtP/409/

Is there any internal configuration/patch, that doesn't require me to resize manually in the code.?

No. It is not possible to detect when the size of the dom node changes.
So every time size of the container is modified it is needed to call editor.resize to notify ace about it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rsercano picture rsercano  ·  13Comments

hangum picture hangum  ·  17Comments

volvor picture volvor  ·  11Comments

jamesarosen picture jamesarosen  ·  11Comments

matthew-dean picture matthew-dean  ·  12Comments