Ace Editor - How To Get Apply Button Action

In that case, the initial content is displayed. But the moment you edit something and press the apply button, the if content also works.