This sounds like an issue I've run into before, where any content you dynamically add to a custom HTML field (or by just directly adding to the page using javascript) will not make it into the stored image due to the way the submission process works. Essentially during a submit event, Laserfiche converts all the fields to read only and reloads the web page before generating the image.
The only workaround I've seen is to find a way to run your javascript when the form loads (inside the $(document).ready() function), so that it will be regenerated properly when the page reloads during the submit process.
One way to force this to happen, even when you can't run your javascript directly on form load, is to use a hidden laserfiche field to store your content as HTML. Then when the page loads, check this hidden field for a value and regenerate your table content if there is any content there. An example of this can be found in the old BPM251 signature code:
$(document).ready(function () {
function htmlEncode(value) {
return $('<div/>').text(value).html();
}
function htmlDecode(value) {
return $('<div/>').html(value).text();
}
/**When the page loads, check if the sig data (hidden) field has a value.
If it has a value, decode it and put it in the image, and remove the
signature pad and its buttons.**/
var sigvalue = $('.sigdata textarea').val();
var sigrovalue = $('.sigdata .ro').text();
if (sigvalue != '' || sigrovalue != '') {
var decoded = htmlDecode(sigvalue == '' ? sigrovalue : sigvalue);
var $img = $('<img class=imported></img>');
$img.attr("src", decoded).appendTo('#sigimage');
$('.sigGroup').remove(); //class added to the signature button and image custom HTML fields.
$('.sigwarning').hide();
}
});
The HTML encode/decode functions are just some simple wrappers that handle the string formatting with regards to certain special characters in HTML (&, <, >, etc...). The key part at the bottom is that it checks the hidden ".sigdata" class element, looking for data in both its textarea and "ro" readonly elements, for any information. If it finds something, then it loads the data onto the form. In this example, the data stored in the hidden field contained an image, which is loaded into the "src" attribute of a new image element. That element is then placed on the form at the "#sigimage" target.
I think you could adapt this code to meet your needs if you can understand what's happening there.