Reference to posting function in book , I expand a bit : You can insert a picture when posting ( replaced “textarea” by an editable “DIV” ), this has been achieved.Now I don’t know how to handle the submit? The book was only publishing of text only, by “content: $( e. Target ).Find ( ‘[name=content]’ ). val ( )” that gets the post content, then display . now there are pictures, how to deal with it?Is there a method similar to .val ( ) that can get the entire contents of the DIV ( including images )?
The way of getting the post content now used,it is easy:
var post={
title:$(e.target).find(‘[name=title]’).val(),
content:$(e.target).find(‘[name=content]’).val(),
category:$(e.target).find(‘[name=category]:checked’).val()
}