/******************************************************************************* * KindEditor - WYSIWYG HTML Editor for Internet * Copyright (C) 2006-2011 kindsoft.net * * @author Roddy * @site http://www.kindsoft.net/ * @licence http://www.kindsoft.net/license.php *******************************************************************************/ KindEditor.plugin('preview', function(K) { var self = this, name = 'preview', undefined; self.clickToolbar(name, function() { var lang = self.lang(name + '.'), html = '
' + '' + '
', dialog = self.createDialog({ name : name, width : 892, title : self.lang(name), body : html }), iframe = K('iframe', dialog.div), doc = K.iframeDoc(iframe); doc.open(); doc.write(''); var html = '
' + self.html() + '
'; doc.write(html); doc.close(); K(doc.body).css('background-color', '#FFF'); iframe[0].contentWindow.focus(); }); });