Refactor the code
add table modify function
provide html editor api to invoke