fixed the templates for the preview
Editor Directive Refactor