Hi Rameshdurai,
Before you use API getHTML(), you must ensure that the editor is load complete. That means the editor must in the current tab.
property id is the normal html element, so you can get it success. But the API is load dynamically.
Regards,
Ken