WMD Editor Echoing Value Of Wmd-preview Div And Inquiries About Storing That Value Into A Database
I am currently trying to add the WMD editor to my site. I have everything working so far but now I am running into wall: How to store the typed information into my database? I have
Solution 1:
Place a hidden field in your form and on submit, get the value of wmd-preview and assign it into the hidden field and let the form submit. then access your hidden field in $_POST array as a normal input field and save it.
you can access the wmd-preview as
$("#myhidden").val($("#wmd-preview").html());
Solution 2:
If I understand you correctly I think you only have to replace
var wmdVal = $("#wmd-input").val();
with
var wmdVal = $("#wmd-preview").html();
in your code above.
Post a Comment for "WMD Editor Echoing Value Of Wmd-preview Div And Inquiries About Storing That Value Into A Database"