Sha256: 15a3f7e609045144065daa27a46ab2fa66b936ed84e057d72444b807f5baeb50

Contents?: true

Size: 1.28 KB

Versions: 58

Compression:

Stored size: 1.28 KB

Contents

tinyMCEPopup.requireLangPack();
tinyMCEPopup.onInit.add(onLoadInit);

function saveContent() {
	tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true});
	tinyMCEPopup.close();
}

function onLoadInit() {
	tinyMCEPopup.resizeToInnerSize();

	// Remove Gecko spellchecking
	if (tinymce.isGecko)
		document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck");

	document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true});

	if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) {
		setWrap('soft');
		document.getElementById('wraped').checked = true;
	}

	resizeInputs();
}

function setWrap(val) {
	var v, n, s = document.getElementById('htmlSource');

	s.wrap = val;

	if (!tinymce.isIE) {
		v = s.value;
		n = s.cloneNode(false);
		n.setAttribute("wrap", val);
		s.parentNode.replaceChild(n, s);
		n.value = v;
	}
}

function toggleWordWrap(elm) {
	if (elm.checked)
		setWrap('soft');
	else
		setWrap('off');
}

function resizeInputs() {
	var vp = tinyMCEPopup.dom.getViewPort(window), el;

	el = document.getElementById('htmlSource');

	if (el) {
		el.style.width  = (vp.w - 20) + 'px';
		el.style.height = (vp.h - 65) + 'px';
	}
}

Version data entries

58 entries across 58 versions & 5 rubygems

Version Path
tinymce_rails-3.4.6 vendor/assets/javascripts/tiny_mce/themes/advanced/js/source_editor.js
comfortable_mexican_sofa-1.2.5 public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/source_editor.js
comfortable_mexican_sofa-1.2.4 public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/source_editor.js
comfortable_mexican_sofa-1.2.3 public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/source_editor.js
comfortable_mexican_sofa-1.2.2 public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/source_editor.js
comfortable_mexican_sofa-1.2.1 public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/source_editor.js
comfortable_mexican_sofa-1.2.0 public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/source_editor.js
comfortable_mexican_sofa-1.1.2 public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/source_editor.js
comfortable_mexican_sofa-1.1.1 public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/source_editor.js
spree_editor-0.50.0 public/javascripts/tinymce/themes/advanced/js/source_editor.js
cable-0.9.15 public/javascripts/tinymce/themes/advanced/js/source_editor.js
cable-0.9.14 public/javascripts/tinymce/themes/advanced/js/source_editor.js
cable-0.9.13 public/javascripts/tinymce/themes/advanced/js/source_editor.js
cable-0.9.12 public/javascripts/tinymce/themes/advanced/js/source_editor.js
comfortable_mexican_sofa-1.0.51 public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/source_editor.js
cable-0.9.11 public/javascripts/tinymce/themes/advanced/js/source_editor.js
cable-0.9.10 public/javascripts/tinymce/themes/advanced/js/source_editor.js
cable-0.9.9 public/javascripts/tinymce/themes/advanced/js/source_editor.js
cable-0.9.8 public/javascripts/tinymce/themes/advanced/js/source_editor.js
cable-0.9.6 public/javascripts/tinymce/themes/advanced/js/source_editor.js