Ticket #7886: 7886.html

File 7886.html, 3.4 KB (added by Garry Yao, 13 years ago)

Reproducing sample page

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<!--
3Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.html or http://ckeditor.com/license
5-->
6<html xmlns="http://www.w3.org/1999/xhtml">
7<head>
8        <title>A Reduced Table Dialog &mdash; CKEditor Sample</title>
9        <meta content="text/html; charset=utf-8" http-equiv="content-type" />
10        <!-- CKReleaser %REMOVE_LINE%
11        <script type="text/javascript" src="../ckeditor.js"></script>
12        CKReleaser %REMOVE_START% -->
13        <script type="text/javascript" src="../ckeditor_source.js"></script>
14        <!-- CKReleaser %REMOVE_END% -->
15        <script src="sample.js" type="text/javascript"></script>
16        <link href="sample.css" rel="stylesheet" type="text/css" />
17        <style id="styles" type="text/css">
18
19                .cke_button_myDialogCmd .cke_icon
20                {
21                        display: none !important;
22                }
23
24                .cke_button_myDialogCmd .cke_label
25                {
26                        display: inline !important;
27                }
28
29        </style>
30        <script type="text/javascript">
31        //<![CDATA[
32
33// When opening a dialog, its "definition" is created for it, for
34// each editor instance. The "dialogDefinition" event is then
35// fired. We should use this event to make customizations to the
36// definition of existing dialogs.
37CKEDITOR.on( 'dialogDefinition', function( ev )
38        {
39                // Take the dialog name and its definition from the event
40                // data.
41                var dialogName = ev.data.name;
42                var dialogDefinition = ev.data.definition;
43
44                // Check if the definition is from the dialog we're
45                // interested on (the "Link" dialog).
46                if ( dialogName == 'table' || dialogName == 'tableProperties' )
47                {
48                        dialogDefinition.removeContents( 'advanced' )
49                        var infoTab = dialogDefinition.getContents( 'info' );
50                        infoTab.remove( 'txtBorder' );
51                }
52        });
53
54        //]]>
55        </script>
56
57</head>
58<body>
59        <h1 class="samples">
60                CKEditor Sample &mdash; Using CKEditor Dialog API
61        </h1>
62
63        <!-- This <div> holds alert messages to be display in the sample page. -->
64        <div id="alerts">
65                <noscript>
66                        <p>
67                                <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
68                                support, like yours, you should still see the contents (HTML data) and you should
69                                be able to edit it normally, without a rich editor interface.
70                        </p>
71                </noscript>
72        </div>
73        <!-- This <fieldset> holds the HTML that you will usually find in your
74             pages. -->
75        <textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
76        <script type="text/javascript">
77                //<![CDATA[
78                        // Replace the <textarea id="editor1"> with an CKEditor instance.
79                        var editor = CKEDITOR.replace( 'editor1',
80                                {
81                                        extraPlugins : 'showborders',
82                                        // Defines a simpler toolbar to be used in this sample.
83                                        // Note that we have added out "MyButton" button here.
84                                        toolbar : [ [ 'Source', '-', 'Table' ] ]
85                                });
86                //]]>
87        </script>
88        <div id="footer">
89                <hr />
90                <p>
91                        CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
92                </p>
93                <p id="copy">
94                        Copyright &copy; 2003-2011, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
95                        Knabben. All rights reserved.
96                </p>
97        </div>
98</body>
99</html>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy