Ticket #3764: blocksSample.html

File blocksSample.html, 1.3 KB (added by Damian, 15 years ago)
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2<html>
3<head>
4        <title>Test</title>     
5        <script type="text/javascript" src="http://nightly.ckeditor.com/ckeditor/ckeditor_source.js"></script>
6
7        <script type="text/javascript"> 
8                var instance = null;
9
10                function newEditor(){
11                        instance = CKEDITOR.appendTo( 'container' );
12                        var container = document.getElementById('container');
13                        container.style.display="";
14                }
15
16    function hideEditor(){
17      var container = document.getElementById('container');
18      container.style.display="none";
19    }
20   
21    function showEditor(){
22      var div1 = document.getElementById('container');
23      div1.style.display="";
24    }
25   
26    function setData(){
27      var t3 = document.getElementById('t3');
28      var html = t3.value;
29      instance.setData(html);
30    }
31   
32        </script>
33
34</head>
35<body onLoad="newEditor();">
36   <div id="buttons">
37    <input type="button" onClick="return hideEditor();" value="Hide Editor"></input>
38    <input type="button" onClick="return showEditor();" value="Show Editor"></input>
39    <input type="button" onClick="return setData();" value="Set Data on Editor"></input>
40   </div>       
41  <div id="container"></div>
42  <textarea id="t3" style="width:500px; height:250px"> Test data </textarea>
43</body>
44</html>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy