javascript - How to autosave data from TinyMCE editor using ajax php? -


i using code section right now, when remove tinymce editor works fine want tinymce editor. thank in advance

<script> tinymce.execcommand('mceremoveeditor',true,'numeric'); tinymce.init({     forced_root_block : "",selector: "#numeric", valid_elements : 'br', theme: "modern", height: 280,      plugins: [       'lists link hr anchor pagebreak',       'visualblocks',       'nonbreaking'     ],     toolbar: false,     menubar:false });       </script>       <script type="text/javascript">      var $status = $('#status'), $commentbox = $('#numeric'), timeoutid;  $commentbox.press(function () { $status.attr('class', 'pending').text('changes pending');  // if timer started, clear it. if (timeoutid) cleartimeout(timeoutid);  // set timer save comment when fires. timeoutid = settimeout(function () {     // make ajax call save data.     $status.attr('class', 'saved').text('changes saved'); }, 750); }); </script>   

<div id="status" class="nochange">no change</div>  <textarea   class="form-control" name="numeric" id="numeric"></textarea> 


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -