forked from pedro0alves/tinymce-placeholder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
42 lines (37 loc) · 2.04 KB
/
test.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
<html>
<head>
<title>Placeholder plugin test</title>
<script src="http://cdn.tinymce.com/4/tinymce.min.js"></script>
<script src="placeholder/plugin.js"></script>
<script type="text/javascript">
tinymce.init({
selector: ".tinymce",
plugins: [ "placeholder" ],
});
tinymce.init({
selector: "#tinymce-custom-placeholder",
plugins: [ "placeholder" ],
placeholder:'placeholder set in editor.settings',
});
tinymce.init({
selector: "#tinymce-custom-style",
plugins: [ "placeholder" ],
placeholder_attrs: { style: {position: 'absolute', top:'5px', left:0, color: '#FF0000', padding: '1%', width:'98%', overflow: 'hidden', 'white-space': 'pre-wrap'} },
});
</script>
</head>
<body>
<h2>Empty Editor</h2>
<textarea class="tinymce" placeholder="This is a test placeholder."></textarea>
<h2>Non-empty Editor</h2>
<textarea class="tinymce" placeholder="This is a test placeholder...">This is an editor with text</textarea>
<h2>Editor without placeholder attribute</h2>
<textarea class="tinymce"></textarea>
<h2>Empty Editor Long Placeholder</h2>
<textarea class="tinymce" placeholder="This is a test placeholder. Very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very long placeholder."></textarea>
<h2>Editor placeholder set in editor.settings</h2>
<div id="tinymce-custom-placeholder"></div>
<h2>Tinymce placeholder with custom style</h2>
<textarea id="tinymce-custom-style" placeholder="This is a test placeholder."></textarea>
</body>
</html>