Sha256: 6ed775746982cab9206389e617095ce8460a410a058a84d7bb60552cc56cff96
Contents?: true
Size: 1.17 KB
Versions: 1
Compression:
Stored size: 1.17 KB
Contents
/******************************************************************************* * KindEditor - WYSIWYG HTML Editor for Internet * Copyright (C) 2006-2011 kindsoft.net * * @author Roddy <luolonghao@gmail.com> * @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 = '<div style="padding:10px 20px;">' + '<iframe class="ke-textarea" frameborder="0" style="width:851px;height:400px;"></iframe>' + '</div>', 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('<link rel="stylesheet" type="text/css" href="/editor_preview.css" />'); var html = '<div class="plain_box">' + self.html() + '</div>'; doc.write(html); doc.close(); K(doc.body).css('background-color', '#FFF'); iframe[0].contentWindow.focus(); }); });
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails_kindeditor-plus-0.4.5 | vendor/assets/javascripts/kindeditor/plugins/preview/preview.js |