From 1dccb33d2ca06b0c847220ae59bb49de915509ac Mon Sep 17 00:00:00 2001 From: Igor Mukhin Date: Wed, 18 Nov 2015 12:56:19 +0100 Subject: [PATCH] Fixes #21, remember the value that was updated during TinyMCE init --- src/wysiwyg.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wysiwyg.js b/src/wysiwyg.js index bec20e4..5ca07ac 100644 --- a/src/wysiwyg.js +++ b/src/wysiwyg.js @@ -46,6 +46,10 @@ tinymce.setContent( value ); tinymce.execCommand( 'keyup' ); } + } else { + // We need to remember the value that was updated during TinyMCE initialization, + // otherwise TinyMCE will show up with the old value + $( element ).val( value ); } }