Reputation: 1246
Hi I would like to create a contentEditable tag in my page all i want is whatever the text i'm typing after i created this element should go into that tag but it's not happening like that. can someone help me out ?
var pElement = document.createElement('p');
$(pElement).attr('contenteditable','true')
.addClass('current');
$(getPElement).append(pElement);
$(getPElement).find('p.current').focus();
Upvotes: 0
Views: 61