Getting the snapshot and restoring the editor with the contents (instead of relying on the snapshot event) when the char/word limit is reached