Answers for "how to get sun editor value"

0

how to get sun editor value

<script>
		
    var editor;
	// If the textarea is exists then the editor will call;
	document.querySelector('textarea') ? (function(){
    editor = SUNEDITOR.create((document.querySelector('textarea') || '#textarea'),{
    lang: SUNEDITOR_LANG['en']
    });	
    })() : 0;
	var submit = document.querySelector('button[type="submit"]');
	submit.onclick = function() {
	document.querySelector('textarea').value = editor.getContents();
	}

    </script>
Posted by: Guest on August-29-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language