TinyMCE 4 not working with sortable jquery divs
<p>I am trying to make an application where one can build newsletters in real time by dragging dropping divs and editing them.
To sort divs I am using jquery.sortable(), these divs also contain a TinyMce. Which is working fine until divs are dragged.I have gone through <a href="https://stackoverflow.com/questions/3919928/tinymce-instances-in-jquery-sortable?rq=1">this link</a><br>
but still I am unable to achieve that.</p>

<p><strong>Markup:</strong></p>

<pre><code>&lt;div class="container"&gt;
    &lt;div class="sort-List"&gt;
        &lt;li&gt;
            &lt;div class="edit-Text"&gt;
                &lt;p&gt;Div 1&lt;/p&gt;
            &lt;/div&gt;
        &lt;/li&gt;
        &lt;li&gt;
            &lt;div class="edit-Text"&gt;
                &lt;p&gt;Div 2&lt;/p&gt;
            &lt;/div&gt;
        &lt;/li&gt;
        &lt;li&gt;
            &lt;div class="edit-Text"&gt;
                &lt;p&gt;Div 3&lt;/p&gt;
            &lt;/div&gt;
        &lt;/li&gt;
        &lt;li&gt;
            &lt;div class="edit-Text"&gt;
                &lt;p&gt;Div 4&lt;/p&gt;
            &lt;/div&gt;
        &lt;/li&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p><strong>JS:</strong></p>

<pre><code>&lt;!--Tiny Mce--&gt;
&lt;script&gt;
    tinymce.init({
        selector: '.edit-Text',
        inline: true,
        menubar: false,
        plugins: "textcolor colorpicker",
        toolbar: ["undo redo | styleselect | bold italic | alignleft aligncenter alignright | forecolor backcolor"],
    });
&lt;/script&gt;
&lt;!--Tiny Mce--&gt;    
&lt;!--MAKE DIVS SORTABLE--&gt;
&lt;script&gt;
    $(function () {
        $(".sort-List").sortable({
            cursor: 'move',
            start: function (e, ui) {
                $(this).find('.edit-Text').each(function () {
                    tinyMCE.execCommand('mceRemoveEditor', false, $(this).attr('id'));
                });
            },
            stop: function (e, ui) {
                $(this).find('.edit-Text').each(function () {
                    tinyMCE.execCommand('mceAddEditor', true, $(this).attr('id'));
                });
            },
        });
    });
&lt;/script&gt;
&lt;!--MAKE DIVS SORTABLE--&gt;
</code></pre>