When last_version is deleted, do not delete text and previous versions in cascade, but really delete text only when there is no previous version, otherwise update text.last_version with previous version.
/*cm customization of markitup editor's look*/
.markItUpEditor, .markItUpPreviewFrame, .markItUpContainer {
border:1px solid #96D8A8;
}
.html .markItUpEditor, .markdown .markItUpEditor {
background-image:none;
}
.markItUpEditor {
padding:5px;
width:676px;
}
.markItUpContainer {
background-image:none;
}