visualblocks.html
2.3 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html>
<html>
<head>
<title>Visual blocks</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<script src="../../js/tinymce/tinymce.dev.js"></script>
<script>
tinymce.init({
mode: "textareas",
plugins: "visualblocks",
toolbar1: "visualblocks styleselect code",
visualblocks_default_state: true,
// Experimental feature to break container on enter in a empty block element
//end_container_on_empty_block: true,
// Style formats
style_formats: [
{title: 'h1', block: 'h1'},
{title: 'h2', block: 'h2'},
{title: 'h3', block: 'h3'},
{title: 'h4', block: 'h4'},
{title: 'h5', block: 'h5'},
{title: 'h6', block: 'h6'},
{title: 'p', block: 'p'},
{title: 'div', block: 'div'},
{title: 'pre', block: 'pre'},
{title: 'section', block: 'section', wrapper: true, merge_siblings: false},
{title: 'article', block: 'article', wrapper: true, merge_siblings: false},
{title: 'blockquote', block: 'blockquote', wrapper: true},
{title: 'hgroup', block: 'hgroup', wrapper: true},
{title: 'aside', block: 'aside', wrapper: true},
{title: 'figure', block: 'figure', wrapper: true}
],
add_unload_trigger: false
});
</script>
</head>
<body>
<form method="post" action="http://www.tinymce.com/dump.php?example=true">
<textarea id="elm1" name="elm1" rows="40" cols="80" style="width: 80%">
<h1>Header 1</h1>
<h2>Header 2</h2>
<h3>Header 3</h3>
<h4>Header 4</h4>
<h5>Header 5</h5>
<h6>Header 6</h6>
<p>Paragraph</p>
<div>Div</div>
<pre>Pre</pre>
<address>Address</address>
<section>Section<p>Paragraph</p></section>
<article>Article<p>Paragraph</p></article>
<blockquote>Blockquote<p>Paragraph</p></blockquote>
<hgroup><h1>Header 1</h1></hgroup>
<aside>Section<p>Paragraph</p></aside>
<figure>Figure<figcaption>Figcaption</figcaption></figure>
</textarea>
</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>