implement the code plugin of xheditor