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

STRd6 picture STRd6  ·  4Comments

ketysek picture ketysek  ·  3Comments

hojas picture hojas  ·  7Comments

christianbs picture christianbs  ·  3Comments

BoasE picture BoasE  ·  4Comments