Get original transcluded content within angular directive
问题 My goal is to create an editable directive that allows a user to edit HTML of any element to which the attribute is attached (see Plunker: http://plnkr.co/edit/nIrr9Lu0PZN2PdnhQOC6) This almost works except I can't get the original raw HTML of the transcluded content to initialize the text area. I can get the text of it from clone.text() , but that's missing the HTML tags like <H1> , <div> , etc. so clicking apply with no edits is not idempotent. The method clone.html() throws an error,