cirandas.net

ref: master

public/javascripts/tinymce/tests/manual/noneditable.html


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html>
<head>
<title>Noneditable plugin manual tests</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<script src="../../js/tinymce/tinymce.dev.js"></script>
<script>
	tinymce.init({
		mode: "textareas",
		plugins: [
			"advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",
			"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
			"save table contextmenu directionality emoticons template paste noneditable"
		],
		add_unload_trigger: false,
		content_css: "css/noneditable_manual.css",
		noneditable_regexp: /\[\[[^\]]+\]\]/g
	});
</script>
</head>
<body>

<form method="post" action="http://www.tinymce.com/dump.php?example=true">
	<div>
		<h3>Noneditable plugin manual tests</h3>

		<div>
			<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
				&lt;p&gt;
					Editable &lt;span class="mceNonEditable"&gt;[non editable]&lt;/span&gt; editable.
				&lt;/p&gt;
				&lt;p class="mceNonEditable"&gt;
					Non editable block &lt;span class="mceEditable"&gt;[editable]&lt;/span&gt; with more text.
				&lt;/p&gt;
				&lt;p&gt;&lt;span class="mceNonEditable"&gt;[non editable]&lt;/span&gt;&lt;span class="mceNonEditable"&gt;[non editable]&lt;/span&gt;&lt;/p&gt;
				&lt;p&gt;
					Editable &lt;span class="mceNonEditable"&gt;[non editable]&lt;/span&gt;&lt;span class="mceNonEditable"&gt;[non editable]&lt;/span&gt; editable.
				&lt;/p&gt;
				&lt;p&gt;[[item1]][[item2]]&lt;/p&gt;
			</textarea>
		</div>
		<a href="javascript:;" onclick="alert(tinymce.get('elm1').getContent());return false;">[Get contents]</a>
		<a href="javascript:;" onclick="alert(tinymce.get('elm1').getContent({format: 'raw'}));return false;">[Get contents raw]</a>
		<a href="javascript:;" onclick="alert(tinymce.get('elm1').selection.getContent());return false;">[Get selected]</a>
		<a href="javascript:;" onclick="alert(tinymce.get('elm1').selection.getContent({format: 'raw'}));return false;">[Get selected raw]</a>
	</div>
</form>

<script>
if (document.location.protocol == 'file:') {
	alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
}
</script>
</body>
</html>