execCommand value

Hi i just started making a WYSIWYG EDITOR

Im looking for a way to get the html that execCommand is adding (added tag in picture)

any idea?


function executeAction(selectedTool)// do the action to format the text depending on the tool that was pressed
	var commandName = selectedTool.id	
	//  String commandName : the name of the command
  	//  Boolean showDefaultUI : whether the default user interface should be shown. This is not implemented in Mozilla.
  	//  String valueArgument : some commands (such as insertimage) require an extra value argument (the image's url). Pass an argument of null if no argument is needed.
	/*vCmdValue = document.queryCommandValue(commandName)