Sha256: e7a09a02b0795d6c779dfbb3bf67cbbd6a39a9df1756f498ee27c887f412fe82

Contents?: true

Size: 1006 Bytes

Versions: 14

Compression:

Stored size: 1006 Bytes

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();
		var tail = self.newlineTag == 'br' || K.WEBKIT ? '' : '<span id="__kindeditor_tail_tag__"></span>';
		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

14 entries across 14 versions & 5 rubygems

Version Path
rails_editor_liu-0.5.1 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_editor_liu-0.5.0 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor-0.5.1 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor_video-0.5.2 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor_video-0.5.1 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor-0.5.0 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor-0.4.7 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor-0.4.6 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor-plus-0.4.5 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor_upyun-0.4.5 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor-0.4.5 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor-0.4.4 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor-0.4.2 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js
rails_kindeditor-0.4.1 vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js