Sha256: 505384620a930143ad3dde891e4bc19fb02c76962b8e0b103675791be15ae713

Contents?: true

Size: 1.02 KB

Versions: 28

Compression:

Stored size: 1.02 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('pagebreak', function(K) {
	var self = this;
	var name = 'pagebreak';
	var pagebreakHtml = K.undef(self.pagebreakHtml, '<hr style="page-break-after: always;" class="ke-pagebreak" />');

	self.clickToolbar(name, function() {
		var cmd = self.cmd, range = cmd.range;
		self.focus();
		range.enlarge(true);
		cmd.split(true);
		var tail = self.newlineTag == 'br' || K.WEBKIT ? '' : '<p id="__kindeditor_tail_tag__"></p>';
		self.insertHtml(pagebreakHtml + tail);
		if (tail !== '') {
			var p = K('#__kindeditor_tail_tag__', self.edit.doc);
			range.selectNodeContents(p[0]);
			p.removeAttr('id');
			cmd.select();
		}
	});
});

Version data entries

28 entries across 28 versions & 4 rubygems

Version Path
mo_page-0.0.2 lib/generators/mo_page/install/templates/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor-0.4.0 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
loyal_rails_kindeditor-0.0.9 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
loyal_rails_kindeditor-0.0.7 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
loyal_rails_kindeditor-0.0.6 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
loyal_rails_kindeditor-0.0.5 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor-0.3.20 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
loyal_rails_kindeditor-0.0.4 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
loyal_rails_kindeditor-0.0.3 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
loyal_rails_kindeditor-0.0.2 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
loyal_rails_kindeditor-0.0.1 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor-0.3.19 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor-0.3.18 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor-0.3.17 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor-0.3.16 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor-0.3.15 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor-0.3.14 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor-0.3.13 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor-0.3.12 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor_qiniu-0.0.4 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js