javascript - Angular directives recognized as html form elements -
i have made own directive act input element contenteditable attribute. problem element not recognized jquery element. if
$('form').serialize()
or
document.getelementbyid("form").elements
my element not show in both functions. know why ? , how fix ?
the serialize
method of jquery not include contenteditable
elements. can't read element this.
many wysiwyg html editor use trick hidden textarea
. synchronize content of contenteditable
inner html content of textarea
. serialize
jquery method see textarea
, use it.
since using angular, it's pretty easy synchronise 2 elements same model.
Comments
Post a Comment