JBIDE-13787 Palette marks editor "changed" when there is nothing to insert

Added check to change document if text is not empty