Add proper callbacks to html editor