code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>CKEditor Samples</title> <meta content="text/html; charset=utf-8" http-equiv="content-type" /> <link type="text/css" rel="stylesheet" href="sample.css" /> </head> <body> <h1 class="samples"> CKEditor Samples Site </h1> <h2 class="samples"> Basic Samples </h2> <ul class="samples"> <li> <a class="samples" href="replacebyclass.html">Replace textarea elements by class name</a><br /> Automatic replacement of all textarea elements of a given class with a CKEditor instance. </li> <li><a class="samples" href="replacebycode.html">Replace textarea elements by code</a><br /> Replacement of textarea elements with CKEditor instances by using a JavaScript call. </li> <li><a class="samples" href="fullpage.html">Full page support with the Document Properties plugin</a><br /> CKEditor inserted with a JavaScript call and used to edit the whole page from <code>&lt;html&gt;</code> to <code>&lt;/html&gt;</code>. </li> </ul> <h2 class="samples"> Basic Customization </h2> <ul class="samples"> <li><a class="samples" href="skins.html">Skins</a><br /> Changing the CKEditor skin by adjusting a single configuration option. </li> <li><a class="samples" href="ui_color.html">User Interface color</a><br /> Changing CKEditor User Interface color and adding a toolbar button that lets the user set the UI color. </li> <li><a class="samples" href="ui_languages.html">User Interface languages</a><br /> Changing CKEditor User Interface language and adding a drop-down list that lets the user choose the UI language. </li> </ul> <h2 class="samples"> Advanced Samples </h2> <ul class="samples"> <li><a class="samples" href="divreplace.html">Replace DIV elements on the fly</a><br /> Transforming a <code>div</code> element into an instance of CKEditor with a mouse click. </li> <li><a class="samples" href="ajax.html">Create and destroy editor instances for Ajax applications</a><br /> Creating and destroying CKEditor instances on the fly and saving the contents entered into the editor window. </li> <li><a class="samples" href="api.html">Basic usage of the API</a><br /> Using the CKEditor JavaScript API to interact with the editor at runtime. </li> <li><a class="samples" href="api_dialog.html">Using the JavaScript API to customize dialog windows</a><br /> Using the dialog windows API to customize dialog windows without changing the original editor code. </li> <li><a class="samples" href="enterkey.html">Using the "Enter" key in CKEditor</a><br /> Configuring the behavior of <em>Enter</em> and <em>Shift+Enter</em> keys. </li> <li><a class="samples" href="sharedspaces.html">Shared toolbars</a><br /> Displaying multiple editor instances that share the toolbar and/or the elements path. </li> <li><a class="samples" href="jqueryadapter.html">jQuery adapter example</a><br /> Using the jQuery adapter to configure CKEditor. </li> <li><a class="samples" href="output_xhtml.html">Output XHTML</a><br /> Configuring CKEditor to produce XHTML 1.1 compliant code. </li> <li><a class="samples" href="output_html.html">Output HTML</a><br /> Configuring CKEditor to produce legacy HTML 4 code. </li> <li><a class="samples" href="output_for_flash.html">Output for Flash</a><br /> Configuring CKEditor to produce HTML code that can be used with Adobe Flash. </li> <li><a class="samples" href="readonly.html">Read-only mode</a><br /> Using the readOnly API to block introducing changes to the editor contents. </li> </ul> <h2 class="samples"> Additional plugins </h2> <ul class="samples"> <li><a class="samples" href="autogrow.html">AutoGrow plugin</a><br /> Using the AutoGrow plugin in order to make the editor grow to fit the size of its content. </li> <li><a class="samples" href="bbcode.html">Output for BBCode</a><br /> Configuring CKEditor to produce BBCode tags instead of HTML. </li> <li><a class="samples" href="stylesheetparser.html">Stylesheet Parser plugin</a><br /> Using the Stylesheet Parser plugin to fill the Styles drop-down list based on the CSS classes available in the document stylesheet. </li> <li><a class="samples" href="devtools.html">Developer Tools plugin</a><br /> Using the Developer Tools plugin to display information about dialog window UI elements to allow for easier customization. </li> <li><a class="samples" href="placeholder.html">Placeholder plugin</a><br /> Using the Placeholder plugin to create uneditable sections that can only be created and modified with a proper dialog window. </li> <li><a class="samples" href="tableresize.html">TableResize plugin</a><br /> Using the TableResize plugin to enable table column resizing. </li> </ul> <div id="footer"> <hr /> <p> CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a> </p> <p id="copy"> Copyright &copy; 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved. </p> </div> </body> </html>
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_samples/index.html
HTML
gpl3
5,543
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ html, body, h1, h2, h3, h4, h5, h6, div, span, blockquote, p, address, form, fieldset, img, ul, ol, dl, dt, dd, li, hr, table, td, th, strong, em, sup, sub, dfn, ins, del, q, cite, var, samp, code, kbd, tt, pre { line-height: 1.5em; } body { padding:10px 30px; } input, textarea, select, option, optgroup, button, td, th { font-size: 100%; } pre, code, kbd, samp, tt{ font-family: monospace,monospace; font-size: 1em; } h1.samples { color:#0782C1; font-size:200%; font-weight:normal; margin: 0; padding: 0; } h2.samples { color:#000000; font-size:130%; margin: 0; padding: 0; } p, blockquote, address, form, pre, dl, h1.samples, h2.samples { margin-bottom:15px; } ul.samples { margin-bottom:15px; } .clear { clear:both; } fieldset { margin: 0; padding: 10px; } body, input, textarea { color: #333333; font-family: Arial, Helvetica, sans-serif; } body { font-size: 75%; } a.samples { color:#189DE1; text-decoration:none; } a.samples:hover { text-decoration:underline; } form { margin: 0; padding: 0; } pre.samples { background-color: #F7F7F7; border: 1px solid #D7D7D7; overflow: auto; padding: 0.25em; } #alerts { color: Red; } #footer hr { margin: 10px 0 15px 0; height: 1px; border: solid 1px gray; border-bottom: none; } #footer p { margin: 0 10px 10px 10px; float: left; } #footer #copy { float: right; } #outputSample { width: 100%; table-layout: fixed; } #outputSample thead th { color: #dddddd; background-color: #999999; padding: 4px; white-space: nowrap; } #outputSample tbody th { vertical-align: top; text-align: left; } #outputSample pre { margin: 0; padding: 0; white-space: pre; /* CSS2 */ white-space: -moz-pre-wrap; /* Mozilla*/ white-space: -o-pre-wrap; /* Opera 7 */ white-space: pre-wrap; /* CSS 2.1 */ white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */ word-wrap: break-word; /* IE */ } .description { border: 1px dotted #B7B7B7; margin-bottom: 10px; padding: 10px 10px 0; } label { display: block; margin-bottom:6px; } .cke_dialog label { display: inline; margin-bottom: auto; }
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_samples/sample.css
CSS
gpl3
2,421
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>UI Color Picker &mdash; CKEditor Sample</title> <meta content="text/html; charset=utf-8" http-equiv="content-type" /> <script type="text/javascript" src="../ckeditor.js"></script> <script src="sample.js" type="text/javascript"></script> <link href="sample.css" rel="stylesheet" type="text/css" /> </head> <body> <h1 class="samples"> CKEditor Sample &mdash; UI Color Picker </h1> <div class="description"> <p> This sample shows how to automatically replace <code>&lt;textarea&gt;</code> elements with a CKEditor instance with an option to change the color of its user interface. </p> <h2 class="samples">Setting the User Interface Color</h2> <p> To specify the color of the user interface, set the <code>uiColor</code> property: </p> <pre class="samples">CKEDITOR.replace( '<em>textarea_id</em>', { <strong>uiColor: '#EE0000'</strong> });</pre> <p> Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of the <code>&lt;textarea&gt;</code> element to be replaced. </p> <h2 class="samples">Enabling the Color Picker</h2> <p> If the <strong>uicolor</strong> plugin along with the dedicated <strong>UIColor</strong> toolbar button is added to CKEditor, the user will also be able to pick the color of the UI from the color palette available in the <strong>UI Color Picker</strong> dialog window. </p> <p> To insert a CKEditor instance with the <strong>uicolor</strong> plugin enabled, use the following JavaScript call: </p> <pre class="samples">CKEDITOR.replace( '<em>textarea_id</em>', { <strong>extraPlugins : 'uicolor',</strong> toolbar : [ [ 'Bold', 'Italic' ], [ <strong>'UIColor'</strong> ] ] });</pre> </div> <!-- This <div> holds alert messages to be display in the sample page. --> <div id="alerts"> <noscript> <p> <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript support, like yours, you should still see the contents (HTML data) and you should be able to edit it normally, without a rich editor interface. </p> </noscript> </div> <p> Click the <strong>UI Color Picker</strong> button to test your color preferences at runtime. </p> <p> The first editor instance includes the <strong>UI Color Picker</strong> toolbar button, but the default UI color is not defined, so the editor uses the skin color. </p> <form action="sample_posteddata.php" method="post"> <p> <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> <script type="text/javascript"> //<![CDATA[ // Replace the <textarea id="editor"> with an CKEditor // instance, using default configurations. CKEDITOR.replace( 'editor1', { extraPlugins : 'uicolor', toolbar : [ [ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ], [ 'UIColor' ] ] }); //]]> </script> </p> <p> The second editor instance includes the <strong>UI Color Picker</strong> toolbar button. The default UI color was defined, so the skin color is not used. </p> <p> <textarea cols="80" id="editor2" name="editor2" 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> <script type="text/javascript"> //<![CDATA[ // Replace the <textarea id="editor"> with an CKEditor // instance, using default configurations. CKEDITOR.replace( 'editor2', { extraPlugins : 'uicolor', uiColor: '#14B8C4', toolbar : [ [ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ], [ 'UIColor' ] ] } ); //]]> </script> </p> <p> <input type="submit" value="Submit" /> </p> </form> <div id="footer"> <hr /> <p> CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a> </p> <p id="copy"> Copyright &copy; 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved. </p> </div> </body> </html>
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_samples/ui_color.html
HTML
gpl3
4,720
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Using API to Customize Dialog Windows &mdash; CKEditor Sample</title> <meta content="text/html; charset=utf-8" http-equiv="content-type" /> <script type="text/javascript" src="../ckeditor.js"></script> <script src="sample.js" type="text/javascript"></script> <link href="sample.css" rel="stylesheet" type="text/css" /> <style id="styles" type="text/css"> .cke_button_myDialogCmd .cke_icon { display: none !important; } .cke_button_myDialogCmd .cke_label { display: inline !important; } </style> <script type="text/javascript"> //<![CDATA[ // When opening a dialog, its "definition" is created for it, for // each editor instance. The "dialogDefinition" event is then // fired. We should use this event to make customizations to the // definition of existing dialogs. CKEDITOR.on( 'dialogDefinition', function( ev ) { // Take the dialog name and its definition from the event // data. var dialogName = ev.data.name; var dialogDefinition = ev.data.definition; // Check if the definition is from the dialog we're // interested on (the "Link" dialog). if ( dialogName == 'link' ) { // Get a reference to the "Link Info" tab. var infoTab = dialogDefinition.getContents( 'info' ); // Add a text field to the "info" tab. infoTab.add( { type : 'text', label : 'My Custom Field', id : 'customField', 'default' : 'Sample!', validate : function() { if ( /\d/.test( this.getValue() ) ) return 'My Custom Field must not contain digits'; } }); // Remove the "Link Type" combo and the "Browser // Server" button from the "info" tab. infoTab.remove( 'linkType' ); infoTab.remove( 'browse' ); // Set the default value for the URL field. var urlField = infoTab.get( 'url' ); urlField['default'] = 'www.example.com'; // Remove the "Target" tab from the "Link" dialog. dialogDefinition.removeContents( 'target' ); // Add a new tab to the "Link" dialog. dialogDefinition.addContents({ id : 'customTab', label : 'My Tab', accessKey : 'M', elements : [ { id : 'myField1', type : 'text', label : 'My Text Field' }, { id : 'myField2', type : 'text', label : 'Another Text Field' } ] }); // Rewrite the 'onFocus' handler to always focus 'url' field. dialogDefinition.onFocus = function() { var urlField = this.getContentElement( 'info', 'url' ); urlField.select(); }; } }); //]]> </script> </head> <body> <h1 class="samples"> CKEditor Sample &mdash; Using CKEditor Dialog API </h1> <div class="description"> <p> This sample shows how to use the <a class="samples" href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.html">CKEditor Dialog API</a> to customize CKEditor dialog windows without changing the original editor code. The following customizations are being done in the example below: </p> <ol> <li><strong>Adding dialog window tabs</strong> &ndash; "My Tab" in the "Link" dialog window.</li> <li><strong>Removing a dialog window tab</strong> &ndash; "Target" tab from the "Link" dialog window.</li> <li><strong>Adding dialog window fields</strong> &ndash; "My Custom Field" in the "Link" dialog window.</li> <li><strong>Removing dialog window fields</strong> &ndash; "Link Type" and "Browse Server" in the "Link" dialog window.</li> <li><strong>Setting default values for dialog window fields</strong> &ndash; "URL" field in the "Link" dialog window. </li> <li><strong>Creating a custom dialog window</strong> &ndash; "My Dialog" dialog window opened with the "My Dialog" toolbar button.</li> </ol> <p> For details on how to create this setup check the source code of this sample page. </p> </div> <!-- This <div> holds alert messages to be display in the sample page. --> <div id="alerts"> <noscript> <p> <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript support, like yours, you should still see the contents (HTML data) and you should be able to edit it normally, without a rich editor interface. </p> </noscript> </div> <!-- This <fieldset> holds the HTML that you will usually find in your pages. --> <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> <script type="text/javascript"> //<![CDATA[ // Replace the <textarea id="editor1"> with an CKEditor instance. var editor = CKEDITOR.replace( 'editor1', { // Defines a simpler toolbar to be used in this sample. // Note that we have added out "MyButton" button here. toolbar : [ [ 'Source', '-', 'Bold', 'Italic', 'Underline', 'Strike','-','Link', '-', 'MyButton' ] ] }); // Listen for the "pluginsLoaded" event, so we are sure that the // "dialog" plugin has been loaded and we are able to do our // customizations. editor.on( 'pluginsLoaded', function( ev ) { // If our custom dialog has not been registered, do that now. if ( !CKEDITOR.dialog.exists( 'myDialog' ) ) { // We need to do the following trick to find out the dialog // definition file URL path. In the real world, you would simply // point to an absolute path directly, like "/mydir/mydialog.js". var href = document.location.href.split( '/' ); href.pop(); href.push( 'api_dialog', 'my_dialog.js' ); href = href.join( '/' ); // Finally, register the dialog. CKEDITOR.dialog.add( 'myDialog', href ); } // Register the command used to open the dialog. editor.addCommand( 'myDialogCmd', new CKEDITOR.dialogCommand( 'myDialog' ) ); // Add the a custom toolbar buttons, which fires the above // command.. editor.ui.addButton( 'MyButton', { label : 'My Dialog', command : 'myDialogCmd' } ); }); //]]> </script> <div id="footer"> <hr /> <p> CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a> </p> <p id="copy"> Copyright &copy; 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved. </p> </div> </body> </html>
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_samples/api_dialog.html
HTML
gpl3
6,907
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Changelog &mdash; CKEditor</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <style type="text/css"> #footer hr { margin: 10px 0 15px 0; height: 1px; border: solid 1px gray; border-bottom: none; } #footer p { margin: 0 10px 10px 10px; float: left; } #footer #copy { float: right; } </style> </head> <body> <h1> CKEditor Changelog </h1> <h3> CKEditor 3.6.3</h3> <p> New features:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/7430">#7430</a> : Justify commands now perform alignment on the element when an image is selected.</li> <li><a href="http://dev.ckeditor.com/ticket/8706">#8706</a> : Better ARIA accessibility for the color picker dialog window.</li> <li><a href="http://dev.ckeditor.com/ticket/7366">#7366</a> : Editor paste function is now available on browser toolbar and context menu.</li> </ul> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/8634">#8634</a> : [IE] Command execution always returns <code>true</code> in IE browsers.</li> <li><a href="http://dev.ckeditor.com/ticket/8333">#8333</a> : Dialog windows can now be closed with the <em>Esc</em> key even if there is no Cancel button available.</li> <li><a href="http://dev.ckeditor.com/ticket/8644">#8644</a> : Missing variable declaration in the dialog plugin.</li> <li><a href="http://dev.ckeditor.com/ticket/8699">#8699</a> : Focus is now moved to the clicked button and back to color picker dialog window opener (button) in all browsers after the dialog window is closed.</li> <li><a href="http://dev.ckeditor.com/ticket/8132">#8132</a> : [IE9] Link line gets broken when it contains a <code>br</code> tag.</li> <li><a href="http://dev.ckeditor.com/ticket/8629">#8629</a> : Optimize float panel layout when there is not enough space in the viewport.</li> <li><a href="http://dev.ckeditor.com/ticket/7955">#7955</a> : [FF] <em>Page Up</em> and <em>Page Down</em> in the WYSIWYG mode cause the selection to become lost.</li> <li><a href="http://dev.ckeditor.com/ticket/8698">#8698</a> : <em>Esc</em> key does not close the color picker dialog window.</li> <li><a href="http://dev.ckeditor.com/ticket/8413">#8413</a> : HTML comment nodes break content styling in tables.</li> <li><a href="http://dev.ckeditor.com/ticket/7932">#7932</a>, <a href="http://dev.ckeditor.com/ticket/8643">#8643</a> : [IE] Clicking below the content region scrolls the page to the top.</li> <li><a href="http://dev.ckeditor.com/ticket/5538">#5538</a>, <a href="http://dev.ckeditor.com/ticket/8729">#8729</a> : [IE] Focus jump results in incorrect context menu display.</li> <li><a href="http://dev.ckeditor.com/ticket/6359">#6359</a> : [IE] Selectable area in blank WYSIWYG editor is too small.</li> <li><a href="http://dev.ckeditor.com/ticket/7326">#7326</a>, <a href="http://dev.ckeditor.com/ticket/8074">#8074</a> : [FF] Scrolling does not work correctly in editor with large amount of text.</li> <li><a href="http://dev.ckeditor.com/ticket/8630">#8630</a> : HTML events are now disabled when loading data.</li> <li><a href="http://dev.ckeditor.com/ticket/8433">#8433</a> : [IE9] Use W3C event model.</li> <li><a href="http://dev.ckeditor.com/ticket/8691">#8691</a> : [IE] Pasting invalid HTML crashes the browser.</li> <li><a href="http://dev.ckeditor.com/ticket/8345">#8345</a> : [IE] Selection is not properly restored after closing the Link dialog window.</li> <li><a href="http://dev.ckeditor.com/ticket/6308">#6308</a> : Vertical-only resize imposes fixed width on editor chrome.</li> <li><a href="http://dev.ckeditor.com/ticket/7360">#7360</a> : [WebKit] WYSIWYG area sometimes does not resize with the chrome.</li> <li><a href="http://dev.ckeditor.com/ticket/5527">#5527</a> : Do not encode the <code>#</code> character sent from the file browser.</li> <li><a href="http://dev.ckeditor.com/ticket/8014">#8014</a> : Autogrow now stretches to fit the content when switching editor modes.</li> <li><a href="http://dev.ckeditor.com/ticket/8249">#8249</a> : Inconsistent behavior with the <em>Backspace</em> key used at the start of a list item.</li> <li><a href="http://dev.ckeditor.com/ticket/8617">#8617</a> : [WebKit] Selection becomes broken after an inline style is opened.</li> <li><a href="http://dev.ckeditor.com/ticket/8527">#8527</a> : Insertion with cursor before an empty anchor is error-prone.</li> <li><a href="http://dev.ckeditor.com/ticket/8632">#8632</a> : Cursor panic when the <em>Backspace</em> key is used in a list item.</li> <li><a href="http://dev.ckeditor.com/ticket/8455">#8455</a> : Mousedown focus is too agressive.</li> <li><a href="http://dev.ckeditor.com/ticket/8475">#8475</a> : Issue with deleting elements with inline styling in tables.</li> <li><a href="http://dev.ckeditor.com/ticket/8324">#8324</a> : [IE8] Undo generates an error when a control type element is selected.</li> <li><a href="http://dev.ckeditor.com/ticket/7946">#7946</a> : Find and Replace dialog window result does not scroll into view when the editor is off the viewport.</li> <li><a href="http://dev.ckeditor.com/ticket/8157">#8157</a> : Flash/IFrame dialog window cannot be closed when displayed over Flash/IFrame with <code>dialog_startupFocusTab</code> set to <code>true</code>.</li> <li><a href="http://dev.ckeditor.com/ticket/8305">#8305</a> : Text direction lost when converting a paragraph to a list.</li> <li><a href="http://dev.ckeditor.com/ticket/8379">#8379</a> : The cursor moves to the start of the document when inserting a row or column is undone.</li> <li><a href="http://dev.ckeditor.com/ticket/6666">#6666</a> : Removed references to <code>element.all</code>.</li> <li><a href="http://dev.ckeditor.com/ticket/8732">#8732</a> : Issue when <code>CKEDITOR.range::enlarge</code> passes through comment nodes.</li> <li><a href="http://dev.ckeditor.com/ticket/7492">#7492</a> : The Style system can now use overrides with the same element (change classes instead of nesting).</li> <li><a href="http://dev.ckeditor.com/ticket/6111">#6111</a> : Splitting table cells results in incorrect column spans.</li> <li><a href="http://dev.ckeditor.com/ticket/8247">#8247</a> : [IE] Error when aligning a document with page breaks inside of contents.</li> <li><a href="http://dev.ckeditor.com/ticket/8540">#8540</a> : Orphan texts inside a list or table are now properly fixed.</li> <li><a href="http://dev.ckeditor.com/ticket/8774">#8774</a> : The Entities plugin can now be configured to only output XML entities.</li> <li><a href="http://dev.ckeditor.com/ticket/8602">#8602</a> : Image source is now properly hidden when running data through the data processor.</li> <li><a href="http://dev.ckeditor.com/ticket/8812">#8812</a> : [IE] Issues with the native range translation with comments in the DOM.</li> <li><a href="http://dev.ckeditor.com/ticket/7907">#7907</a> : Decreasing indentation of a RTL block in a list item loses text direction.</li> <li><a href="http://dev.ckeditor.com/ticket/8835">#8835</a> : Right margin on IE&lt;8 removed to avoid mouse click confusion.</li> <li><a href="http://dev.ckeditor.com/ticket/8400">#8400</a> : [IE] Script error when closing the Cell Properties dialog window if the table cell text is selected.</li> <li><a href="http://dev.ckeditor.com/ticket/8248">#8248</a> : [IE8] Issues with <em>Backspace</em> and <em>Del</em> keys when used at the start or end of list items.</li> <li><a href="http://dev.ckeditor.com/ticket/8855">#8855</a> : [Chrome] Issue with the popup window size in Chrome 18 makes it impossible to view the file browser window.</li> <li><a href="http://dev.ckeditor.com/ticket/8407">#8407</a> : Unneeded <code>aria-posinset</code> and <code>aria-setsize</code> for a list block are now removed.</li> <li><a href="http://dev.ckeditor.com/ticket/8701">#8701</a> : Highlight field in the color picker does not show the correct color when keyboard navigation is used.</li> <li><a href="http://dev.ckeditor.com/ticket/8509">#8509</a> : Table height gets copied from the width value when the Advanced tab is hidden.</li> <li><a href="http://dev.ckeditor.com/ticket/8432">#8432</a> : [IE8] <code>openDialog('image')</code> error.</li> <li><a href="http://dev.ckeditor.com/ticket/8493">#8493</a> : [IE] It is impossible to add a link to the selected text.</li> <li><a href="http://dev.ckeditor.com/ticket/8528">#8528</a> : Redundant <code>imagePreviewBoxId</code> in the Image Properties dialog window is now removed.</li> <li><a href="http://dev.ckeditor.com/ticket/8864">#8864</a> : [IE] Fix ARIA presentation of toolbar rich combo in JAWS.</li> <li><a href="http://dev.ckeditor.com/ticket/8459">#8459</a> : Fix wrong undo step on enter key.</li> <li><a href="http://dev.ckeditor.com/ticket/8895">#8895</a> : Editing anchors using the Link dialog window could not work in release version.</li> <li><a href="http://dev.ckeditor.com/ticket/8876">#8876</a> : &lt;link&gt; element in the floating panels have been moved to &lt;head&gt;.</li> <li>Updated the following language files as submitted to the <a href="https://www.transifex.net/projects/p/ckeditor/">CKEditor UI Translation Center</a>: Arabic, Bulgarian, Chinese, Croatian, Czech, Danish, Dutch, Esperanto, Estonian, Faroese, French, German, Greek, Gujarati, Hindi, Italian, Macedonian, Norwegian (Bokmål and Nynorsk), Polish, Portuguese, Turkish, Uighur, Ukrainian, Vietnamese, Welsh.</li> </ul> <h3> CKEditor 3.6.2</h3> <p> New features:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/6089">#6089</a> : The editor is now enabled on iOS 5 (iPad and iPhone).</li> <li><a href="http://dev.ckeditor.com/ticket/6089">#7354</a> : It is now possible to exit from blockquotes by using the <em>Enter</em> key on empty paragraphs.</li> <li><a href="http://dev.ckeditor.com/ticket/7931">#7931</a> : The <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#event:mode">mode</a></code> event now carries the previous editor mode.</li> <li><a href="http://dev.ckeditor.com/ticket/6161">#6161</a> : New <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.autoGrow_onStartup">autoGrow_onStartup</a></code> configuration option.</li> <li><a href="http://dev.ckeditor.com/ticket/8052">#8052</a> : <code>autogrow</code> is now available as an editor <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#execCommand">command</a>.</li> <li><a href="http://dev.ckeditor.com/ticket/3457">#3457</a> : It is now possible to edit the contents of <code>&lt;textarea&gt;</code> elements through the dialog window.</li> <li><a href="http://dev.ckeditor.com/ticket/8242">#8242</a> : The "&raquo;" character is now added to the Special Character dialog window.</li> </ul> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/8171">#8171</a>, <a href="http://dev.ckeditor.com/ticket/8172">#8172</a> : Updated links to WebSpellChecker.net.</li> <li><a href="http://dev.ckeditor.com/ticket/8155">#8155</a> : Tooltips in the Special Character dialog window corrected.</li> <li><a href="http://dev.ckeditor.com/ticket/8163">#8163</a> : The name of the <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.filebrowserWindowFeatures">filebrowserWindowFeatures</a></code> configuration setting corrected to match the documented name.</li> <li><a href="http://dev.ckeditor.com/ticket/8124">#8124</a> : The Style fields in Advanced dialog window tabs are now validated according to CSS style attribute syntax.</li> <li><a href="http://dev.ckeditor.com/ticket/8025">#8025</a> : The checkboxes in the Find and Replace dialog window are now part of a fieldset.</li> <li><a href="http://dev.ckeditor.com/ticket/7943">#7943</a> : CSS conflict no longer appears when the page styles set the <code>float</code> property of <code>label</code> elements.</li> <li><a href="http://dev.ckeditor.com/ticket/8016">#8016</a> : [WebKit] Flash content is not visible when previewing content.</li> <li><a href="http://dev.ckeditor.com/ticket/6908">#6908</a> : Text color should always be applied to the linked text.</li> <li><a href="http://dev.ckeditor.com/ticket/7619">#7619</a> : [IE] IFrame shim now consolidates the editor dialog window to avoid having it masked by embedded objects.</li> <li><a href="http://dev.ckeditor.com/ticket/7900">#7900</a> : [FF] Copy/Paste operations for table cells no longer break the Table Properties dialog window.</li> <li><a href="http://dev.ckeditor.com/ticket/7243">#7243</a> : Inline JavaScript events may become corrupted.</li> <li><a href="http://dev.ckeditor.com/ticket/7448">#7448</a> : List creation in RTL blocks is wrongly merged with the above LTR block.</li> <li><a href="http://dev.ckeditor.com/ticket/6957">#6957</a> : Highlighting of searched terms does not reach read-only blocks.</li> <li><a href="http://dev.ckeditor.com/ticket/7948">#7948</a> : Tooltips with information about correct length units are now displayed for the Width/Height fields of the Table Properties dialog window.</li> <li><a href="http://dev.ckeditor.com/ticket/6212">#6212</a> : [WebKit] Editor resize may scroll the host page.</li> <li><a href="http://dev.ckeditor.com/ticket/6540">#6540</a> : [Safari] Editor loses focus on resizing.</li> <li><a href="http://dev.ckeditor.com/ticket/7908">#7908</a> : [IE] Unlink command is sometimes missing from the context menu of a link.</li> <li><a href="http://dev.ckeditor.com/ticket/8159">#8159</a> : Editor fails to load if the browser has no default language set.</li> <li><a href="http://dev.ckeditor.com/ticket/7490">#7490</a> : [IE] Block format leaks to the next unselected line when <code>enterMode</code> is set to <code>BR</code>.</li> <li><a href="http://dev.ckeditor.com/ticket/8087">#8087</a> : Indenting list items may add redundant text direction attributes.</li> <li><a href="http://dev.ckeditor.com/ticket/6200">#6200</a> : Add styling for certain dialog window element types that miss focus outline (like checkbox).</li> <li><a href="http://dev.ckeditor.com/ticket/7894">#7894</a> : Fault tolerance when parsing a malformed link.</li> <li><a href="http://dev.ckeditor.com/ticket/8049">#8049</a> : Bullets/Numbers are invisible for list items with LTR text direction.</li> <li><a href="http://dev.ckeditor.com/ticket/8222">#8222</a> : [IE] Incorrect selection locking after opening a dialog window in some cases.</li> <li><a href="http://dev.ckeditor.com/ticket/7002">#7002</a> : [IE] Undo operation when a table is selected results in an error.</li> <li><a href="http://dev.ckeditor.com/ticket/8232">#8232</a> : [IE] Unable to apply inline style that starts at the end of a link text.</li> <li><a href="http://dev.ckeditor.com/ticket/7153">#7153</a> : Fail to load the source version of the editor after the window is loaded.</li> <li><a href="http://dev.ckeditor.com/ticket/8246">#8246</a> : Bad editing performance on certain document contents.</li> <li><a href="http://dev.ckeditor.com/ticket/7912">#7912</a> : Cursor trapped in an invisible element after pressing the <em>Enter</em> key.</li> <li><a href="http://dev.ckeditor.com/ticket/7645">#7645</a> : Full list or table deletion with the <em>Backspace/Delete</em> key.</li> <li><a href="http://dev.ckeditor.com/ticket/8050">#8050</a> : AutoGrow feature better fits the content styles.</li> <li><a href="http://dev.ckeditor.com/ticket/8349">#8349</a> : [IE9] Larger toolbar top offset on HTML5 pages.</li> <li><a href="http://dev.ckeditor.com/ticket/8352">#8352</a> : [IE9] Toolbar wrapping is incorrect.</li> <li><a href="http://dev.ckeditor.com/ticket/8080">#8080</a> : JavaScript error when inserting a new table row.</li> <li>Updated the following language files:<ul> <li><a href="http://dev.ckeditor.com/ticket/8263">#8263</a> : Dutch;</li> <li><a href="http://dev.ckeditor.com/ticket/8238">#8238</a> : Estonian;</li> <li><a href="http://dev.ckeditor.com/ticket/8193">#8193</a> : Finnish;</li> <li>German;</li> <li>Hebrew;</li> <li><a href="http://dev.ckeditor.com/ticket/8179">#8179</a> : Hungarian;</li> <li><a href="http://dev.ckeditor.com/ticket/8128">#8128</a> : Italian;</li> <li><a href="http://dev.ckeditor.com/ticket/8371">#8371</a> : Lithuanian;</li> <li><a href="http://dev.ckeditor.com/ticket/8126">#8126</a>, <a href="http://dev.ckeditor.com/ticket/8256">#8256</a> : Norwegian (Bokmal and Nynorsk);</li> <li><a href="http://dev.ckeditor.com/ticket/8356">#8356</a> : Persian;</li> <li>Polish;</li> <li>Portuguese (Brazil);</li> <li><a href="http://dev.ckeditor.com/ticket/8151">#8151</a>, <a href="http://dev.ckeditor.com/ticket/8298">#8298</a> : Russian;</li> <li>Spanish;</li> </ul></li> </ul> <h3> CKEditor 3.6.1</h3> <p> New features:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/4556">#4556</a> : Initial support for HTML5 elements.</li> <li><a href="http://dev.ckeditor.com/ticket/6492">#6492</a> : The Find/Replace dialog window will now be populated with text selected in the editor.</li> <li><a href="http://dev.ckeditor.com/ticket/7323">#7323</a> : New <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.definition.uiElement.html#align">align</a></code> property in dialog window UI elements for field alignment.</li> <li><a href="http://dev.ckeditor.com/ticket/6462">#6462</a> : A wider range of CSS length units (like pt and percentage) are now supported in related dialog window fields.</li> <li><a href="http://dev.ckeditor.com/ticket/7911">#7911</a> : New Remove Anchor option is now available in the context menu.</li> <li><a href="http://dev.ckeditor.com/ticket/7387">#7387</a> : Allow <code>styleDefinition</code> to be applied to a set of elements.</li> <li><a href="http://dev.ckeditor.com/ticket/4345">#4345</a> : A new <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#event:langLoaded">langLoaded</a></code> event added to <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html">CKEDITOR.editor</a></code> in order to make it possible to perform "by code" language updates.</li> <li><a href="http://dev.ckeditor.com/ticket/7959">#7959</a> : The cursor will now blink in the first cell after a table is inserted.</li> <li><a href="http://dev.ckeditor.com/ticket/7885">#7885</a> : New <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#removeMenuItem">editor::removeMenuItem</a></code> API for removing plugin context menu items introduced.</li> <li><a href="http://dev.ckeditor.com/ticket/7991">#7991</a> : Introduce the <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.definition.labeledElement.html#controlStyle">controlStyle</a></code> and <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.definition.labeledElement.html#inputStyle">inputStyle</a></code> definitions to allow fine-grained controlling of dialog window element styles.</li> </ul> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/7914">#7914</a> : <strong>ATTENTION!</strong> The signature for the <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#setReadOnly">setReadOnly()</a></code> function has been changed, reversing the meaning of the parameter to be passed to it. Please make sure to update your code when upgrading.</li> <li><a href="http://dev.ckeditor.com/ticket/7657">#7657</a> : Wrong margin mirroring when creating a list from RTL paragraphs.</li> <li><a href="http://dev.ckeditor.com/ticket/7620">#7620</a> : A glitch in list pasting from Microsoft Word caused by broken child references when filtering.</li> <li><a href="http://dev.ckeditor.com/ticket/7811">#7811</a> : [IE] Deleting table row throws a JavaScript error.</li> <li><a href="http://dev.ckeditor.com/ticket/6962">#6962</a> : Changed the <code>CKEDITOR.CTRL</code>, <code>CKEDITOR.SHIFT</code> and <code>CKEDITOR.ALT</code> constant values to avoid collision with any possible Unicode character.</li> <li><a href="http://dev.ckeditor.com/ticket/6263">#6263</a> : Some table cell context menu options may be incorrectly disabled.</li> <li><a href="http://dev.ckeditor.com/ticket/6247">#6247</a> : Focus is not restored properly after a drop-down menu is closed.</li> <li><a href="http://dev.ckeditor.com/ticket/7334">#7334</a> : [IE7] Indentation style does not apply to RTL lists.</li> <li><a href="http://dev.ckeditor.com/ticket/6845">#6845</a> : Spaces inside the URL field in the Link dialog window will now be removed.</li> <li><a href="http://dev.ckeditor.com/ticket/7840">#7840</a> : [IE] Opening the Table Properties dialog window via the context menu causes a JavaScript error.</li> <li><a href="http://dev.ckeditor.com/ticket/7733">#7733</a> : Flash movies inserted with the Flash Properties dialog window are not displaying properly when injected into the page.</li> <li><a href="http://dev.ckeditor.com/ticket/7837">#7837</a> : [IE&lt;8] Inserting a page break results in an error.</li> <li><a href="http://dev.ckeditor.com/ticket/7804">#7804</a> : The HTML5 <a href="http://www.w3.org/TR/html-markup/wbr.html"><code>wbr</code></a> tag is now recognized by the editor.</li> <li><a href="http://dev.ckeditor.com/ticket/7867">#7867</a> : The file browser for the background image in the Document Properties plugin dialog window does not work.</li> <li><a href="http://dev.ckeditor.com/ticket/7130">#7130</a> : The column resizer gripping area is invading adjacent table cells.</li> <li><a href="http://dev.ckeditor.com/ticket/7844">#7844</a> : [FF] Calling <code>setData()</code> on a hidden editor caused editor not to display.</li> <li><a href="http://dev.ckeditor.com/ticket/7860">#7860</a> : The BBCode plugin was stripping BBCode tags that were not implemented in the plugin, but from now on they will be handled as simple text.</li> <li><a href="http://dev.ckeditor.com/ticket/7321">#7321</a> : [IE6] Contents inside the RTL fields in dialog windows are overflowing.</li> <li><a href="http://dev.ckeditor.com/ticket/7323">#7323</a> : [IE Quirks] Some fields are not centered in the dialog window.</li> <li><a href="http://dev.ckeditor.com/ticket/5955">#5955</a> : Editor accessibility issue with JAWS when a drop-down menu is placed as the first item in the toolbar.</li> <li><a href="http://dev.ckeditor.com/ticket/6671">#6671</a> : [FF] Selection of an item from the Styles drop-down list is not refreshed after the style is removed.</li> <li><a href="http://dev.ckeditor.com/ticket/7879">#7879</a> : The Style and Height/Width fields of the Table Properties dialog window are not synchronized.</li> <li><a href="http://dev.ckeditor.com/ticket/7581">#7581</a> : [IE] The <em>Enter</em> key pressed at the end of a list item containing the <code>start</code> attribute crashes the browser.</li> <li><a href="http://dev.ckeditor.com/ticket/7266">#7266</a> : Dialog window fields that did not pass validation are now ARIA-compatible with <code>aria-invalid</code>.</li> <li><a href="http://dev.ckeditor.com/ticket/7742">#7742</a> : [WebKit] Indentation, alignment, and language direction are not applied on an empty document without the editor being in focus.</li> <li><a href="http://dev.ckeditor.com/ticket/7801">#7801</a> : [Opera] Pasted paragraphs now split partially selected blocks.</li> <li><a href="http://dev.ckeditor.com/ticket/6663">#6663</a> : Table caption that contains rich text is corrupted after an edit done with the Table Properties dialog window.</li> <li><a href="http://dev.ckeditor.com/ticket/7893">#7893</a> : [WebKit, Opera, IE&lt;8] It is impossible to link to anchors in the document.</li> <li><a href="http://dev.ckeditor.com/ticket/7637">#7637</a> : Cursor position might in some cases cause problems after inserting a page break.</li> <li><a href="http://dev.ckeditor.com/ticket/5314">#5314</a> : The <code>aria-selected</code> attribute is not removed when toolbar drop-down menu items are deselected.</li> <li><a href="http://dev.ckeditor.com/ticket/7749">#7749</a> : Small check introduced to avoid issues with custom data processors and the <code>insertHtml</code> function.</li> <li><a href="http://dev.ckeditor.com/ticket/7269">#7269</a> : [WebKit] Paste from Word is including the full <code>file://</code> URL path for anchor links.</li> <li><a href="http://dev.ckeditor.com/ticket/7584">#7584</a> : Start number of the List dialog window now works with numbered list items.</li> <li><a href="http://dev.ckeditor.com/ticket/6975">#6975</a> : [IE6, IE7] A definition list crashes Internet Explorer on HTML output.</li> <li><a href="http://dev.ckeditor.com/ticket/7841">#7841</a> : Deleting a column with a cell deleted in one of the rows does not work.</li> <li><a href="http://dev.ckeditor.com/ticket/7944">#7944</a> : The <em>Enter</em> key should not split or create new paragraphs inside caption elements.</li> <li><a href="http://dev.ckeditor.com/ticket/7639">#7639</a> : [IE9] Browser might crash when an object is selected in the document.</li> <li><a href="http://dev.ckeditor.com/ticket/7847">#7847</a> : [IE8] Inserting an image with non-secure source in a HTTPS page breaks the dialog window.</li> <li><a href="http://dev.ckeditor.com/ticket/7953">#7953</a> : [IE] Text selection lost after the browser context menu is opened.</li> <li><a href="http://dev.ckeditor.com/ticket/5239">#5239</a> : Inconsistent focus behavior after closing a toolbar drop-down menu.</li> <li><a href="http://dev.ckeditor.com/ticket/6470">#6470</a> : The Start attribute of a Numbered List is rendered incorrectly if the field is left empty.</li> <li><a href="http://dev.ckeditor.com/ticket/7324">#7324</a> : [IE6 Quirks] Context menus are not displayed correctly.</li> <li><a href="http://dev.ckeditor.com/ticket/7566">#7566</a> : BiDi: Increasing indentation of a list item changes the language direction.</li> <li><a href="http://dev.ckeditor.com/ticket/7839">#7839</a> : [IE] Pasting multi-level numbered lists from Microsoft Word does not work properly.</li> <li><a href="http://dev.ckeditor.com/ticket/188">#188</a> : [IE] Object selection was making the toolbar inactive in some situations.</li> <li>Updated the following language files:<ul> <li><a href="http://dev.ckeditor.com/ticket/7834">#7834</a> : Dutch;</li> <li><a href="http://dev.ckeditor.com/ticket/7869">#7869</a>, <a href="http://dev.ckeditor.com/ticket/7869">#7999</a> : Welsh;</li> <li>Polish;</li> <li>Hebrew;</li> <li>German</li> </ul></li> </ul> <h3> CKEditor 3.6</h3> <p> New features:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/7044">#7044</a> : New BBCode sample plugin that makes the editor output (one dialect of) BBCode format.</li> <li><a href="http://dev.ckeditor.com/ticket/5647">#5647</a> : Accessibility enhancements to the structure of the toolbar.</li> <li><a href="http://dev.ckeditor.com/ticket/5647">#5647</a> : The Kama skin now presents separators for the toolbar items, making it easier to group buttons and have a cleaner layout.</li> <li><a href="http://dev.ckeditor.com/ticket/5647">#5647</a> : Usability enhancements to keyboard navigation on the toolbar. The <em>Tab</em> key is now used to jump between toolbar groups, while the <em>Arrow</em> keys can be used to cycle within the group. The new <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.toolbarGroupCycling">toolbarGroupCycling</a></code> setting can be used to change the <em>Arrow</em> keys behavior.</li> <li><a href="http://dev.ckeditor.com/ticket/1376">#1376</a> : It is now possible to put the editor in the "read-only" state, so that the users would not be able to introduce changes to the contents. Check out the new <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#setReadOnly">CKEDITOR.editor::setReadOnly</a></code> method, the <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#readOnly">CKEDITOR.editor::readOnly</a></code> property, the <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#event:readOnly">CKEDITOR.editor::readOnly</a></code> event, and the <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.readOnly">readOnly</a></code> setting.</li> <li><a href="http://dev.ckeditor.com/ticket/3582">#3582</a> : New presentation of anchor elements in the WYSIWYG mode.</li> <li><a href="http://dev.ckeditor.com/ticket/6737">#6737</a> : The Format drop-down list will now display the preview of its contents exactly as defined in their style configurations.</li> <li><a href="http://dev.ckeditor.com/ticket/6654">#6654</a> : A new <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.autoParagraph">autoParagraph</a></code> configuration setting is added to disable the auto paragraphing feature.</li> <li><a href="http://dev.ckeditor.com/ticket/901">#901</a> : New Stylesheet Parser (<code>stylesheetparser</code>) plugin that fills the Styles drop-down list based on the CSS classes available for the content. Check the new sample to learn how to use it.</li> <li><a href="http://dev.ckeditor.com/ticket/2988">#2988</a> : New Document Properties (<code>docprops</code>) plugin that sets the metadata of the page in the Full Page mode.</li> <li><a href="http://dev.ckeditor.com/ticket/7240">#7240</a> : New Developer Tools (<code>devtools</code>) plugin that shows information about dialog window UI elements to allow for easier customization.</li> <li><a href="http://dev.ckeditor.com/ticket/6841">#6841</a> : Pressing the <em>Enter</em> key at the end of a pre-formatted block will now exit from it.</li> <li><a href="http://dev.ckeditor.com/ticket/6850">#6850</a> : The About CKEditor dialog window now contains a link to CKEditor User's Guide.</li> <li><a href="http://dev.ckeditor.com/ticket/5745">#5745</a> : Extra configuration options for the <code>iframeDialog</code> can now be passed.</li> <li><a href="http://dev.ckeditor.com/ticket/6589">#6589</a> : The <code>onDialogEvent</code> function will now be used automatically in the <code>iframeDialog</code> contents if no callback is used on creation.</li> <li><a href="http://dev.ckeditor.com/ticket/7757">#7757</a> : Georgian localization added.</li> </ul> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/6774">#6774</a> : Internal styles are not included in the <code>contents.css</code> sample.</li> <li><a href="http://dev.ckeditor.com/ticket/6521">#6521</a> : Added sample for the TableResize plugin.</li> <li><a href="http://dev.ckeditor.com/ticket/6664">#6664</a> : Page break is sometimes merged into block-level elements.</li> <li><a href="http://dev.ckeditor.com/ticket/7594">#7594</a> : Toolbar keyboard navigation is not possible after recreating the editor.</li> <li><a href="http://dev.ckeditor.com/ticket/6657">#6657</a> : Allow to style the entire dialog window field when the input element is disabled.</li> <li>Updated the following language files:<ul> <li>Hebrew;</li> <li>Polish;</li> </ul></li> </ul> <h3> CKEditor 3.5.4</h3> <p> Fixed issues:</p> <ul> <li>Added protection against XSS attacks in PHP samples when displaying element names.</li> <li><a href="http://dev.ckeditor.com/ticket/7347">#7347</a> : The <em>Enter</em> key will no longer be caught by the dialog window covering the editor.</li> <li><a href="http://dev.ckeditor.com/ticket/6718">#6718</a> : Paste from Word command overrides the Force Paste as Plain Text configuration.</li> <li><a href="http://dev.ckeditor.com/ticket/6629">#6629</a> : Padding body is no longer needed when the last block is pre-formatted.</li> <li><a href="http://dev.ckeditor.com/ticket/4844">#4844</a> : [IE] Dialog windows fail to load if there are too many editor instances on the page.</li> <li><a href="http://dev.ckeditor.com/ticket/5788">#5788</a> : HTML parser trims empty spaces following <code>&lt;br&gt;</code> elements.</li> <li><a href="http://dev.ckeditor.com/ticket/7513">#7513</a> : Invalid markup could cause the editor to hang.</li> <li><a href="http://dev.ckeditor.com/ticket/6109">#6109</a> : Paste and Paste as Plain Text dialog windows now use the standard <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.html#commitContent">commitContent</a></code> and <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.html#setupContent">setupContent</a></code> methods.</li> <li><a href="http://dev.ckeditor.com/ticket/7588">#7588</a> : The editor code now has a protection system to avoid issues when including <code>ckeditor.js</code> more than once in the page.</li> <li><a href="http://dev.ckeditor.com/ticket/7322">#7322</a> : Text font plugin now recognizes font family names that contain quotes.</li> <li><a href="http://dev.ckeditor.com/ticket/7540">#7540</a> : Paste from Word introduces wrong spaces.</li> <li><a href="http://dev.ckeditor.com/ticket/7697">#7697</a> : Successive calls of the <code>replace()</code> method did not work after SCAYT context menu initialization.</li> <li>Updated the following language files:<ul> <li><a href="http://dev.ckeditor.com/ticket/7647">#7647</a> : Slovak;</li> </ul></li> </ul> <h3> CKEditor 3.5.3</h3> <p> New features:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/4890">#4890</a> : Added the possibility to edit the <code>rel</code> attribute for links.</li> <li><a href="http://dev.ckeditor.com/ticket/7004">#7004</a> : Allow loading plugin translations even if they are not present in the plugin definition.</li> <li><a href="http://dev.ckeditor.com/ticket/7315">#7315</a> : Firing the <code>resize</code> event on dialog window instances is now possible.</li> <li><a href="http://dev.ckeditor.com/ticket/7259">#7259</a> : Dialog window definition allows to specify initial <code>width</code> and <code>height</code> values.</li> <li><a href="http://dev.ckeditor.com/ticket/7131">#7131</a> : List item numbering is now supported on pasting from Microsoft Word.</li> </ul> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/1272">#1272</a> : [WebKit] It is now possible to apply styles to collapsed selections in Safari and Chrome.</li> <li><a href="http://dev.ckeditor.com/ticket/7054">#7054</a> : The tooltips for special characters are now lowercased, making them more readable.</li> <li><a href="http://dev.ckeditor.com/ticket/7102">#7102</a> : "Replace DIV" sample did not work when double-clicking inside the formatted text.</li> <li><a href="http://dev.ckeditor.com/ticket/7088">#7088</a> : Loading of plugins failed on new instances of the editor after the Insert Special Character dialog window was used.</li> <li><a href="http://dev.ckeditor.com/ticket/6215">#6215</a> : Removal of inline styles now also removes overrides.</li> <li><a href="http://dev.ckeditor.com/ticket/6144">#6144</a> : Rich text drop-down lists have wrong height when toolbar is wrapped.</li> <li><a href="http://dev.ckeditor.com/ticket/6387">#6387</a> : AutoGrow may cause an error when editor instance is destroyed too quickly after a height change.</li> <li><a href="http://dev.ckeditor.com/ticket/6901">#6901</a> : Mixed direction content was not properly respected in a shared toolbar setting.</li> <li><a href="http://dev.ckeditor.com/ticket/4809">#4809</a> : Table-related tags are output in wrong order.</li> <li><a href="http://dev.ckeditor.com/ticket/7092">#7092</a> : Corrupted toolbar button state for inline style after switching to Source.</li> <li><a href="http://dev.ckeditor.com/ticket/6921">#6921</a> : Pasted text marked by SCAYT in one language is not re-checked if another spellchecking language is selected in the editor.</li> <li><a href="http://dev.ckeditor.com/ticket/6614">#6614</a> : Enhancement of the resize handle in RTL.</li> <li><a href="http://dev.ckeditor.com/ticket/5924">#5924</a> : Flash plugin now recognizes Flash content without an <code>embed</code> tag.</li> <li><a href="http://dev.ckeditor.com/ticket/4475">#4475</a> : Protected source in attributes and inline CSS text is not handled correctly.</li> <li><a href="http://dev.ckeditor.com/ticket/6984">#6984</a> : [FF] Trailing line breaks are lost in <code>ENTER_BR</code>.</li> <li><a href="http://dev.ckeditor.com/ticket/6987">#6987</a> : [IE] Text selection lost when calling <code>editor::insertHtml</code> from a dialog window in some situations.</li> <li><a href="http://dev.ckeditor.com/ticket/6865">#6865</a> : BiDi mirroring does not work when a text direction change is done through a dialog window.</li> <li><a href="http://dev.ckeditor.com/ticket/6966">#6966</a> : [IE] Unintended paragraph is created in an empty document in <code>enterMode</code> set for <code>BR</code> and <code>DIV</code>.</li> <li><a href="http://dev.ckeditor.com/ticket/7084">#7084</a> : SCAYT dialog window is now working properly with more than one editor instance in a page.</li> <li><a href="http://dev.ckeditor.com/ticket/6662">#6662</a> : [FF] List structure pasting error caused by a regression from FF3.5.x is now fixed.</li> <li><a href="http://dev.ckeditor.com/ticket/7300">#7300</a> : Link dialog window now loads numeric values correctly.</li> <li><a href="http://dev.ckeditor.com/ticket/7330">#7330</a> : New list items no longer inherit the <code>value</code> attribute from their sibling.</li> <li><a href="http://dev.ckeditor.com/ticket/7293">#7293</a> : The "Automatic" color button is now presented correctly without focus inside the editor.</li> <li><a href="http://dev.ckeditor.com/ticket/7018">#7018</a> : [IE] Toolbar drop-down lists did not have a border around them.</li> <li><a href="http://dev.ckeditor.com/ticket/7073">#7073</a> : Image dialog window no longer allows zero height and width value to be entered.</li> <li><a href="http://dev.ckeditor.com/ticket/7316">#7316</a> : [FF] Clicking on "Paste" button incorrectly breaks the line at the cursor position.</li> <li><a href="http://dev.ckeditor.com/ticket/6751">#6751</a> : Inline whitespaces are incorrectly stripped when pasting from Word.</li> <li><a href="http://dev.ckeditor.com/ticket/6236">#6236</a> : [IE] Fixing malformed nested list structure which was introduced by the <em>Backspace</em> key.</li> <li><a href="http://dev.ckeditor.com/ticket/6649">#6649</a> : [IE] Selection of the full table sometimes does not work.</li> <li><a href="http://dev.ckeditor.com/ticket/6946">#6946</a> : HTML parser is now able to fix orphan list items.</li> <li><a href="http://dev.ckeditor.com/ticket/6861">#6861</a> : Indenting a list item should retain the text direction.</li> <li><a href="http://dev.ckeditor.com/ticket/6938">#6938</a> : Outdenting a list item should retain the text direction.</li> <li><a href="http://dev.ckeditor.com/ticket/6849">#6849</a> : Correct <em>Enter</em> key behavior on list item.</li> <li><a href="http://dev.ckeditor.com/ticket/7113">#7113</a> : [WebKit] Undesired document scroll on click after scrolling.</li> <li><a href="http://dev.ckeditor.com/ticket/6491">#6491</a> : Undesired Image dialog window dimension lock reset on URL change.</li> <li><a href="http://dev.ckeditor.com/ticket/7284">#7284</a> : [FF Quirks] Maximize now works correctly.</li> <li><a href="http://dev.ckeditor.com/ticket/6609">#6609</a> : [IE9] Browser in high contrast mode is not properly detected.</li> <li><a href="http://dev.ckeditor.com/ticket/7222">#7222</a> : [WebKit] Impossible to apply a single style to a collapsed selection without giving the editor focus.</li> <li><a href="http://dev.ckeditor.com/ticket/7180">#7180</a> : [IE9] When using Kama skin and RTL layout dialog window buttons were not being displayed correctly.</li> <li><a href="http://dev.ckeditor.com/ticket/7182">#7182</a> : [IE9] When using Office2003/v2 skin and RTL layout dialog window shadows were corrupted.</li> <li><a href="http://dev.ckeditor.com/ticket/6913">#6913</a> : Invalid escape sequence (<code>\b</code>) was used in the PHP integration.</li> <li><a href="http://dev.ckeditor.com/ticket/5757">#5757</a> : [IE6] Text was not wrapping in the accessibility instructions dialog window.</li> <li><a href="http://dev.ckeditor.com/changeset/6604">[6604]</a> : <code>Xml.js</code> and <code>Ajax.js</code> are now available as plugins ('xml' and 'ajax').</li> <li><a href="http://dev.ckeditor.com/ticket/7304">#7304</a> : Microsoft Word cleanup function is not always invoked when clicking on the "Paste From Word" button.</li> <li><a href="http://dev.ckeditor.com/ticket/6658">#6658</a> : [IE] Pasting text from Microsoft Word with one or more tabs between list items was failing.</li> <li><a href="http://dev.ckeditor.com/ticket/7433">#7433</a> : [IE9] <code>ENTER_BR</code> at the end of a block breaks due to an IE9 regression.</li> <li><a href="http://dev.ckeditor.com/ticket/7432">#7432</a> : [WebKit] Unable to create a new list in an empty document.</li> <li><a href="http://dev.ckeditor.com/ticket/4880">#4880</a> : CKEditor changes tag style inside HTML comment with <code>cke_protected</code>.</li> <li><a href="http://dev.ckeditor.com/ticket/7023">#7023</a> : [IE] JavaScript error when a Selection Field is inserted into a page.</li> <li><a href="http://dev.ckeditor.com/ticket/7034">#7034</a> : Inserting special characters into styled text.</li> <li><a href="http://dev.ckeditor.com/ticket/7132">#7132</a> : Paste toolbar buttons are becoming disabled.</li> <li><a href="http://dev.ckeditor.com/ticket/7138">#7138</a> : The <code>api.html</code> sample in Opera does not work as expected.</li> <li><a href="http://dev.ckeditor.com/ticket/7160">#7160</a> : Cannot paste the form element on top of the page.</li> <li><a href="http://dev.ckeditor.com/ticket/7171">#7171</a> : Double-clicking an image in non-editable content opens the editing dialog window.</li> <li><a href="http://dev.ckeditor.com/ticket/7455">#7455</a> : Extra line break is added automatically to the preformatted element.</li> <li><a href="http://dev.ckeditor.com/ticket/7467">#7467</a> : [Firefox] Extra <code>br</code> element is added in a nested list.</li> <li>Updated the following language files:<ul> <li><a href="http://dev.ckeditor.com/ticket/7124">#7124</a> : Czech;</li> <li><a href="http://dev.ckeditor.com/ticket/7126">#7126</a> : French;</li> <li><a href="http://dev.ckeditor.com/ticket/7140">#7140</a> : Catalan;</li> <li><a href="http://dev.ckeditor.com/ticket/7215">#7215</a> : Faroese;</li> <li><a href="http://dev.ckeditor.com/ticket/7177">#7177</a> : Finnish;</li> <li><a href="http://dev.ckeditor.com/ticket/7163">#7163</a> : Norwegian (no and nb);</li> <li><a href="http://dev.ckeditor.com/ticket/7219">#7219</a> : Swedish;</li> <li><a href="http://dev.ckeditor.com/ticket/7183">#7183</a> : Afrikaans;</li> <li>Hebrew;</li> <li>Spanish;</li> <li>Polish;</li> <li>German;</li> </ul></li> </ul> <h3> CKEditor 3.5.2</h3> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/7168">#7168</a> : [IE9] Destroying an editor instance throws an error.</li> <li><a href="http://dev.ckeditor.com/ticket/7169">#7169</a> : [IE9] Menu item has incorrect height.</li> <li><a href="http://dev.ckeditor.com/ticket/7178">#7178</a> : [IE9] Read-only attributes do not work in IE9.</li> <li><a href="http://dev.ckeditor.com/ticket/7181">#7181</a> : [IE9] Toolbar items are not aligned in v2 and Office2003 skins.</li> <li><a href="http://dev.ckeditor.com/ticket/7174">#7174</a> : [IE9] Elements path does not load correctly when the editor is switched back from Source to WYSIWYG.</li> </ul> <h3> CKEditor 3.5.1</h3> <p> New features:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/6107">#6107</a> : It is now possible to remove block styles using Styles and Paragraph Format drop-down lists.</li> <li><a href="http://dev.ckeditor.com/ticket/5590">#5590</a> : Remove Format command works in collapsed selections.</li> <li><a href="http://dev.ckeditor.com/ticket/5755">#5755</a> : The <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.dialog_buttonsOrder">dialog_buttonsOrder</a></code> option now works in Internet Explorer.</li> <li><a href="http://dev.ckeditor.com/ticket/6869">#6869</a> : The <code>data-cke-nostyle</code> attribute (which was introduced for escaping the element from been influenced by the style system since 3.5) is deprecated in favor of the new <code>data-nostyle</code> attribute.</li> <li>Revised sample pages with code examples and clarifications.</li> </ul> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/5855">#5855</a> : Updating a link multiple times generates wrong <code>href</code> attribute.</li> <li><a href="http://dev.ckeditor.com/ticket/6166">#6166</a> : Error on Maximize command, when the toolbar button is not shown.</li> <li><a href="http://dev.ckeditor.com/ticket/6607">#6607</a> : Table cell "merge down" and "merge right" commands work only once.</li> <li><a href="http://dev.ckeditor.com/ticket/6228">#6228</a> : Merge down does not work, throwing a JavasSript error.</li> <li><a href="http://dev.ckeditor.com/ticket/6625">#6625</a> : BIDI: Mixed LTR/RTL direction causes incorrect behavior.</li> <li><a href="http://dev.ckeditor.com/ticket/6881">#6881</a> : IFrame capitalization is now consistent throughout labels.</li> <li><a href="http://dev.ckeditor.com/ticket/6686">#6686</a> : BIDI: [FF] When we apply explicit language direction to a numbered/bulleted list, the corresponding language direction toolbar icon is not highlighted.</li> <li><a href="http://dev.ckeditor.com/ticket/6566">#6566</a> : It is now possible to exit a blockquote using <code>ENTER_BR</code>.</li> <li><a href="http://dev.ckeditor.com/ticket/6868">#6868</a> : Partial (invalid) list structure crashes the editor on load.</li> <li><a href="http://dev.ckeditor.com/ticket/6804">#6804</a> : Buggy behavior when editing the <code>legend</code> element inside a <code>fieldset</code>.</li> <li><a href="http://dev.ckeditor.com/ticket/6724">#6724</a> : [IE7] Nested list display bug on empty list item.</li> <li><a href="http://dev.ckeditor.com/ticket/6715">#6715</a> : List items do not create paragraphs after the list placed in a table cell is removed.</li> <li><a href="http://dev.ckeditor.com/ticket/6695">#6695</a> : [Webkit] Display bug after the editor is restored from the full screen mode.</li> <li><a href="http://dev.ckeditor.com/ticket/6661">#6661</a> : [IE] Pre-formatted style does not preserve applied text direction.</li> <li><a href="http://dev.ckeditor.com/ticket/6655">#6655</a> : Using the editor resize grip causes small visual offsets.</li> <li><a href="http://dev.ckeditor.com/ticket/6604">#6604</a> : The <code>div</code> element should be used as a formatting block in <code>ENTER_BR</code>.</li> <li><a href="http://dev.ckeditor.com/ticket/6249">#6249</a> : BIDI: List item bullets are off viewport with RTL text direction.</li> <li><a href="http://dev.ckeditor.com/ticket/6610">#6610</a> : BIDI: <code>ENTER_BR</code> change direction in one line out of multiple.</li> <li><a href="http://dev.ckeditor.com/ticket/6872">#6872</a> : [IE] Link target field is not populated properly when no target is set.</li> <li><a href="http://dev.ckeditor.com/ticket/6880">#6880</a> : Samples: Added a user-friendly message for users on servers without PHP support.</li> <li><a href="http://dev.ckeditor.com/ticket/6628">#6628</a> : Setting <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.enterMode">config.enterMode</a></code> from PHP fails.</li> <li><a href="http://dev.ckeditor.com/ticket/6278">#6278</a> : Comments were moved above the <code>br</code> tags.</li> <li><a href="http://dev.ckeditor.com/ticket/6687">#6687</a> : Empty tag should be removed in inline-style format.</li> <li><a href="http://dev.ckeditor.com/ticket/6645">#6645</a> : Allow to configure whether &quot; (double quotes) characters should be encoded in the contents.</li> <li><a href="http://dev.ckeditor.com/ticket/6336">#6336</a> : IE: (double)clicking an <code>input type="submit"</code> button submitted the form.</li> <li><a href="http://dev.ckeditor.com/ticket/6646">#6646</a> : Context menu was not working for text inputs present in the initial content.</li> <li><a href="http://dev.ckeditor.com/ticket/6641">#6641</a> : Copying and pasting links inside the editor was not working.</li> <li><a href="http://dev.ckeditor.com/ticket/4208">#4208</a> : The <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.disableObjectResizing">disableObjectResizing</a></code> setting now works in IE.</li> <li><a href="http://dev.ckeditor.com/ticket/6242">#6242</a> : [IE] Editing existing links with <code>href</code> of a relative path mangles containing text.</li> <li><a href="http://dev.ckeditor.com/ticket/5930">#5930</a> : [IE] Style definitions are no longer lowercased.</li> <li><a href="http://dev.ckeditor.com/ticket/5361">#5361</a> : Preview window's title should reflect the title tag in full page mode.</li> <li><a href="http://dev.ckeditor.com/ticket/5522">#5522</a> : [IE] In versions &lt; 8 or compatibility mode, <code>type="text"</code> was missing in text fields.</li> <li><a href="http://dev.ckeditor.com/ticket/6126">#6126</a> : [IE] Avoid problems if there are two buttons named "submit".</li> <li><a href="http://dev.ckeditor.com/ticket/6791">#6791</a> : [IE7] Editor did not show up when the name of a replaced textarea matched the name of a <code>meta</code> tag in the page.</li> <li><a href="http://dev.ckeditor.com/ticket/5684">#5684</a> : [FF] When <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.forcePasteAsPlainText">forcePasteAsPlainText</a></code> is used, the cursor disappears after paste.</li> <li><a href="http://dev.ckeditor.com/ticket/6390">#6390</a> : Prevent toolbar dialog window buttons from being clicked twice.</li> <li><a href="http://dev.ckeditor.com/ticket/6684">#6684</a> : [Webkit] Toolbar buttons are not wrapping correctly when the editor is displayed inside a table.</li> <li><a href="http://dev.ckeditor.com/ticket/6703">#6703</a> : [IE] editor <code>focus</code> event not fired in an instance, when a dialog window closes.</li> <li><a href="http://dev.ckeditor.com/ticket/6873">#6873</a> : Difficult to drag the resize grip of the spell checker dialog window.</li> <li><a href="http://dev.ckeditor.com/ticket/6896">#6896</a> : [Webkit] Unable to paste into source area when the editor is maximized.</li> <li><a href="http://dev.ckeditor.com/ticket/6020">#6020</a> : The state of the Cut, Copy, and Paste toolbar now matches the state of the context menu buttons.</li> <li><a href="http://dev.ckeditor.com/ticket/5256">#5256</a> : JavaScript error thrown when percent (%) sign is used in image URL.</li> <li><a href="http://dev.ckeditor.com/ticket/6577">#6577</a> : [FF] Selection error when an element containing the editor instance is hidden.</li> <li><a href="http://dev.ckeditor.com/ticket/5500">#5500</a> : [IE] <code>value</code> attribute of text input dialog window field was missing.</li> <li><a href="http://dev.ckeditor.com/ticket/6665">#6665</a> : [IE] <code>name</code> field of Link dialog window was missing.</li> <li><a href="http://dev.ckeditor.com/ticket/6639">#6639</a> : Line-breaks inside pasted list item from Microsoft Word break the list structure.</li> <li><a href="http://dev.ckeditor.com/ticket/6909">#6909</a> : [IE] GIF icons of toolbar button from custom plugins are not diplayed in zoom level 100%.</li> <li><a href="http://dev.ckeditor.com/ticket/6860">#6860</a> : [FF] Double-clicking the placeholder element in order to open a Placeholder dialog window throws a JavaScript error.</li> <li><a href="http://dev.ckeditor.com/ticket/6630">#6630</a> : Empty <code>pre</code> elements are output differently in various browsers.</li> <li><a href="http://dev.ckeditor.com/ticket/6568">#6568</a> : Insert table row/column does not work with spanning.</li> <li><a href="http://dev.ckeditor.com/ticket/6735">#6735</a> : Inaccurate read-only selection detection.</li> <li><a href="http://dev.ckeditor.com/ticket/6728">#6728</a> : BIDI: Change direction does not work with list nested inside a blockquote.</li> <li><a href="http://dev.ckeditor.com/ticket/6432">#6432</a> : Inserting a table in place of a fully selected list results in a JavaScript error.</li> <li><a href="http://dev.ckeditor.com/ticket/6438">#6438</a> : [IE] Performance enhancement when typing inside an element with many child nodes.</li> <li><a href="http://dev.ckeditor.com/ticket/6970">#6970</a> : [IE] Dialog window shadows were presented inaccurately.</li> <li><a href="http://dev.ckeditor.com/ticket/6672">#6672</a> : [IE] Unnecessary <code>br</code> element is no longer inserted after a form.</li> <li><a href="http://dev.ckeditor.com/ticket/7087">#7087</a> : [FF] Sometimes it was not possible to move cursor out of link at the end of block.</li> <li>Updated the following language files:<ul> <li><a href="http://dev.ckeditor.com/ticket/6981">#6981</a> : English (GB);</li> <li><a href="http://dev.ckeditor.com/ticket/6991">#6991</a> : Finnish;</li> <li><a href="http://dev.ckeditor.com/ticket/6357">#6357</a> : French;</li> <li><a href="http://dev.ckeditor.com/ticket/7055">#7055</a> : Polish;</li> <li><a href="http://dev.ckeditor.com/ticket/7068">#7068</a> : German;</li> </ul></li> </ul> <h3> CKEditor 3.5</h3> <p> New features:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/4090">#4090</a> : Full Adobe AIR support.</li> <li><a href="http://dev.ckeditor.com/ticket/5084">#5084</a> : Dialog windows are now resizable with a grip located in the footer.</li> <li><a href="http://dev.ckeditor.com/ticket/5755">#5755</a> : Introduced the <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.dialog_buttonsOrder">dialog_buttonsOrder</a> setting, making it possible to control the buttons order.</li> <li><a href="http://dev.ckeditor.com/ticket/4648">#4648</a> : Added the new iFrame plugin.</li> <li><a href="http://dev.ckeditor.com/ticket/6010">#6010</a> : The Automatic option of the font/background color panel now represents the real color.</li> <li><a href="http://dev.ckeditor.com/ticket/5654">#5654</a> : New "placeholder" plugin.</li> <li><a href="http://dev.ckeditor.com/ticket/6334">#6334</a> : CKEditor now uses <a href="http://www.w3.org/TR/2010/WD-html5-20101019/elements.html#embedding-custom-non-visible-data-with-the-data-attributes">HTML5's data-* attributes</a> for its internal attributes.</li> <li><a href="http://dev.ckeditor.com/ticket/6103">#6103</a> : It's now possible to control the styling of inline read-only elements with the <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.disableReadonlyStyling">disableReadonlyStyling</a> setting. It's also possible to avoid inline-styling any element by setting its "data-cke-nostyle" attribute to "1".</li> <li><a href="http://dev.ckeditor.com/ticket/5404">#5404</a> : <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.fillEmptyBlocks">fillEmptyBlocks</a> configuration option of v2 is now available.</li> <li><a href="http://dev.ckeditor.com/ticket/5367">#5367</a> : New <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#insertText">CKEDITOR.editor#insertText</a> method (check api.html sample page for usages) is now provided to insert plain text into editor.</li> <li><a href="http://dev.ckeditor.com/ticket/5367">#5915</a> : New <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.removeDialogTabs">removeDialogTabs</a> configuration option to hide certain dialog tabs.</li> </ul> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/4821">#4821</a> : Icons in the toolbar were distorted with IE and zoom != 100%.</li> <li><a href="http://dev.ckeditor.com/ticket/5587">#5587</a> : Visual improvements in dialogs, reinforce field label on separate line.</li> <li><a href="http://dev.ckeditor.com/ticket/4652">#4652</a> : Now it's able to disable editor context menu by simply removing the "contextmenu" plugin.</li> <li><a href="http://dev.ckeditor.com/ticket/5599">#5599</a> : Labels of "specialchar" dialog are now translated.</li> <li><a href="http://dev.ckeditor.com/ticket/6419">#6419</a> : [IE] List creation by merging problem.</li> <li><a href="http://dev.ckeditor.com/ticket/6502">#6502</a> : Removed IE6 image preloading, which was used to defect the duplicate request of background images.</li> <li><a href="http://dev.ckeditor.com/ticket/6822">#6822</a> : Added labels to fake objects.</li> <li><a href="http://dev.ckeditor.com/ticket/6898">#6898</a> : [IE6] Toolbar icons becomes invisible in RTL.</li> <li>Updated the following language files:<ul> <li>Hebrew</li> </ul></li> </ul> <h3> CKEditor 3.4.3</h3> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/6554">#6554</a> : [Webkit] cannot type after inserting Page Break.</li> <li><a href="http://dev.ckeditor.com/ticket/6569">#6569</a> : Indentation now complies with text direction of the only item.</li> <li><a href="http://dev.ckeditor.com/ticket/6579">#6579</a> : The jQuery adapter was not working properly and was turned on in incompatible environments.</li> <li><a href="http://dev.ckeditor.com/ticket/6644">#6644</a> : Restrict <code>onmousedown</code> handler to the toolbar area.</li> <li><a href="http://dev.ckeditor.com/ticket/6656">#6656</a> : Panelbutton's buttons became active when clicking on Source.</li> <li><a href="http://dev.ckeditor.com/ticket/6248">#6248</a> : Whitespaces (<code>nbsp</code> elements) were incorrectly added into empty table cells and list items.</li> <li><a href="http://dev.ckeditor.com/ticket/6575">#6575</a> : Tabs disappearing in Link dialog window after a specific sequence of actions.</li> <li><a href="http://dev.ckeditor.com/ticket/6510">#6510</a> : Margin mirroring does not respect style configuration.</li> <li><a href="http://dev.ckeditor.com/ticket/6471">#6471</a> : BIDI: Pressing Decrease Indent in an RTL bulleted list causes incorrect behaviour.</li> <li><a href="http://dev.ckeditor.com/ticket/6479">#6479</a> : BIDI: Language direction is not being preserved when pressing Enter after a Paragraph Format was applied.</li> <li><a href="http://dev.ckeditor.com/ticket/6670">#6670</a> : BIDI: Indent &amp; List icons are not reversed when we apply RTL direction to a paragraph with any of Paragraph Formatting options.</li> <li><a href="http://dev.ckeditor.com/ticket/6640">#6640</a> : Floating panels are now being closed when switching modes.</li> <li><a href="http://dev.ckeditor.com/ticket/4790">#4790</a> : Remove list with multiple items in <code>enterBr</code> doesnot preserve line breaks.</li> <li><a href="http://dev.ckeditor.com/ticket/6297">#6297</a> : Floated inline elements are not taking part in behavior of blocks anymore.</li> <li><a href="http://dev.ckeditor.com/ticket/6171">#6171</a> : [Firefox] Opening rich content drop-down list scrolls host page to the top when editor has a vertical scrollbar.</li> <li><a href="http://dev.ckeditor.com/ticket/6330">#6330</a> : List markers from MS Word with Roman numbering are not preserved.</li> <li><a href="http://dev.ckeditor.com/ticket/6720">#6720</a> : Attribute protection might detect wrong elements.</li> <li><a href="http://dev.ckeditor.com/ticket/6580">#6580</a> : [IE9] Flash dialog window does not get filled up.</li> <li><a href="http://dev.ckeditor.com/ticket/6447">#6447</a> : Decreasing indentation of a list with <code>indentClasses</code> config does not work.</li> <li><a href="http://dev.ckeditor.com/ticket/5894">#5894</a> : Adding custom buttons at the bottom of a dialog window does not cause it to expand to include its contents.</li> <li><a href="http://dev.ckeditor.com/ticket/6513">#6513</a> : Wrong ARIA attributes created on list options of Styles drop-down list.</li> <li><a href="http://dev.ckeditor.com/ticket/6150">#6150</a> : [Safari] Color dialog window was broken.</li> <li><a href="http://dev.ckeditor.com/ticket/6747">#6747</a> : Full screen layout issue caused by page element focus outside editor.</li> <li><a href="http://dev.ckeditor.com/ticket/6779">#6779</a> : Clicking the <code>body</code> element on elements path turns the selection on and off immediately.</li> <li><a href="http://dev.ckeditor.com/ticket/6781">#6781</a> : [IE7] Dialog windows are broken with RTL, Office 2003 and v2 skins.</li> <li><a href="http://dev.ckeditor.com/ticket/6798">#6798</a> : [IE7] Dialog window buttons disappearing in RTL after dragging.</li> <li><a href="http://dev.ckeditor.com/ticket/6806">#6806</a> : [IE7] Dialog window buttons invisible on focus.</li> <li><a href="http://dev.ckeditor.com/ticket/6588">#6588</a> : Copy and paste adds <code>&lt;span&gt;</code> if SCAYT is enabled.</li> <li><a href="http://dev.ckeditor.com/ticket/6673">#6673</a> : IE Target combo for Image Link shown as blank even when we select <code>&lt;not set&gt;</code> as an option.</li> <li>Updated the following language files:<ul> <li><a href="http://dev.ckeditor.com/ticket/6756">#6756</a> : Hungarian;</li> <li><a href="http://dev.ckeditor.com/ticket/6794">#6794</a> : Japanese;</li> </ul></li> </ul> <h3> CKEditor 3.4.2</h3> <p> New features:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/5024">#5024</a> : Added a sample that shows how to output HTML that is valid for Flash.</li> </ul> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/5237">#5237</a> : English text in dialogs' title was flipped when using RTL language (office2003 and v2 skins).</li> <li><a href="http://dev.ckeditor.com/ticket/6289">#6289</a> : Deleting nested table removed the parent cell.</li> <li><a href="http://dev.ckeditor.com/ticket/6341">#6341</a> : The editor contents now have the text cursor.</li> <li><a href="http://dev.ckeditor.com/ticket/6153">#6153</a> : Chrome: tab focus is wrong.</li> <li><a href="http://dev.ckeditor.com/ticket/6261">#6261</a> : Focus and infinite loop between multiple editors.</li> <li><a href="http://dev.ckeditor.com/ticket/6170">#6170</a> : Dedicated class names are removed from floating panels when opening another panel.</li> <li><a href="http://dev.ckeditor.com/ticket/6339">#6339</a> : Autogrow plugin now doesn't work on maximized editors.</li> <li><a href="http://dev.ckeditor.com/ticket/6237">#6237</a> : BIDI: Applying same language direction to all paragraphs not working.</li> <li><a href="http://dev.ckeditor.com/ticket/6353">#6353</a> : [IE] Resize was broken with office2003 and v2 skins.</li> <li><a href="http://dev.ckeditor.com/ticket/6375">#6375</a> : Avoiding errors when hiding the editor after the blur event.</li> <li><a href="http://dev.ckeditor.com/ticket/6133">#6133</a> : Styled paragraphs result on buggy list creation.</li> <li><a href="http://dev.ckeditor.com/ticket/5074">#5074</a> : Link target is not removed when changing to popup.</li> <li><a href="http://dev.ckeditor.com/ticket/6408">#6408</a> : [IE] Autogrow now works correctly on Quirks.</li> <li><a href="http://dev.ckeditor.com/ticket/6420">#6420</a> : [IE] The table properties dialog now correctly retrieves the caption text.</li> <li><a href="http://dev.ckeditor.com/ticket/6141">#6141</a> : It was impossible to outdent a list when indentOffset was set to 0.</li> <li><a href="http://dev.ckeditor.com/ticket/6377">#6377</a> : FF width and height are not shown for smiley in Image properties dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/5399">#5399</a> : Lists pasted from Word do not maintain their nesting.</li> <li><a href="http://dev.ckeditor.com/ticket/6225">#6225</a> : [FF] Cannot transform several lines to list with enterMode BR.</li> <li><a href="http://dev.ckeditor.com/ticket/6467">#6467</a> : [FF] It is now possible to disable the plugin command on "mode" event.</li> <li><a href="http://dev.ckeditor.com/ticket/6461">#6461</a> : Attributes are now being kept when changing block formatting.</li> <li><a href="http://dev.ckeditor.com/ticket/6226">#6226</a> : BIDI: Language direction applied to a Paragraph is removed when we apply one of Paragraph formatting options.</li> <li><a href="http://dev.ckeditor.com/ticket/5395">#5395</a> : [Opera] Native context menu incorrectly opened after Opera 10.2.</li> <li><a href="http://dev.ckeditor.com/ticket/6444">#6444</a> : [Opera] Close panels and dialogs don't return focus to wysiwyg frame.</li> <li><a href="http://dev.ckeditor.com/ticket/6332">#6332</a> : IE: V2 skin bottom dialog's border broken.</li> <li><a href="http://dev.ckeditor.com/ticket/5646">#5646</a> : Parser incorrectly removes inline element when there's only one comment node enclosed.</li> <li><a href="http://dev.ckeditor.com/ticket/6189">#6189</a> : Minor code size reduction.</li> <li><a href="http://dev.ckeditor.com/ticket/5045">#5045</a> : uiColor behaved wrong if multiple editors were used with period in their names.</li> <li><a href="http://dev.ckeditor.com/ticket/5766">#5766</a> : Config entry "ignoreEmptyParagraph" should only remove one single empty paragraph in document.</li> <li><a href="http://dev.ckeditor.com/ticket/5931">#5931</a> : Unable to apply inline style because of nested elements with same style name.</li> <li><a href="http://dev.ckeditor.com/ticket/6083">#6083</a> : Dialog close sometimes cause collapsed editor selection before the insertion.</li> <li><a href="http://dev.ckeditor.com/ticket/6253">#6253</a> : BIDI: creating a Numbered/Bulleted list causing improper behavior on bidi.</li> <li><a href="http://dev.ckeditor.com/ticket/4023">#4023</a> : [Opera] Maximize plugin.</li> <li><a href="http://dev.ckeditor.com/ticket/6403">#6403</a> : [Opera] Font name options are not correctly marked in dropdown list.</li> <li><a href="http://dev.ckeditor.com/ticket/4534">#4534</a> : [Opera] Arrow key to navigate through combo list has side effects of window scrolling.</li> <li><a href="http://dev.ckeditor.com/ticket/6534">#6534</a> : [Opera] Menu key brings up both CKEditor and browser context menu.</li> <li><a href="http://dev.ckeditor.com/ticket/6534">#6534</a> : [Opera] Menu key brings up both CKEditor and browser context menu.</li> <li><a href="http://dev.ckeditor.com/ticket/6416">#6416</a> : [IE9] Unable to make text selection with mouse in source area.</li> <li><a href="http://dev.ckeditor.com/ticket/6417">#6417</a> : [IE9] Context menu opens at the upper-left corner always.</li> <li><a href="http://dev.ckeditor.com/ticket/6501">#6501</a> : [IE9] Context menu item layout is broken.</li> <li><a href="http://dev.ckeditor.com/ticket/6099">#6099</a> : BIDI: when we apply explicit language direction to Numbered/Bulleted List the corresponding BIDI Tool bar icon is not highlighted in the Toolbar.</li> <li><a href="http://dev.ckeditor.com/ticket/6100">#6100</a> : BIDI: when we change Table language direction indentation of text in Table cells is not applied correctly.</li> <li><a href="http://dev.ckeditor.com/ticket/6376">#6376</a> : BIDI: buttons should not toggle the base language direction.</li> <li><a href="http://dev.ckeditor.com/ticket/6235">#6235</a> : BIDI: Applying direction to multi-paragraph selection within a div.</li> <li><a href="http://dev.ckeditor.com/ticket/6187">#6187</a> : [IE6] Multi-instance loading produces 404s on background images.</li> <li><a href="http://dev.ckeditor.com/ticket/5446">#5446</a> : Setting config.filebrowserImageBrowseUrl results in displaying also Browser Server on links.</li> <li><a href="http://dev.ckeditor.com/ticket/5626">#5626</a> : CKeditor 3.2.1 : html content attached makes ckeditor crash the browser FF/IE.</li> <li><a href="http://dev.ckeditor.com/ticket/6508">#6508</a> : BiDi: Margin mirroring logic doesn't honor CSS direction.</li> <li><a href="http://dev.ckeditor.com/ticket/6043">#6043</a> : BIDI: When we apply RTL direction to a right aligned Paragraph, Paragraph is not moved to the left &amp; Alignment of Paragraph is not changed.</li> <li><a href="http://dev.ckeditor.com/ticket/6485">#6485</a> : BIDI: When direction is applied on partial selected list, the style is been incorrectly applied to the entire list.</li> <li><a href="http://dev.ckeditor.com/ticket/6087">#6087</a> : Cursor of input fields in dialog isn't visible in RTL.</li> <li><a href="http://dev.ckeditor.com/ticket/5595">#5595</a> : Extra leading spaces added in preformatted block.</li> <li><a href="http://dev.ckeditor.com/ticket/6094">#6094</a> : Match full word option doesn't stop on block boundaries.</li> <li><a href="http://dev.ckeditor.com/ticket/5730">#5730</a> : [Safari] Continual pastes (holding paste key) breaks document contents.</li> <li><a href="http://dev.ckeditor.com/ticket/5850">#5850</a> : [IE] Inline style misbehaviors at the beginning of numbered/bulleted list.</li> <li>Updated the following language files:<ul> <li><a href="http://dev.ckeditor.com/ticket/6427">#6427</a> : Ukrainian;</li> <li><a href="http://dev.ckeditor.com/ticket/6464">#6464</a> : Finnish;</li> <li>Hebrew;</li> </ul></li> </ul> <h3> CKEditor 3.4.1</h3> <p> New features:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/5308">#5308</a> : Introduced the <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.filebrowserWindowFeatures">filebrowserWindowFeatures</a> setting, making it possible to have custom window features in the file browser window.</li> </ul> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/6027">#6027</a> : Modifying Table Properties by selecting more than one cell caused issues.</li> <li><a href="http://dev.ckeditor.com/ticket/6146">#6146</a> : IE: Floating panels were being opened in the wrong place in RTL pages with horizontal scrollbars.</li> <li><a href="http://dev.ckeditor.com/ticket/6055">#6055</a> : The timestamp is now added only once to each loaded file.</li> <li><a href="http://dev.ckeditor.com/ticket/6097">#6097</a> : The bookmarks now use the right name.</li> <li><a href="http://dev.ckeditor.com/ticket/5717">#5717</a> : Removed the scayt_contextMenuOntop setting and the SCAYT context menu options are always on top.</li> <li><a href="http://dev.ckeditor.com/ticket/5956">#5956</a> : [FF] It was impossible to create an editor inside an hidden container.</li> <li><a href="http://dev.ckeditor.com/ticket/5753">#5753</a> : It was impossible to have a default value for the name field in the select dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/6041">#6041</a> : BIDI: Direction of Increase Indent &amp; Decrease Indent icons are not reversed after changing Lang direction to RTL.</li> <li><a href="http://dev.ckeditor.com/ticket/6138">#6138</a> : List indentation is not working.</li> <li><a href="http://dev.ckeditor.com/ticket/5649">#5649</a> : Image dialog too wide when many styles are set.</li> <li><a href="http://dev.ckeditor.com/ticket/5715">#5715</a> : Cell color picker dialog returns focus to document.</li> <li><a href="http://dev.ckeditor.com/ticket/6108">#6108</a> : Fixed div style.</li> <li><a href="http://dev.ckeditor.com/ticket/5336">#5336</a> : Remove object style.</li> <li><a href="http://dev.ckeditor.com/ticket/6155">#6155</a> : [[FF]] Modifying Table Header Properties by selecting first Row, causing several issues.</li> <li><a href="http://dev.ckeditor.com/ticket/6163">#6163</a> : Focus not going to Tabs in Image dialog when we went to Edit the Image.</li> <li><a href="http://dev.ckeditor.com/ticket/6177">#6177</a> : IE we can't start Numbered/Bulleted list on a Empty page.</li> <li><a href="http://dev.ckeditor.com/ticket/6034">#6034</a> : Horizontal Alignment applied to Table cell is not updated correctly in the Toolbar.</li> <li><a href="http://dev.ckeditor.com/ticket/6112">#6112</a> : BIDI: Alignment set to text in Table cell is not shown in the Tool bar when we press Enter to start a new Paragraph.</li> <li><a href="http://dev.ckeditor.com/ticket/6117">#6117</a> : BIDI: Language direction is changing when we come out of Numbered/Bulleted list.</li> <li><a href="http://dev.ckeditor.com/ticket/6182">#6182</a> : Language Direction field on the Advanced tab of Table Properties dialog has a fixed pixel width.</li> <li><a href="http://dev.ckeditor.com/ticket/5487">#5487</a> : Fullpage writer problem with line-break.</li> <li><a href="http://dev.ckeditor.com/ticket/6197">#6197</a> : The CKEDITOR.loader base path auto-detection was not working with the _source folder.</li> <li><a href="http://dev.ckeditor.com/ticket/6240">#6240</a> : Font Names &amp; Font Sizes should be shown Left Align even for RTL Languages.</li> <li><a href="http://dev.ckeditor.com/ticket/5975">#5975</a> : Page-break should have proper Alt Text instead of Unknown object. so that JAWS reads it properly.</li> <li><a href="http://dev.ckeditor.com/ticket/6255">#6255</a> : Inserting a page break as the first node triggered an error.</li> <li><a href="http://dev.ckeditor.com/ticket/6188">#6188</a> : [IE7] Automatic color button had the wrong cursor.</li> <li><a href="http://dev.ckeditor.com/ticket/6129">#6129</a> : The show blocks' labels are now shown in the right for RTL languages.</li> <li><a href="http://dev.ckeditor.com/ticket/5421">#5421</a> : &amp;shy; entity not converted when config.entities=false.</li> <li><a href="http://dev.ckeditor.com/ticket/5769">#5769</a> : xhtml code generation problem &amp;nbsp; instead of &amp;#160; (htmlentities, entities,entities_additional,..., configuration).</li> <li><a href="http://dev.ckeditor.com/ticket/4472">#4472</a> : [FF3] Browser window scrolls to loaded CKEditor.</li> <li><a href="http://dev.ckeditor.com/ticket/6230">#6230</a> : Fixed invalid parameter count for setTimeout function call.</li> <li><a href="http://dev.ckeditor.com/ticket/5335">#5335</a> : Several lines' formatted data will be merged to one line when we apply Numbers/Bullets.</li> <li><a href="http://dev.ckeditor.com/ticket/5353">#5353</a> : wrong width of editor after resize() called in Firefox 3.6.</li> <li><a href="http://dev.ckeditor.com/ticket/5778">#5778</a> : [IE] Unwanted scroll on first mouse right-click.</li> <li><a href="http://dev.ckeditor.com/ticket/5218">#5218</a> : [FF] Copy/paste of an image from same domain changed URL to relative URL.</li> <li><a href="http://dev.ckeditor.com/ticket/6265">#6265</a> : Popup window properties were visible in the link dialog's target tab when nothing was selected.</li> <li><a href="http://dev.ckeditor.com/ticket/6075">#6075</a> : [FF] Newly created links didn't fill in information on edit.</li> <li><a href="http://dev.ckeditor.com/ticket/6183">#6183</a> : The toolbar panels options sometimes had the contents' link color.</li> <li><a href="http://dev.ckeditor.com/ticket/6192">#6192</a> : [WebKit] Inserting smileys was not working because of editor focus issues.</li> <li><a href="http://dev.ckeditor.com/ticket/6178">#6178</a> : [WebKit] Inserting elements by code was failing if the editor didn't receive the focus first.</li> <li><a href="http://dev.ckeditor.com/ticket/6179">#6179</a> : [WebKit] The Image dialog was not working if the editor didn't receive the focus first.</li> <li><a href="http://dev.ckeditor.com/ticket/4657">#4657</a> : [Opera] Styles where not working with collapsed selections.</li> <li><a href="http://dev.ckeditor.com/ticket/5839">#5839</a> : "Insert row after" was removing the ids of the elements from the clicked row.</li> <li><a href="http://dev.ckeditor.com/ticket/6315">#6315</a> : DIV plugin TT #2885 regression.</li> <li>Updated the following language files:<ul> <li><a href="http://dev.ckeditor.com/ticket/6246">#6246</a> : Chinese Simplified;</li> <li><a href="http://dev.ckeditor.com/ticket/6256">#6256</a> : Dutch;</li> <li><a href="http://dev.ckeditor.com/ticket/6271">#6271</a> : English;</li> </ul></li> </ul> <h3> CKEditor 3.4</h3> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/6118">#6118</a> : Initial focus is now set to the tabs in the table properties dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/6135">#6135</a> : The dialogadvtab plugin now uses the correct label.</li> <li><a href="http://dev.ckeditor.com/ticket/6125">#6125</a> : Focus was lost after applying commands in Opera.</li> <li><a href="http://dev.ckeditor.com/ticket/6137">#6137</a> : The table dialog was missing the default width value on second opening.</li> </ul> <h3> CKEditor 3.4 Beta</h3> <p> New features:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/5909">#5909</a> : New BiDi feature, making it possible to switch the base language direction of block elements.</li> <li><a href="http://dev.ckeditor.com/ticket/5268">#5268</a> : Introducing the "tableresize" plugin, which makes it possible to resize tables columns by mouse drag. It's not enabled by default, so it must be enabled in the configurations file.</li> <li><a href="http://dev.ckeditor.com/ticket/979">#979</a> : New <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.enableTabKeyTools">enableTabKeyTools</a> configuration to allow using the TAB key to navigate through table cells.</li> <li><a href="http://dev.ckeditor.com/ticket/4606">#4606</a> : Introduce the "autogrow" plugin, which makes the editor resize automatically, based on the contents size.</li> <li><a href="http://dev.ckeditor.com/ticket/5737">#5737</a> : Added support for the <a href="http://www.w3.org/TR/html5/editing.html#contenteditable">HTML5 contenteditable attribute</a>, making it possible to define read only regions into the editor contents.</li> <li><a href="http://dev.ckeditor.com/ticket/5418">#5418</a> : New "Advanced" tab introduced on the Table Properties dialog. It's based on the new dialogadvtab plugin.</li> <li><a href="http://dev.ckeditor.com/ticket/6082">#6082</a> : Introduced the <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.useComputedState">useComputedState</a> setting, making it possible to control whether toolbar features, like alignment and direction, should reflect the "computed" selection states, even when the effective feature value is not applied.</li> </ul> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/5911">#5911</a> : BiDi: List items should support and retain correct base language direction</li> <li><a href="http://dev.ckeditor.com/ticket/5689">#5689</a> : Make it possible to run CKEditor inside of Firefox chrome.</li> <li><a href="http://dev.ckeditor.com/ticket/6042">#6042</a> : It wasn't possible to align a paragraph with the dir attribute to the opposite direction.</li> <li><a href="http://dev.ckeditor.com/ticket/6058">#6058</a> : Fixed a small style glitch with file upload fields in IE+Quirks.</li> </ul> <h3> CKEditor 3.3.2</h3> <p> New features:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/5882">#5882</a> : Introduce the dialog#selectPage event, replicating the OnDialogTabChange feature available in FCKeditor 2.</li> <li><a href="http://dev.ckeditor.com/ticket/5927">#5927</a> : The native controls in ui.dialog.elements can be styled with the controlStyle definition.</li> </ul> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/1644">#1644</a> : Removed references to cursor:hand in the stylesheets.</li> <li><a href="http://dev.ckeditor.com/ticket/5411">#5411</a> : Anchor, hidden fields and Page-Break objects can no longer be resized.</li> <li><a href="http://dev.ckeditor.com/ticket/5456">#5456</a> : Initial focus incorect in api_dialog sample page.</li> <li><a href="http://dev.ckeditor.com/ticket/5628">#5628</a> : Incorrect &lt;pre&gt; siblings merging.</li> <li><a href="http://dev.ckeditor.com/ticket/5829">#5829</a> : Adding validation for start number field in list style dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/5845">#5845</a> : Context menu on empty list item loses selection.</li> <li><a href="http://dev.ckeditor.com/ticket/5860">#5860</a> : [IE] &gt; in attribute values are incorrectly escaped.</li> <li><a href="http://dev.ckeditor.com/ticket/5905">#5905</a> : SCAYT is not any more enabled by default.</li> <li><a href="http://dev.ckeditor.com/ticket/5736">#5736</a> : Improved the text generated for mailto: links if no text was selected.</li> <li><a href="http://dev.ckeditor.com/ticket/4779">#4779</a> : Adjust resize_minWidth and resize_minHeight if smaller than actual dimensions.</li> <li><a href="http://dev.ckeditor.com/ticket/5687">#5687</a> : Navigation through colors is now compatible with RTL.</li> <li><a href="http://dev.ckeditor.com/ticket/4615">#4615</a> : [IE] Text fields are no longer disrupted in dialog with RTL.</li> <li><a href="http://dev.ckeditor.com/ticket/5887">#5887</a> : The number of columns in the smileys table is now configurable via the smiley_columns setting.</li> <li><a href="http://dev.ckeditor.com/ticket/5100">#5100</a> : It was possible to drag&amp;drop some elements like context menu items or dropdown entries.</li> <li><a href="http://dev.ckeditor.com/ticket/5933">#5933</a> : Text color and background color panels don't have scrollbars anymore under office2003 and v2 skins.</li> <li><a href="http://dev.ckeditor.com/ticket/5943">#5943</a> : An error is no longer generated when using percent or pixel values in the image dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/5951">#5951</a> : Avoid problems with security systems due to the usage of UniversalXPConnect.</li> <li><a href="http://dev.ckeditor.com/ticket/5441">#5441</a> : Avoid errors if the editor instance is removed from the DOM before calling its destroy() method.</li> <li><a href="http://dev.ckeditor.com/ticket/4997">#4997</a> : Provide better access to the native input in the ui.dialog.file element.</li> <li><a href="http://dev.ckeditor.com/ticket/5914">#5914</a> : Modified the Smileys dialog to make active only the images and not their borders.</li> <li><a href="http://dev.ckeditor.com/ticket/5565">#5565</a> : The scrollbar does not behaves erratically when opening a rich combo in RTL page.</li> <li><a href="http://dev.ckeditor.com/ticket/5843">#5843</a> : In CKEditor 3.3: When we set the focus in the 'instanceReady' event, FF3.6 is giving js error.</li> <li><a href="http://dev.ckeditor.com/ticket/5902">#5902</a> : paste and pastetext dialogs cannot be skinned easily.</li> <li><a href="http://dev.ckeditor.com/ticket/5959">#5959</a> : Dialog auto focus does not check for hidden tabs.</li> <li><a href="http://dev.ckeditor.com/ticket/5415">#5415</a> : Undo not working when we change the Table Properties for the table on a saved page.</li> <li><a href="http://dev.ckeditor.com/ticket/5435">#5435</a> : IE: we can't start Numbered/Bulleted list in Tables by Clicking on Insert/Remove Numbers/Bullets Icon.</li> <li><a href="http://dev.ckeditor.com/ticket/5832">#5832</a> : The JQuery adapter sample is not working properly with SSL.</li> <li><a href="http://dev.ckeditor.com/ticket/5728">#5728</a> : Text field &amp; Upload Button in Upload Tab of Image Properties dialog are not shown Properly in Arabic.</li> <li><a href="http://dev.ckeditor.com/ticket/5436">#5436</a> : IE: Cursor goes to next Table Cell after we insert a Smiley in the Table Cell.</li> <li><a href="http://dev.ckeditor.com/ticket/5580">#5580</a> : Maximize does not work properly in the Office 2003 and V2 skins.</li> <li><a href="http://dev.ckeditor.com/ticket/5495">#5495</a> : The link dialog was breaking the undo system on some situations.</li> <li><a href="http://dev.ckeditor.com/ticket/5775">#5775</a> : Required field's label to contain a CSS class to allow it to be styled differently.</li> <li><a href="http://dev.ckeditor.com/ticket/5999">#5999</a> : Table dialog rows and columns fields are now marked as required.</li> <li><a href="http://dev.ckeditor.com/ticket/5693">#5693</a> : baseHref detection in the flash dialog now works correctly.</li> <li><a href="http://dev.ckeditor.com/ticket/5690">#5690</a> : Table cell's width attribute is now respected properly.</li> <li><a href="http://dev.ckeditor.com/ticket/5819">#5819</a> : Introducing the new removeFormatCleanup event and making sure remove format doesn't break the showborder plugin.</li> <li><a href="http://dev.ckeditor.com/ticket/5558">#5558</a> : After pasting on WebKit based browsers the editor now scrolls to the end of the pasted content.</li> <li><a href="http://dev.ckeditor.com/ticket/5799">#5799</a> : Correct plugin dependencies for the liststyle plugin with contextMenu and dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/5436">#5436</a> : IE: The cursor was moving to the wrong position when inserting inline elements at the end of cells on tables.</li> <li><a href="http://dev.ckeditor.com/ticket/5984">#5984</a> : Firefox: CTRL+HOME was creating an unwanted empty paragraph at the start of the document.</li> <li><a href="http://dev.ckeditor.com/ticket/5634">#5634</a> : IE: It was needed to click twice in the editor to make it editable on some situations.</li> <li><a href="http://dev.ckeditor.com/ticket/5338">#5338</a> : Pasting from Open Office could lead on error.</li> <li><a href="http://dev.ckeditor.com/ticket/5224">#5224</a> : Some invalid markup could break the editor.</li> <li><a href="http://dev.ckeditor.com/ticket/5455">#5455</a> : It was not possible to remove formatting from pasted content on specific cases.</li> <li><a href="http://dev.ckeditor.com/ticket/5735">#5735</a> : IE: The editor was having focus issues when the previous selection got hidden by scroll operations.</li> <li><a href="http://dev.ckeditor.com/ticket/5563">#5563</a> : Firefox: The disableObjectResizing and disableNativeTableHandles settings stopped working.</li> <li><a href="http://dev.ckeditor.com/ticket/5781">#5781</a> : Firefox: Editing was not possible in an empty document.</li> <li><a href="http://dev.ckeditor.com/ticket/5293">#5293</a> : Firefox: Unwanted BR tags were being left in the editor output when it should be empty.</li> <li><a href="http://dev.ckeditor.com/ticket/5280">#5280</a> : IE: Scrollbars where reacting improperly when clicking in the bar space.</li> <li><a href="http://dev.ckeditor.com/ticket/5840">#5840</a> : Some dialog access keys are conflicting with "Ctrl + A", select all text behavior on text input.</li> <li><a href="http://dev.ckeditor.com/ticket/6059">#6059</a> : Changing list type didn't preserve the list's attributes.</li> <li><a href="http://dev.ckeditor.com/ticket/5193">#5193</a> : In Firefox, the element path options had the text cursor instead of the arrow.</li> <li><a href="http://dev.ckeditor.com/ticket/6073">#6073</a> : The list context menu was showing the wrong option when in a mixed list hierarchy.</li> <li><a href="http://dev.ckeditor.com/ticket/6074">#6074</a> : The Insert Table Column command was duplicating the selected column cells ids.</li> <li><a href="http://dev.ckeditor.com/ticket/6066">#6066</a> : The toolbar combos had the text cursor instead of the arrow.</li> <li><a href="http://dev.ckeditor.com/ticket/6062">#6062</a> : The toolbar buttons had the text cursor instead of the arrow.</li> <li><a href="http://dev.ckeditor.com/ticket/6068">#6068</a> : [IE7] A few labels were hidden in a RTL language.</li> <li><a href="http://dev.ckeditor.com/ticket/6000">#6000</a> : Safari and Chrome where scrolling the contents to the top when moving the focus to the editor.</li> <li><a href="http://dev.ckeditor.com/ticket/6090">#6090</a> : IE: Textarea with selection inside causes Link dialog issues.</li> <li><a href="http://dev.ckeditor.com/ticket/5079">#5079</a> : Page break in lists move to above the list when you switch from WYSIWYG to HTML mode and back.</li> <li>Updated the following language files:<ul> <li>Chinese Simplified;</li> <li>Hebrew;</li> <li><a href="http://dev.ckeditor.com/ticket/5962">#5962</a> : German;</li> <li><a href="http://dev.ckeditor.com/ticket/5645">#5645</a> : Portuguese;</li> <li><a href="http://dev.ckeditor.com/ticket/5797">#5797</a> : Turkish;</li> </ul></li> </ul> <h3> CKEditor 3.3.1</h3> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/5780">#5780</a> : Text selection lost when opening some of the dialogs.</li> <li><a href="http://dev.ckeditor.com/ticket/5787">#5787</a> : Liststyle plugin wasn't packaged into the core (CKEDITOR.resourceManager.load exception).</li> <li><a href="http://dev.ckeditor.com/ticket/5637">#5637</a> : Fix wrong nesting that generated "&lt;head&gt; must be a child of &lt;html&gt;" warning in Webkit.</li> <li><a href="http://dev.ckeditor.com/ticket/5790">#5790</a> : Internal only attributes output on fullpage &lt;html&gt; tag.</li> <li><a href="http://dev.ckeditor.com/ticket/5761">#5761</a> : [IE] Color dialog matrix buttons are barely clickable in quirks mode.</li> <li><a href="http://dev.ckeditor.com/ticket/5759">#5759</a> : [IE] Clicking on the scrollbar and then on the host page causes error.</li> <li><a href="http://dev.ckeditor.com/ticket/5772">#5772</a> : List style dialog is missing tab page ids.</li> <li><a href="http://dev.ckeditor.com/ticket/5782">#5782</a> : [FF] Wysiwyg mode is broken by 'display' style changes on editor's parent DOM tree.</li> <li><a href="http://dev.ckeditor.com/ticket/5801">#5801</a> : [IE] contentEditable="false" doesn't apply in effect on inline-elements.</li> <li><a href="http://dev.ckeditor.com/ticket/5794">#5794</a> : Empty find matching twice results in JavaScript error.</li> <li><a href="http://dev.ckeditor.com/ticket/5732">#5732</a> : If it isn't possible to connect to the SCAYT servers the dialogs might hang in Firefox. Fix for Firefox&gt;=3.6.</li> <li><a href="http://dev.ckeditor.com/ticket/5807">#5807</a> : [FF2] New page command results in uneditable document.</li> <li><a href="http://dev.ckeditor.com/ticket/5807">#5807</a> : [FF2] SCAYT plugin is disabled in Firefox2 due to selection interference.</li> <li><a href="http://dev.ckeditor.com/ticket/5772">#5772</a> : [IE] Some numbered list style types are not supported by IE6/7 and causes JavaScript error.</li> </ul> <h3> CKEditor 3.3</h3> <p> New features:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/635">#635</a> : The properties dialog will now open when double clicking on objects.</li> <li><a href="http://dev.ckeditor.com/ticket/3893">#3893</a> : It's now possible to indent/outdent lists when selecting the first list item.</li> <li><a href="http://dev.ckeditor.com/ticket/4968">#4968</a> : The <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.contentsLangDirection">contentsLangDirection</a> setting now has a default value 'ui' which inherit language direction from the editor UI language.</li> <li><a href="http://dev.ckeditor.com/ticket/4649">#4649</a> : The color picker dialog is now accessible.</li> <li><a href="http://dev.ckeditor.com/ticket/3593">#3593</a> : The editing area is now enabled by contentEditable="true" instead of designMode="on" to allow creating uneditable content elements in all browsers.</li> <li><a href="http://dev.ckeditor.com/ticket/4056">#4056</a> : Hidden fields will now be displayed as fake element just like in FCKeditor 2.</li> </ul> <h3> CKEditor 3.2.2</h3> <p> New features:</p> <ul> <li>The SCAYT spell checker is now enabled by default through the <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.scayt_autoStartup">autoStartup</a> setting.</li> <li><a href="http://dev.ckeditor.com/ticket/5631">#5631</a> : The SCAYT context menu options can now be reorganized through the <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.scayt_contextMenuItemsOrder">scayt_contextMenuItemsOrder</a> setting.</li> <li><a href="http://dev.ckeditor.com/ticket/4231">#4231</a> : Introducing the <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.resize_dir">resize_dir setting</a>, to be able to restrict manual resizing of the editor to only one direction (horizontal/vertical).</li> <li><a href="http://dev.ckeditor.com/ticket/5479">#5479</a> : Introducing the classic ASP integration files and samples.</li> <li><a href="http://dev.ckeditor.com/ticket/5024">#5024</a> : Added samples (<a href="http://nightly.ckeditor.com/latest/ckeditor/_samples/output_html.html">HTML</a> and <a href="http://nightly.ckeditor.com/latest/ckeditor/_samples/output_xhtml.html">XHTML</a>) to show how to output HTML using fonts and other attributes instead of styles.</li> <li><a href="http://dev.ckeditor.com/ticket/4358">#4358</a> : Introduced the List Properties dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/5485">#5485</a> : Adding the <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.contentsLanguage">contentsLanguage</a> configuration option to be able to set the language for the editor contents.</li> </ul> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/5330">#5330</a> : Corrected detection of CTRL and META keys in Macs for the context menu.</li> <li><a href="http://dev.ckeditor.com/ticket/5434">#5434</a> : Fixed access denied issues with IE when accessing web sites through IPv6 IP addresses.</li> <li><a href="http://dev.ckeditor.com/ticket/4476">#4476</a> : [IE] Inaccessible empty list item contains sub list.</li> <li><a href="http://dev.ckeditor.com/ticket/4881">#4881</a> : [IE] Selection range broken because of cutting a single control type element from it.</li> <li><a href="http://dev.ckeditor.com/ticket/5505">#5505</a> : Image dialog throw JavaScript error when click close dialog before preview area is loading.</li> <li><a href="http://dev.ckeditor.com/ticket/5144">#5144</a> : [Chrome] Paste in Webkit sometimes leaves extra 'div' element.</li> <li><a href="http://dev.ckeditor.com/ticket/5021">#5021</a> : [Firefox] Typing in empty document start from second line when <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.enterMode">enterMode</a> = CKEDITOR.ENTER_BR.</li> <li><a href="http://dev.ckeditor.com/ticket/5416">#5416</a> : [IE] Delete table throws a error when <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.enterMode">enterMode</a> = CKEDITOR.ENTER_BR.</li> <li><a href="http://dev.ckeditor.com/ticket/4459">#4459</a> : [IE] Select element is penetrating the maximized editor in IE6.</li> <li><a href="http://dev.ckeditor.com/ticket/5559">#5559</a> : [IE] The first call to <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#setData">setData</a> is affected by iframe cache when loading the wysiwyg mode.</li> <li><a href="http://dev.ckeditor.com/ticket/5567">#5567</a> : [IE] Remove inline styles in some case doesn't join identical siblings.</li> <li><a href="http://dev.ckeditor.com/ticket/5450">#5450</a> : [FireFox] Press ENTER on 'replace' button result wrong.</li> <li><a href="http://dev.ckeditor.com/ticket/5121">#5121</a> : Recognizes the &lt;br /&gt; tag as a separator when apply block styles and <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.enterMode">enterMode</a> = CKEDITOR.ENTER_BR.</li> <li><a href="http://dev.ckeditor.com/ticket/5575">#5575</a> : <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.html#.replaceAll">CKEDITOR.replaceAll</a> should consider all kind of white spaces between class names.</li> <li><a href="http://dev.ckeditor.com/ticket/5582">#5582</a> : Prevent the default behavior when click the 'x' button to close dialog box.</li> <li><a href="http://dev.ckeditor.com/ticket/5584">#5584</a> : ENTER key with <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.forceEnterMode">forceEnterMode</a> turns on doesn't inherit current block attributes.</li> <li><a href="http://dev.ckeditor.com/ticket/4797">#4797</a> : [Opera] Press ENTER key in dialog fields to close throws JavaScript error.</li> <li><a href="http://dev.ckeditor.com/ticket/5578">#5578</a> : Add flash fake element align property when switch mode (source to wysiwyg).</li> <li><a href="http://dev.ckeditor.com/ticket/5577">#5577</a> : Update delete column behavior when choose multiple cells in the same column.</li> <li><a href="http://dev.ckeditor.com/ticket/5512">#5512</a> : Open context menu with SHIFT+F10 doesn't get correct editor selection.</li> <li><a href="http://dev.ckeditor.com/ticket/5433">#5433</a> : English protocol text directions in Link dialog are not incorrect in 'rtl' UI languages.</li> <li><a href="http://dev.ckeditor.com/ticket/5553">#5553</a> : Paste dialog clipboard area text direction is incorrect for 'rtl' content languages.</li> <li><a href="http://dev.ckeditor.com/ticket/4734">#4734</a> : Font size resets when font name is changed in an empty numbered list.</li> <li><a href="http://dev.ckeditor.com/ticket/5237">#5237</a> : English text in dialogs' title is flipped when using RTL language.</li> <li><a href="http://dev.ckeditor.com/ticket/3257">#3257</a> : Create list doesn't keep blocks as headings.</li> <li><a href="http://dev.ckeditor.com/ticket/5111">#5111</a> : [Firefox] JAWS doesn't respect PC cursor mode (application role) on toolbar.</li> <li><a href="http://dev.ckeditor.com/ticket/5530">#5530</a> : Page break for printing can't be removed with undo.</li> <li><a href="http://dev.ckeditor.com/ticket/5381">#5381</a> : Unable to place cursor between two paragraphs in body.</li> <li><a href="http://dev.ckeditor.com/ticket/5568">#5568</a> : [IE6/7] Selecting a entire table cell changes the original range.</li> <li><a href="http://dev.ckeditor.com/ticket/5623">#5623</a> : [Firefox] Apply style that edges another inline style result incorrect.</li> <li><a href="http://dev.ckeditor.com/ticket/5586">#5586</a> : [Firefox] Maximize the second editor ruins full screen mode.</li> <li><a href="http://dev.ckeditor.com/ticket/5617">#5617</a> : HTML filter system does not allow two 'text' filter rules.</li> <li><a href="http://dev.ckeditor.com/ticket/5663">#5663</a> : General memory clean up after destroying last instance.</li> <li><a href="http://dev.ckeditor.com/ticket/5461">#5461</a> : [IE] Fix Paste from Word dialog doesn't accept imput problem.</li> <li><a href="http://dev.ckeditor.com/ticket/5676">#5676</a> : Make color buttons use RRGGBB instead of RGB for better compatibility with IE.</li> <li><a href="http://dev.ckeditor.com/ticket/4948">#4948</a> : [Safari] Select the first/last cell of table to open context menu may lead to undetected table.</li> <li><a href="http://dev.ckeditor.com/ticket/5591">#5591</a> : [Firefox] Select a list item makes selected element broken.</li> <li><a href="http://dev.ckeditor.com/ticket/5667">#5667</a> : Pasting in a RTL page content causes shows up the horizontal scrollbar.</li> <li><a href="http://dev.ckeditor.com/ticket/5688">#5688</a> : Duplicate ids are used in dialog definition.</li> <li><a href="http://dev.ckeditor.com/ticket/5719">#5719</a> : [IE] 'change' dialog event should not be triggered when dialog is already closed.</li> <li><a href="http://dev.ckeditor.com/ticket/5747">#5747</a> : [IE] Error thrown when IE input field editing mode is turned on.</li> <li><a href="http://dev.ckeditor.com/ticket/5516">#5516</a> : IE8: Toolbar buttons have higher bottom padding.</li> <li><a href="http://dev.ckeditor.com/ticket/5402">#5402</a> : SHIFT-ENTER could now be used to exit from preformat block.</li> <li>SCAYT plugin related:<ul> <li><a href="http://dev.ckeditor.com/ticket/4836">#4836</a> : Using SCAYT result in fragile elements when applying inline styles.</li> <li><a href="http://dev.ckeditor.com/ticket/5425">#5425</a> : [Opera] Disable SCAYT plugin for Opera browser.</li> <li><a href="http://dev.ckeditor.com/ticket/5632">#5632</a> : SCAYT word marker is not visible on text with background-color set.</li> <li><a href="http://dev.ckeditor.com/ticket/4125">#4125</a> : Remove Format command incorrectly removes SCAYT word markers.</li> <li><a href="http://dev.ckeditor.com/ticket/5671">#5671</a> : SCAYT bootstrap script could be added multiple times unnecessarily.</li> <li><a href="http://dev.ckeditor.com/ticket/5573">#5573</a> : SCAYT move cursor position after insert element into marked word text.</li> <li><a href="http://dev.ckeditor.com/ticket/5546">#5546</a> : SCAYT interferes with undo/redo commands.</li> <li><a href="http://dev.ckeditor.com/ticket/5570">#5570</a> : [IE] First enabling SCAYT blind cursor in editor.</li> <li><a href="http://dev.ckeditor.com/ticket/5741">#5741</a> : Enable SCAYT cause error in multiple editor instances.</li> <li><a href="http://dev.ckeditor.com/ticket/5744">#5744</a> : Remove editor with SCAYT enabled in source mode throws error.</li> </ul></li> <li>Updated the following language files:<ul> <li><a href="http://dev.ckeditor.com/ticket/5432">#5432</a> : Dutch;</li> <li><a href="http://dev.ckeditor.com/ticket/5619">#5619</a> : Finnish;</li> <li><a href="http://dev.ckeditor.com/ticket/5515">#5515</a> : Hebrew;</li> <li><a href="http://dev.ckeditor.com/ticket/5588">#5588</a> : Turkish;</li> </ul></li> </ul> <h3> CKEditor 3.2.1</h3> <p> New features:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/4478">#4478</a> : Enable the SelectAll command in source mode.</li> <li><a href="http://dev.ckeditor.com/ticket/5150">#5150</a> : Allow names in the CKEDITOR.config.colorButton_colors setting.</li> <li><a href="http://dev.ckeditor.com/ticket/4810">#4810</a> : Adding configuration option for image dialog preview area filling text.</li> <li><a href="http://dev.ckeditor.com/ticket/536">#536</a> : Object style now could be applied on any parent element of current selection.</li> <li><a href="http://dev.ckeditor.com/ticket/5290">#5290</a> : Unified stylesSet loading removing dependencies from the styles combo. Now the configuration entry is named 'config.stylesSet' instead of config.stylesCombo_stylesSet and the default location is under the 'styles' plugin instead of 'stylescombo'.</li> <li><a href="http://dev.ckeditor.com/ticket/5352">#5352</a> : Allow to define the stylesSet array in the config object for the editor.</li> <li><a href="http://dev.ckeditor.com/ticket/5302">#5302</a> : Adding config option "forceEnterMode".</li> <li><a href="http://dev.ckeditor.com/ticket/5216">#5216</a> : Extend CKEDITOR.appendTo to allow a data parameter for the initial value.</li> <li><a href="http://dev.ckeditor.com/ticket/5024">#5024</a> : Added sample to show how to output XHTML and avoid deprecated tags.</li> </ul> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/5152">#5152</a> : Indentation using class attribute doesn't work properly.</li> <li><a href="http://dev.ckeditor.com/ticket/4682">#4682</a> : It wasn't possible to edit block elements in IE that had styles like width, height or float.</li> <li><a href="http://dev.ckeditor.com/ticket/4750">#4750</a> : Correcting default order of buttons layout in dialogs on Mac.</li> <li><a href="http://dev.ckeditor.com/ticket/4932">#4932</a> : Fixed collapse button not clickable on simple toolbar.</li> <li><a href="http://dev.ckeditor.com/ticket/5228">#5228</a> : Link dialog is automatically changes protocol when URLs that starts with '?'.</li> <li><a href="http://dev.ckeditor.com/ticket/4877">#4877</a> : Fixed CKEditor displays source code in one long line (IE quirks mode + office2003 skin).</li> <li><a href="http://dev.ckeditor.com/ticket/5132">#5132</a> : Apply inline style leaks into sibling words which are seperated spaces.</li> <li><a href="http://dev.ckeditor.com/ticket/3599">#3599</a> : Background color style on sized text displayed as narrow band behind.</li> <li><a href="http://dev.ckeditor.com/ticket/4661">#4661</a> : Translation missing in link dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/5240">#5240</a> : Flash alignment property is not presented visually on fake element.</li> <li><a href="http://dev.ckeditor.com/ticket/4910">#4910</a> : Pasting in IE scrolls document to the end.</li> <li><a href="http://dev.ckeditor.com/ticket/5041">#5041</a> : Table summary attribute can't be removed with dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/5124">#5124</a> : All inline styles cannot be applied on empty spaces.</li> <li><a href="http://dev.ckeditor.com/ticket/3570">#3570</a> : SCAYT marker shouldn't appear inside elements path bar.</li> <li><a href="http://dev.ckeditor.com/ticket/4553">#4553</a> : Dirty check result incorrect when editor document is empty.</li> <li><a href="http://dev.ckeditor.com/ticket/4555">#4555</a> : Unreleased memory when editor is created and destroyed.</li> <li><a href="http://dev.ckeditor.com/ticket/5118">#5118</a> : Arrow keys navigation in RTL languages is incorrect.</li> <li><a href="http://dev.ckeditor.com/ticket/4721">#4721</a> : Remove attribute 'value' of checkbox in IE.</li> <li><a href="http://dev.ckeditor.com/ticket/5278">#5278</a> : IE: Add validation to check for bad window names of popup window.</li> <li><a href="http://dev.ckeditor.com/ticket/5171">#5171</a> : Dialogs contains lists don't have proper voice labels.</li> <li><a href="http://dev.ckeditor.com/ticket/4791">#4791</a> : Can't place cursor inside a form that end with a checkbox/radio.</li> <li><a href="http://dev.ckeditor.com/ticket/4479">#4479</a> : StylesCombo doesn't reflect the selection state until it's first opened.</li> <li><a href="http://dev.ckeditor.com/ticket/4717">#4717</a> : 'Unlink' and 'Outdent' command buttons should be disabled on editor startup.</li> <li><a href="http://dev.ckeditor.com/ticket/5119">#5119</a> : Disabled command buttons are not being properly styled when focused.</li> <li><a href="http://dev.ckeditor.com/ticket/5307">#5307</a> : Hide dialog page cause problem when there's two tab pages remain.</li> <li><a href="http://dev.ckeditor.com/ticket/5343">#5343</a> : Active list item ARIA role is wrongly placed.</li> <li><a href="http://dev.ckeditor.com/ticket/3599">#3599</a> : Background color style applying to text with font size style has been narrowly rendered.</li> <li><a href="http://dev.ckeditor.com/ticket/4711">#4711</a> : Line break character inside preformatted text makes it unable to type text at the end of previous line.</li> <li><a href="http://dev.ckeditor.com/ticket/4829">#4829</a> : [IE] Apply style from combo has wrong result on manually created selection.</li> <li><a href="http://dev.ckeditor.com/ticket/4830">#4830</a> : Retrieving selected element isn't always right, especially selecting using keyboard (SHIFT+ARROW).</li> <li><a href="http://dev.ckeditor.com/ticket/5128">#5128</a> : Element attribute inside preformatted text is corrupted when converting to other blocks.</li> <li><a href="http://dev.ckeditor.com/ticket/5190">#5190</a> : Template list entry shouldn't gain initial focus open templates list dialog opens.</li> <li><a href="http://dev.ckeditor.com/ticket/5238">#5238</a> : Menu button doesn't display arrow icon in high-contrast mode.</li> <li><a href="http://dev.ckeditor.com/ticket/3576">#3576</a> : Non-attributed element of the same name with the applied style is incorrectly removed.</li> <li><a href="http://dev.ckeditor.com/ticket/5221">#5221</a> : Insert table into empty document cause JavaScript error thrown.</li> <li><a href="http://dev.ckeditor.com/ticket/5242">#5242</a> : Apply 'automatic' color option of text color incorrectly removes background-color style.</li> <li><a href="http://dev.ckeditor.com/ticket/4719">#4719</a> : IE does not escape attribute values properly.</li> <li><a href="http://dev.ckeditor.com/ticket/5170">#5170</a> : Firefox does not insert text into styled element properly.</li> <li><a href="http://dev.ckeditor.com/ticket/4026">#4026</a> : Office2003 skin has no toolbar button borders in High Contrast in IE7.</li> <li><a href="http://dev.ckeditor.com/ticket/4348">#4348</a> : There should have exception thrown when 'CKEDITOR_BASEPATH' couldn't be figured out automatically.</li> <li><a href="http://dev.ckeditor.com/ticket/5364">#5364</a> : Focus may not be put into dialog correctly when dialog skin file is loading slow.</li> <li><a href="http://dev.ckeditor.com/ticket/4016">#4016</a> : Justify the layout of forms select dialog in Chrome and IE7.</li> <li><a href="http://dev.ckeditor.com/ticket/5373">#5373</a> : Variable 'pathBlockElements' defines wrong items in CKEDITOR.dom.elementPath.</li> <li><a href="http://dev.ckeditor.com/ticket/5082">#5082</a> : Ctrl key should be described as Cmd key on Mac.</li> <li><a href="http://dev.ckeditor.com/ticket/5182">#5182</a> : Context menu is not been announced correctly by ATs.</li> <li><a href="http://dev.ckeditor.com/ticket/4898">#4898</a> : Can't navigate outside table under the last paragraph of document.</li> <li><a href="http://dev.ckeditor.com/ticket/4950">#4950</a> : List commands could compromise list item attribute and styles.</li> <li><a href="http://dev.ckeditor.com/ticket/5018">#5018</a> : Find result highlighting remove normal font color styles unintentionally.</li> <li><a href="http://dev.ckeditor.com/ticket/5376">#5376</a> : Unable to exit list from within a empty block under list item.</li> <li><a href="http://dev.ckeditor.com/ticket/5145">#5145</a> : Various SCAYT fixes.</li> <li><a href="http://dev.ckeditor.com/ticket/5319">#5319</a> : Match whole word doesn't work anymore after replacement has happened.</li> <li><a href="http://dev.ckeditor.com/ticket/5363">#5363</a> : 'title' attribute now presents on all editor iframes.</li> <li><a href="http://dev.ckeditor.com/ticket/5374">#5374</a> : Unable to toggle inline style when the selection starts at the linefeed of the previous paragraph.</li> <li><a href="http://dev.ckeditor.com/ticket/4513">#4513</a> : Selected link element is not always correctly detected when using keyboard arrows to perform such selection.</li> <li><a href="http://dev.ckeditor.com/ticket/5372">#5372</a> : Newly created sub list should inherit nothing from the original (parent) list, except the list type.</li> <li><a href="http://dev.ckeditor.com/ticket/5274">#5274</a> : [IE6] Templates preview image is displayed in wrong size.</li> <li><a href="http://dev.ckeditor.com/ticket/5292">#5292</a> : Preview in font size and family doesn't work with custom styles.</li> <li><a href="http://dev.ckeditor.com/ticket/5396">#5396</a> : Selection is lost when use cell properties dialog to change cell type to header.</li> <li><a href="http://dev.ckeditor.com/ticket/4082">#4082</a> : [IE+Quirks] Preview text in the image dialog is not wrapping.</li> <li><a href="http://dev.ckeditor.com/ticket/4197">#4197</a> : Fixing format combo don't hide when editor blur on Safari.</li> <li><a href="http://dev.ckeditor.com/ticket/5401">#5401</a> : The context menu break layout with Office2003 and V2 skin on IE quirks mode.</li> <li><a href="http://dev.ckeditor.com/ticket/4825">#4825</a> : Fixing browser context menu is opened when clicking right mouse button twice.</li> <li><a href="http://dev.ckeditor.com/ticket/5356">#5356</a> : The SCAYT dialog had issues with Prototype enabled pages.</li> <li><a href="http://dev.ckeditor.com/ticket/5266">#5266</a> : SCAYT was disturbing the rendering of TH elements.</li> <li><a href="http://dev.ckeditor.com/ticket/4688">#4688</a> : SCAYT was interfering on checkDirty.</li> <li><a href="http://dev.ckeditor.com/ticket/5429">#5429</a> : High Contrast mode was being mistakenly detected when loading the editor through Dojo's xhrGet.</li> <li><a href="http://dev.ckeditor.com/ticket/5221">#5221</a> : Range is mangled when making collapsed selection in an empty paragraph.</li> <li><a href="http://dev.ckeditor.com/ticket/5261">#5261</a> : Config option 'scayt_autoStartup' slow down editor loading.</li> <li><a href="http://dev.ckeditor.com/ticket/3846">#3846</a> : Google Chrome - No Img properties after inserting.</li> <li><a href="http://dev.ckeditor.com/ticket/5465">#5465</a> : ShiftEnter=DIV doesn't respect list item when pressing ENTER at end of list item.</li> <li><a href="http://dev.ckeditor.com/ticket/5454">#5454</a> : After replaced success, the popup window couldn't be closed and a js error occured.</li> <li><a href="http://dev.ckeditor.com/ticket/4784">#4784</a> : Incorrect cursor position after delete table cells.</li> <li><a href="http://dev.ckeditor.com/ticket/5149">#5149</a> : [FF] Cursor disappears after maximize when the editor has focus.</li> <li><a href="http://dev.ckeditor.com/ticket/5220">#5220</a> : DTD now shows tolerance to &lt;style&gt; appear inside content.</li> <li><a href="http://dev.ckeditor.com/ticket/5440">#5440</a> : Mobile browsers (iPhone, Android...) are marked as incompatible as they don't support editing features.</li> <li><a href="http://dev.ckeditor.com/ticket/5504">#5504</a> : [IE6/7] 'Paste' dialog will always get opened even when user allows the clipboard access dialog when using 'Paste' button.</li> <li>Updated the following language files:<ul> <li><a href="http://dev.ckeditor.com/ticket/5326">#5326</a> : Catalan;</li> <li><a href="http://dev.ckeditor.com/ticket/5370">#5370</a> : Faroese;</li> <li><a href="http://dev.ckeditor.com/ticket/5392">#5392</a> : Finnish;</li> <li><a href="http://dev.ckeditor.com/ticket/4580">#4580</a> : Hungarian;</li> <li><a href="http://dev.ckeditor.com/ticket/5301">#5301</a> : Norwegian;</li> </ul></li> </ul> <h3> CKEditor 3.2</h3> <p> New features:</p> <ul> <li>Several accessibility enhancements:<ul> <li><a href="http://dev.ckeditor.com/ticket/4502">#4502</a> : The editor accessibility is now totally based on <a href="http://www.w3.org/WAI/intro/aria">WAI-ARIA</a>.</li> <li><a href="http://dev.ckeditor.com/ticket/5015">#5015</a> : Adding accessibility help dialog plugin.</li> <li><a href="http://dev.ckeditor.com/ticket/5014">#5014</a> : Keyboard navigation compliance with screen reader suggested keys.</li> <li><a href="http://dev.ckeditor.com/ticket/4595">#4595</a> : Better accessibility in the Templates dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/3389">#3389</a> : Esc/Arrow Key now works for closing sub menu.</li> </ul></li> <li><a href="http://dev.ckeditor.com/ticket/4973">#4973</a> : The Style field in the Div Container dialog is now loading the styles defined in the default styleset used by the Styles toolbar combo.</li> </ul> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/5049">#5049</a> : Form Field list command in JAWS incorrectly lists extra fields.</li> <li><a href="http://dev.ckeditor.com/ticket/5008">#5008</a> : Lock/Unlock ratio buttons in the Image dialog was poorly designed in High Contrast mode.</li> <li><a href="http://dev.ckeditor.com/ticket/3980">#3980</a> : All labels in dialogs now use &lt;label&gt; instead of &lt;div&gt;.</li> <li><a href="http://dev.ckeditor.com/ticket/5213">#5213</a> : Reorganization of some entries in the language files to make it more consistent.</li> <li><a href="http://dev.ckeditor.com/ticket/5199">#5199</a> : In IE, single row toolbars didn't have the bottom padding.</li> </ul> <h3> CKEditor 3.1.1</h3> <p> New features:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/4399">#4399</a> : Improved support for external file browsers by allowing executing a callback function.</li> <li><a href="http://dev.ckeditor.com/ticket/4612">#4612</a> : The text of links is now updated if it matches the URL to which it points to.</li> <li><a href="http://dev.ckeditor.com/ticket/4936">#4936</a> : New localization support for the Welsh language.</li> </ul> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/4272">#4272</a> : Kama skin toolbar was broken in IE+Quirks+RTL.</li> <li><a href="http://dev.ckeditor.com/ticket/4987">#4987</a> : Changed the url which is called by the Browser Server button in the Link tab of Image Properties dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/5030">#5030</a> : The CKEDITOR.timestamp wasn't been appended to the skin.js file.</li> <li><a href="http://dev.ckeditor.com/ticket/4993">#4993</a> : Removed the float style from images when the user selects 'not set' for alignment.</li> <li><a href="http://dev.ckeditor.com/ticket/4944">#4944</a> : Fixed a bug where nested list structures with inconsequent levels were not being pasted correctly from MS Word.</li> <li><a href="http://dev.ckeditor.com/ticket/4637">#4637</a> : Table cells' 'nowrap' attribute was not being loaded by the cell property dialog. Thanks to pomu0325.</li> <li><a href="http://dev.ckeditor.com/ticket/4724">#4724</a> : Using the mouse to insert a link in IE might create incorrect results.</li> <li><a href="http://dev.ckeditor.com/ticket/4640">#4640</a> : Small optimizations for the fileBrowser plugin.</li> <li><a href="http://dev.ckeditor.com/ticket/4583">#4583</a> : The "Target Frame Name" field is now visible when target is set to 'frame' only.</li> <li><a href="http://dev.ckeditor.com/ticket/4863">#4863</a> : Fixing iframedialog's height doesn't stretch to 100% (except IE Quirks).</li> <li><a href="http://dev.ckeditor.com/ticket/4964">#4964</a> : The BACKSPACE key positioning was not correct in some cases with Firefox.</li> <li><a href="http://dev.ckeditor.com/ticket/4980">#4980</a> : Setting border, vspace and hspace of images to zero was not working.</li> <li><a href="http://dev.ckeditor.com/ticket/4773">#4773</a> : The fileBrowser plugin was overwriting onClick functions eventually defined on fileButton elements.</li> <li><a href="http://dev.ckeditor.com/ticket/4731">#4731</a> : The clipboard plugin was missing a reference to the dialog plugin.</li> <li><a href="http://dev.ckeditor.com/ticket/5051">#5051</a> : The about plugin was missing a reference to the dialog plugin.</li> <li><a href="http://dev.ckeditor.com/ticket/5146">#5146</a> : The wsc plugin was missing a reference to the dialog plugin.</li> <li><a href="http://dev.ckeditor.com/ticket/4632">#4632</a> : The print command will now properly break on the insertion point of page break for printing.</li> <li><a href="http://dev.ckeditor.com/ticket/4862">#4862</a> : The English (United Kingdom) language file has been renamed to en-gb.js.</li> <li><a href="http://dev.ckeditor.com/ticket/4618">#4618</a> : Selecting an emoticon or the lock and reset buttons in the image dialog fired the onBeforeUnload event in IE.</li> <li><a href="http://dev.ckeditor.com/ticket/4678">#4678</a> : It was not possible to set tables' width to empty value.</li> <li><a href="http://dev.ckeditor.com/ticket/5012">#5012</a> : Fixed dependency issues with the menu plugin.</li> <li><a href="http://dev.ckeditor.com/ticket/5040">#5040</a> : The editor will not properly ignore font related settings that have extra item separators (semi-colons).</li> <li><a href="http://dev.ckeditor.com/ticket/4046">#4046</a> : Justify should respect config.enterMode = CKEDITOR.ENTER_BR.</li> <li><a href="http://dev.ckeditor.com/ticket/4622">#4622</a> : Inserting tables multiple times was corrupting the undo system.</li> <li><a href="http://dev.ckeditor.com/ticket/4647">#4647</a> : [IE] Selection on an element within positioned container is lost after open context-menu then click one menu item.</li> <li><a href="http://dev.ckeditor.com/ticket/4683">#4683</a> : Double-quote character in attribute values was not escaped in the editor output.</li> <li><a href="http://dev.ckeditor.com/ticket/4762">#4762</a> : [IE] Unexpected vertical-scrolling behavior happens whenever focus is moving out of editor in source mode.</li> <li><a href="http://dev.ckeditor.com/ticket/4772">#4772</a> : Text color was not being applied properly on links.</li> <li><a href="http://dev.ckeditor.com/ticket/4795">#4795</a> : [IE] Press 'Del' key on horizontal line or table result in error.</li> <li><a href="http://dev.ckeditor.com/ticket/4824">#4824</a> : [IE] &lt;br/&gt; at the very first table cell breaks the editor selection.</li> <li><a href="http://dev.ckeditor.com/ticket/4851">#4851</a> : [IE] Delete table rows with context-menu may cause error.</li> <li><a href="http://dev.ckeditor.com/ticket/4951">#4951</a> : Replacing text with empty string was throwing errors.</li> <li><a href="http://dev.ckeditor.com/ticket/4963">#4963</a> : Link dialog was not opening properly for e-mail type links.</li> <li><a href="http://dev.ckeditor.com/ticket/5043">#5043</a> : Removed the possibility of having an unwanted script tag being outputted with the editor contents.</li> <li><a href="http://dev.ckeditor.com/ticket/3678">#3678</a> : There were issues when editing links inside floating divs with IE.</li> <li><a href="http://dev.ckeditor.com/ticket/4763">#4763</a> : Pressing ENTER key with text selected was not deleting the text in some situations.</li> <li><a href="http://dev.ckeditor.com/ticket/5096">#5096</a> : Simple ampersand attribute value doesn't work for more than one occurrence.</li> <li><a href="http://dev.ckeditor.com/ticket/3494">#3494</a> : Context menu is too narrow in some translations.</li> <li><a href="http://dev.ckeditor.com/ticket/5005">#5005</a> : Fixed HTML errors in PHP samples.</li> <li><a href="http://dev.ckeditor.com/ticket/5123">#5123</a> : Fixed broken XHTML in User Interface Languages sample.</li> <li><a href="http://dev.ckeditor.com/ticket/4893">#4893</a> : Editor now understands table cell inline styles.</li> <li><a href="http://dev.ckeditor.com/ticket/4611">#4611</a> : Selection around &lt;select&gt; in editor doesn't cause error anymore.</li> <li><a href="http://dev.ckeditor.com/ticket/4886">#4886</a> : Extra BR tags were being created in the output HTML.</li> <li><a href="http://dev.ckeditor.com/ticket/4933">#4933</a> : Empty tags with BR were being left in the DOM.</li> <li><a href="http://dev.ckeditor.com/ticket/5127">#5127</a> : There were errors when removing dialog definition pages through code.</li> <li><a href="http://dev.ckeditor.com/ticket/4767">#4767</a> : CKEditor was not working when ckeditor_source.js is loaded in the &lt;body&gt; .</li> <li><a href="http://dev.ckeditor.com/ticket/5062">#5062</a> : Avoided security warning message when loading the wysiwyg area in IE6 under HTTPS.</li> <li><a href="http://dev.ckeditor.com/ticket/5135">#5135</a> : The TAB key will now behave properly when in Source mode.</li> <li><a href="http://dev.ckeditor.com/ticket/4988">#4988</a> : It wasn't possible to use forcePasteAsPlainText with Safari on Mac.</li> <li><a href="http://dev.ckeditor.com/ticket/5095">#5095</a> : Safari on Mac deleted the current selection in the editor when Edit menu was clicked.</li> <li><a href="http://dev.ckeditor.com/ticket/5140">#5140</a> : In High Contrast mode, arrows were now been displayed for menus with submenus.</li> <li><a href="http://dev.ckeditor.com/ticket/5163">#5163</a> : The undo system was not working on some specific cases.</li> <li><a href="http://dev.ckeditor.com/ticket/5162">#5162</a> : The ajax sample was throwing errors when loading data.</li> <li><a href="http://dev.ckeditor.com/ticket/4999">#4999</a> : The Template dialog was not generating an undo snapshot.</li> <li>Updated the following language files:<ul> <li><a href="http://dev.ckeditor.com/ticket/5006">#5006</a> : Dutch;</li> <li><a href="http://dev.ckeditor.com/ticket/5039">#5039</a> : Finnish;</li> <li><a href="http://dev.ckeditor.com/ticket/5148">#5148</a> : Hebrew;</li> <li><a href="http://dev.ckeditor.com/ticket/5071">#5071</a> : Russian;</li> <li><a href="http://dev.ckeditor.com/ticket/5147">#5147</a> : Spanish;</li> </ul></li> </ul> <h3> CKEditor 3.1</h3> <p> New features:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/4067">#4067</a> : Introduced the full page editing support (from &lt;html&gt; to &lt;/html&gt;).</li> <li><a href="http://dev.ckeditor.com/ticket/4228">#4228</a> : Introduced the Shared Spaces feature.</li> <li><a href="http://dev.ckeditor.com/ticket/4379">#4379</a> : Introduced the new powerful pasting system and word cleanup procedure, including enhancements to the paste as plain text feature.</li> <li><a href="http://dev.ckeditor.com/ticket/2872">#2872</a> : Introduced the new native PHP API, the first standardized server side support.</li> <li><a href="http://dev.ckeditor.com/ticket/4210">#4210</a> : Added CKEditor plugin for jQuery.</li> <li><a href="http://dev.ckeditor.com/ticket/2885">#2885</a> : Added 'div' dialog and corresponding context menu options.</li> <li><a href="http://dev.ckeditor.com/ticket/4574">#4574</a> : Added the table merging tools and corresponding context menu options.</li> <li><a href="http://dev.ckeditor.com/ticket/4340">#4340</a> : Added the email protection option for link dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/4463">#4463</a> : Added inline CSS support in all places where custom stylesheet could apply.</li> <li><a href="http://dev.ckeditor.com/ticket/3881">#3881</a> : Added color dialog for 'more color' option in color buttons.</li> <li><a href="http://dev.ckeditor.com/ticket/4341">#4341</a> : Added the 'showborder' plugin.</li> <li><a href="http://dev.ckeditor.com/ticket/4549">#4549</a> : Make the anti-cache query string configurable.</li> <li><a href="http://dev.ckeditor.com/ticket/4708">#4708</a> : Added the 'htmlEncodeOutput' config option.</li> <li><a href="http://dev.ckeditor.com/ticket/4342">#4342</a> : Introduced the bodyId and bodyClass settings to specify the id and class. to be used in the editing area at runtime.</li> <li><a href="http://dev.ckeditor.com/ticket/3401">#3401</a> : Introduced the baseHref setting so it's possible to set the URL to be used to resolve absolute and relative URLs in the contents.</li> <li><a href="http://dev.ckeditor.com/ticket/4729">#4729</a> : Added support to fake elements for comments.</li> </ul> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/4707">#4707</a> : Fixed invalid link is requested in image preview.</li> <li><a href="http://dev.ckeditor.com/ticket/4461">#4461</a> : Fixed toolbar separator line along side combo enlarging the toolbar height.</li> <li><a href="http://dev.ckeditor.com/ticket/4596">#4596</a> : Fixed image re-size lock buttons aren't accessible in high-contrast mode.</li> <li><a href="http://dev.ckeditor.com/ticket/4676">#4676</a> : Fixed editing tables using table properties dialog overwrites original style values.</li> <li><a href="http://dev.ckeditor.com/ticket/4714">#4714</a> : Fixed IE6 JavaScript error when editing flash by commit 'Flash' dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/3905">#3905</a> : Fixed 'wysiwyg' mode causes unauthenticated content warnings over SSL in FF 3.5.</li> <li><a href="http://dev.ckeditor.com/ticket/4768">#4768</a> : Fixed open context menu in IE throws js error when focus is not inside document.</li> <li><a href="http://dev.ckeditor.com/ticket/4822">#4822</a> : Fixed applying 'Headers' to existing table does not work in IE.</li> <li><a href="http://dev.ckeditor.com/ticket/4855">#4855</a> : Fixed toolbar doesn't wrap well for 'v2' skin in all browsers.</li> <li><a href="http://dev.ckeditor.com/ticket/4882">#4882</a> : Fixed auto detect paste from MS-Word is not working for Safari.</li> <li><a href="http://dev.ckeditor.com/ticket/4882">#4882</a> : Fixed unexpected margin style left behind on content cleaning up from MS-Word.</li> <li><a href="http://dev.ckeditor.com/ticket/4896">#4896</a> : Fixed paste nested list from MS-Word with measurement units set to cm is broken.</li> <li><a href="http://dev.ckeditor.com/ticket/4899">#4899</a> : Fixed unable to undo pre-formatted style.</li> <li><a href="http://dev.ckeditor.com/ticket/4900">#4900</a> : Fixed ratio-lock inconsistent between browsers.</li> <li><a href="http://dev.ckeditor.com/ticket/4901">#4901</a> : Fixed unable to edit any link with popup window's features in Firefox.</li> <li><a href="http://dev.ckeditor.com/ticket/4904">#4904</a> : Fixed when paste happen from dialog, it always throw JavaScript error.</li> <li><a href="http://dev.ckeditor.com/ticket/4905">#4905</a> : Fixed paste plain text result incorrect when content from dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/4889">#4889</a> : Fixed unable to undo 'New Page' command after typing inside editor.</li> <li><a href="http://dev.ckeditor.com/ticket/4892">#4892</a> : Fixed table alignment style is not properly represented by the wrapping div.</li> <li><a href="http://dev.ckeditor.com/ticket/4918">#4918</a> : Fixed switching mode when maximized is showing background page contents.</li> </ul> <h3> CKEditor 3.0.2</h3> <p> New features:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/4343">#4343</a> : Added the configuration option &#39;browserContextMenuOnCtrl&#39; so it&#39;s possible to enable the default browser context menu by holding the CTRL key.</li> </ul> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/4552">#4552</a> : Fixed float panel doesn't show up since editor instanced been destroyed once.</li> <li><a href="http://dev.ckeditor.com/ticket/3918">#3918</a> : Fixed fake object is editable with Image dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/4053">#4053</a> : Fixed 'Form Properties' missing from context menu when selection collapsed inside form.</li> <li><a href="http://dev.ckeditor.com/ticket/4401">#4401</a> : Fixed customized by removing 'upload' tab page from 'Link dialog' cause JavaScript error.</li> <li><a href="http://dev.ckeditor.com/ticket/4477">#4477</a> : Adding missing tag names in object style elements.</li> <li><a href="http://dev.ckeditor.com/ticket/4567">#4567</a> : Fixed IE throw error when pressing BACKSPACE in source mode.</li> <li><a href="http://dev.ckeditor.com/ticket/4573">#4573</a> : Fixed 'IgnoreEmptyPargraph' config doesn't work with the config 'entities' is set to 'false'.</li> <li><a href="http://dev.ckeditor.com/ticket/4614">#4614</a> : Fixed attribute protection fails because of line-break.</li> <li><a href="http://dev.ckeditor.com/ticket/4546">#4546</a> : Fixed UIColor plugin doesn't work when editor id contains CSS selector preserved keywords.</li> <li><a href="http://dev.ckeditor.com/ticket/4609">#4609</a> : Fixed flash object is lost when loading data from outside editor.</li> <li><a href="http://dev.ckeditor.com/ticket/4625">#4625</a> : Fixed editor stays visible in a div with style 'visibility:hidden'.</li> <li><a href="http://dev.ckeditor.com/ticket/4621">#4621</a> : Fixed clicking below table caused an empty table been generated.</li> <li><a href="http://dev.ckeditor.com/ticket/3373">#3373</a> : Fixed empty context menu when there's no menu item at all.</li> <li><a href="http://dev.ckeditor.com/ticket/4473">#4473</a> : Fixed setting rules on the same element tag name throws error.</li> <li><a href="http://dev.ckeditor.com/ticket/4514">#4514</a> : Fixed press 'Back' button breaks wysiwyg editing mode is Firefox.</li> <li><a href="http://dev.ckeditor.com/ticket/4542">#4542</a> : Fixed unable to access buttons using tab key in Safari and Opera.</li> <li><a href="http://dev.ckeditor.com/ticket/4577">#4577</a> : Fixed relative link url is broken after opening 'Link' dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/4597">#4597</a> : Fixed custom style with same attribute name but different attribute value doesn't work.</li> <li><a href="http://dev.ckeditor.com/ticket/4651">#4651</a> : Fixed 'Deleted' and 'Inserted' text style is not rendering in wysiwyg mode and is wrong is source mode.</li> <li><a href="http://dev.ckeditor.com/ticket/4654">#4654</a> : Fixed 'CKEDITOR.config.font_defaultLabel(fontSize_defaultLabel)' is not working.</li> <li><a href="http://dev.ckeditor.com/ticket/3950">#3950</a> : Fixed table column insertion incorrect when selecting empty cell area.</li> <li><a href="http://dev.ckeditor.com/ticket/3912">#3912</a> : Fixed UIColor not working in IE when page has more than 30+ editors.</li> <li><a href="http://dev.ckeditor.com/ticket/4031">#4031</a> : Fixed mouse cursor on toolbar combo has more than 3 shapes.</li> <li><a href="http://dev.ckeditor.com/ticket/4041">#4041</a> : Fixed open context menu on multiple cells to remove them result in only one removed.</li> <li><a href="http://dev.ckeditor.com/ticket/4185">#4185</a> : Fixed resize handler effect doesn't affect flash object on output.</li> <li><a href="http://dev.ckeditor.com/ticket/4196">#4196</a> : Fixed 'Remove Numbered/Bulleted List' on nested list doesn't work well on nested list.</li> <li><a href="http://dev.ckeditor.com/ticket/4200">#4200</a> : Fixed unable to insert 'password' type filed with attributes.</li> <li><a href="http://dev.ckeditor.com/ticket/4530">#4530</a> : Fixed context menu couldn't open in Opera.</li> <li><a href="http://dev.ckeditor.com/ticket/4536">#4536</a> : Fixed keyboard navigation doesn't work at all in IE quirks mode.</li> <li><a href="http://dev.ckeditor.com/ticket/4584">#4584</a> : Fixed updated link Target field is not updating when updating to certain values.</li> <li><a href="http://dev.ckeditor.com/ticket/4603">#4603</a> : Fixed unable to disable submenu items in contextmenu.</li> <li><a href="http://dev.ckeditor.com/ticket/4672">#4672</a> : Fixed unable to redo the insertion of horizontal line.</li> <li><a href="http://dev.ckeditor.com/ticket/4677">#4677</a> : Fixed 'Tab' key is trapped by hidden dialog elements.</li> <li><a href="http://dev.ckeditor.com/ticket/4073">#4073</a> : Fixed insert template with replace option could result in empty document.</li> <li><a href="http://dev.ckeditor.com/ticket/4455">#4455</a> : Fixed unable to start editing when image inside document not loaded.</li> <li><a href="http://dev.ckeditor.com/ticket/4517">#4517</a> : Fixed 'dialog_backgroundCoverColor' doesn't work on IE6.</li> <li><a href="http://dev.ckeditor.com/ticket/3165">#3165</a> : Fixed enter key in empty list item before nested one result in collapsed line.</li> <li><a href="http://dev.ckeditor.com/ticket/4527">#4527</a> : Fixed checkbox generate invalid 'checked' attribute.</li> <li><a href="http://dev.ckeditor.com/ticket/1659">#1659</a> : Fixed unable to click below content to start editing in IE with 'config.docType' setting to standard compliant.</li> <li><a href="http://dev.ckeditor.com/ticket/3933">#3933</a> : Fixed extra &lt;br&gt; left at the end of document when the last element is a table.</li> <li><a href="http://dev.ckeditor.com/ticket/4736">#4736</a> : Fixed PAGE UP and PAGE DOWN keys in standards mode are not working.</li> <li><a href="http://dev.ckeditor.com/ticket/4725">#4725</a> : Fixed hitting 'enter' before html comment node produces a JavaScript error.</li> <li><a href="http://dev.ckeditor.com/ticket/4522">#4522</a> : Fixed unable to redo when typing after insert an image with relative url.</li> <li><a href="http://dev.ckeditor.com/ticket/4594">#4594</a> : Fixed context menu goes off-screen when mouse is at right had side of screen.</li> <li><a href="http://dev.ckeditor.com/ticket/4673">#4673</a> : Fixed undo not available straight away if shift key is used to enter first character.</li> <li><a href="http://dev.ckeditor.com/ticket/4690">#4690</a> : Fixed the parsing of nested inline elements.</li> <li><a href="http://dev.ckeditor.com/ticket/4450">#4450</a> : Fixed selecting multiple table cells before apply justify commands generates spurious paragraph in Firefox.</li> <li><a href="http://dev.ckeditor.com/ticket/4733">#4733</a> : Fixed dialog opening sometimes hang up Firefox and Safari.</li> <li><a href="http://dev.ckeditor.com/ticket/4498">#4498</a> : Fixed toolbar collapse button missing tooltip.</li> <li><a href="http://dev.ckeditor.com/ticket/4738">#4738</a> : Fixed inserting table inside bold/italic/underline generates error on ENTER_BR mode.</li> <li><a href="http://dev.ckeditor.com/ticket/4246">#4246</a> : Fixed avoid XHTML deprecated attributes for image styling.</li> <li><a href="http://dev.ckeditor.com/ticket/4543">#4543</a> : Fixed unable to move cursor between table and hr.</li> <li><a href="http://dev.ckeditor.com/ticket/4764">#4764</a> : Fixed wrong exception message when CKEDITOR.editor.append() to non-existing elements.</li> <li><a href="http://dev.ckeditor.com/ticket/4521">#4521</a> : Fixed dialog layout in IE6/7 may have scroll-bar and other weird effects.</li> <li><a href="http://dev.ckeditor.com/ticket/4709">#4709</a> : Fixed inconsistent scroll-bar behavior on IE.</li> <li><a href="http://dev.ckeditor.com/ticket/4776">#4776</a> : Fixed preview page failed to open when relative URl contains in document.</li> <li><a href="http://dev.ckeditor.com/ticket/4812">#4812</a> : Fixed 'Esc' key not working on dialogs in Opera.</li> <li>Updated the following language files:<ul> <li><a href="http://dev.ckeditor.com/ticket/4346">#4346</a> : Dutch;</li> <li><a href="http://dev.ckeditor.com/ticket/4837">#4837</a> : Finnish;</li> <li><a href="http://dev.ckeditor.com/ticket/4371">#4371</a> : Hebrew;</li> <li><a href="http://dev.ckeditor.com/ticket/4371">#4607</a> <a href="http://dev.ckeditor.com/ticket/4713">#4713</a> : Japanese;</li> <li><a href="http://dev.ckeditor.com/ticket/4660">#4660</a> : Norwegian.</li> </ul></li> </ul> <h3> CKEditor 3.0.1</h3> <p> New features:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/4219">#4219</a> : Added fallback mechanism for config.language.</li> <li><a href="http://dev.ckeditor.com/ticket/4194">#4194</a> : Added support for using multiple css style sheets within the editor.</li> </ul> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/3898">#3898</a> : Added validation for URL value in Image dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/3528">#3528</a> : Fixed Context Menu issue when triggered using Shift+F10.</li> <li><a href="http://dev.ckeditor.com/ticket/4028">#4028</a> : Maximize control's tool tip was wrong once it is maximized.</li> <li><a href="http://dev.ckeditor.com/ticket/4237">#4237</a> : Toolbar is chopped off in Safari browser 3.x.</li> <li><a href="http://dev.ckeditor.com/ticket/4241">#4241</a> : Float panels are left on screen while editor is destroyed.</li> <li><a href="http://dev.ckeditor.com/ticket/4274">#4274</a> : Double click event is incorrect handled in 'divreplace' sample.</li> <li><a href="http://dev.ckeditor.com/ticket/4354">#4354</a> : Fixed TAB key on toolbar to not focus disabled buttons.</li> <li><a href="http://dev.ckeditor.com/ticket/3856">#3856</a> : Fixed focus and blur events in source view mode.</li> <li><a href="http://dev.ckeditor.com/ticket/3438">#3438</a> : Floating panels are off by (-1px, 0px) in RTL mode.</li> <li><a href="http://dev.ckeditor.com/ticket/3370">#3370</a> : Refactored use of CKEDITOR.env.isCustomDomain().</li> <li><a href="http://dev.ckeditor.com/ticket/4230">#4230</a> : HC detection caused js error.</li> <li><a href="http://dev.ckeditor.com/ticket/3978">#3978</a> : Fixed setStyle float on IE7 strict.</li> <li><a href="http://dev.ckeditor.com/ticket/4262">#4262</a> : Tab and Shift+Tab was not working to cycle through CTRL+SHIFT+F10 context menu in IE.</li> <li><a href="http://dev.ckeditor.com/ticket/3633">#3633</a> : Default context menu isn't disabled in toolbar, status bar, panels...</li> <li><a href="http://dev.ckeditor.com/ticket/3897">#3897</a> : Now there is no image previews when the URL is empty in image dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/4048">#4048</a> : Context submenu was lacking uiColor.</li> <li><a href="http://dev.ckeditor.com/ticket/3568">#3568</a> : Dialogs now select all text when tabbing to text inputs.</li> <li><a href="http://dev.ckeditor.com/ticket/3727">#3727</a> : Cell Properties dialog was missing color selection option.</li> <li><a href="http://dev.ckeditor.com/ticket/3517">#3517</a> : Fixed "Match cyclic" field in Find &amp; Replace dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/4368">#4368</a> : borderColor table cell attribute haven't worked for none-IE</li> <li><a href="http://dev.ckeditor.com/ticket/4203">#4203</a> : In IE quirks mode + toolbar collapsed + source mode editing block height was incorrect.</li> <li><a href="http://dev.ckeditor.com/ticket/4387">#4387</a> : Fixed: right clicking in Kama skin can lead to a javascript error.</li> <li><a href="http://dev.ckeditor.com/ticket/4397">#4397</a> : Wysiwyg mode caused the host page scroll.</li> <li><a href="http://dev.ckeditor.com/ticket/4385">#4385</a> : Fixed editor's auto adjusting on DOM structure were confusing the dirty checking mechanism.</li> <li><a href="http://dev.ckeditor.com/ticket/4397">#4397</a> : Fixed regression of [3816] where turn on design mode was causing Firefox3 to scroll the host page.</li> <li><a href="http://dev.ckeditor.com/ticket/4254">#4254</a> : Added basic API sample.</li> <li><a href="http://dev.ckeditor.com/ticket/4107">#4107</a> : Normalize css font-family style text for correct comparision.</li> <li><a href="http://dev.ckeditor.com/ticket/3664">#3664</a> : Insert block element in empty editor document should not create new paragraph.</li> <li><a href="http://dev.ckeditor.com/ticket/4037">#4037</a> : 'id' attribute is missing with Flash dialog advanced page.</li> <li><a href="http://dev.ckeditor.com/ticket/4047">#4047</a> : Delete selected control type element when 'Backspace' is pressed on it.</li> <li><a href="http://dev.ckeditor.com/ticket/4191">#4191</a> : Fixed: dialog changes confirmation on image dialog appeared even when no changes have been made.</li> <li><a href="http://dev.ckeditor.com/ticket/4351">#4351</a> : Dash and dot could appear in attribute names.</li> <li><a href="http://dev.ckeditor.com/ticket/4355">#4355</a> : 'maximize' and 'showblock' commands shouldn't take editor focus.</li> <li><a href="http://dev.ckeditor.com/ticket/4504">#4504</a> : Fixed 'Enter'/'Esc' key is not working on dialog button.</li> <li><a href="http://dev.ckeditor.com/ticket/4245">#4245</a> : 'Strange Template' now come with a style attribute for width.</li> <li><a href="http://dev.ckeditor.com/ticket/4512">#4512</a> : Fixed styles plugin incorrectly adding semicolons to style text.</li> <li><a href="http://dev.ckeditor.com/ticket/3855">#3855</a> : Fixed loading unminified _source files when ckeditor_source.js is used.</li> <li><a href="http://dev.ckeditor.com/ticket/3717">#3717</a> : Dialog settings defaults can now be overridden in-page through the CKEDITOR.config object.</li> <li><a href="http://dev.ckeditor.com/ticket/4481">#4481</a> : The 'stylesCombo_stylesSet' configuration entry didn't work for full URLs.</li> <li><a href="http://dev.ckeditor.com/ticket/4480">#4480</a> : Fixed scope attribute in th.</li> <li><a href="http://dev.ckeditor.com/ticket/4467">#4467</a> : Fixed bug to use custom icon in context menus. Thanks to george.</li> <li><a href="http://dev.ckeditor.com/ticket/4190">#4190</a> : Fixed select field dialog layout in Safari.</li> <li><a href="http://dev.ckeditor.com/ticket/4518">#4518</a> : Fixed unable to open dialog without editor focus in IE.</li> <li><a href="http://dev.ckeditor.com/ticket/4519">#4519</a> : Fixed maximize without editor focus throw error in IE.</li> <li>Updated the following language files:<ul> <li><a href="http://dev.ckeditor.com/ticket/3947">#3947</a> : Arabic;</li> <li><a href="http://dev.ckeditor.com/ticket/4466">#4466</a> : Czech;</li> <li><a href="http://dev.ckeditor.com/ticket/4363">#4363</a> : Danish;</li> <li><a href="http://dev.ckeditor.com/ticket/4346">#4346</a> : Dutch;</li> <li><a href="http://dev.ckeditor.com/ticket/4371">#4371</a> <a href="http://dev.ckeditor.com/ticket/4456">#4456</a> : Hebrew;</li> <li><a href="http://dev.ckeditor.com/ticket/4382">#4382</a> : Polish.</li> </ul></li> </ul> <h3> CKEditor 3.0</h3> <p> New features:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/3188">#3188</a> : Introduce &lt;pre&gt; formatting feature when converting from other blocks.</li> <li><a href="http://dev.ckeditor.com/ticket/4445">#4445</a> : editor::setData now support an optional callback parameter.</li> </ul> <p> Fixed issues:</p> <ul> <li><a href="http://dev.ckeditor.com/ticket/2856">#2856</a> : Fixed problem with inches in Paste From Word plugin.</li> <li><a href="http://dev.ckeditor.com/ticket/3929">#3929</a> : Using Paste dialog, the text is pasted into current selection</li> <li><a href="http://dev.ckeditor.com/ticket/3920">#3920</a> : Mouse cursor over characters in Special Character dialog now is correct</li> <li><a href="http://dev.ckeditor.com/ticket/3882">#3882</a> : Fixed an issue with PasteFromWord dialog in which default values was ignored</li> <li><a href="http://dev.ckeditor.com/ticket/3859">#3859</a> : Fixed Flash dialog layout in Webkit</li> <li><a href="http://dev.ckeditor.com/ticket/3852">#3852</a> : Disabled textarea resizing in dialogs</li> <li><a href="http://dev.ckeditor.com/ticket/3831">#3831</a> : The attempt to remove the contextmenu plugin will not anymore break the editor</li> <li><a href="http://dev.ckeditor.com/ticket/3781">#3781</a> : Colorbutton is now disabled in 'source' mode</li> <li><a href="http://dev.ckeditor.com/ticket/3848">#3848</a> : Fixed an issue with Webkit in witch elements in the Image and Link dialogs had wrong dimensions.</li> <li><a href="http://dev.ckeditor.com/ticket/3808">#3808</a> : Fixed UI Color Picker dialog size in example page.</li> <li><a href="http://dev.ckeditor.com/ticket/3658">#3658</a> : Editor had horizontal scrollbar in IE6.</li> <li><a href="http://dev.ckeditor.com/ticket/3819">#3819</a> : The cursor was not visible when applying style to collapsed selections in Firefox 2.</li> <li><a href="http://dev.ckeditor.com/ticket/3809">#3809</a> : Fixed beam cursor when mouse cursor is over text-only buttons in IE.</li> <li><a href="http://dev.ckeditor.com/ticket/3815">#3815</a> : Fixed an issue with the form dialog in which the "enctype" attribute is outputted as "encoding".</li> <li><a href="http://dev.ckeditor.com/ticket/3785">#3785</a> : Fixed an issue in CKEDITOR.tools.htmlEncode() which incorrectly outputs &amp;nbsp; in IE8.</li> <li><a href="http://dev.ckeditor.com/ticket/3820">#3820</a> : Fixed an issue in bullet list command in which a list created at the bottom of another gets merged to the top. </li> <li><a href="http://dev.ckeditor.com/ticket/3830">#3830</a> : Table cell properties dialog doesn't apply to all selected cells.</li> <li><a href="http://dev.ckeditor.com/ticket/3835">#3835</a> : Element path is not refreshed after click on 'newpage'; and safari is not putting focus on document also. </li> <li><a href="http://dev.ckeditor.com/ticket/3821">#3821</a> : Fixed an issue with JAWS in which toolbar items are read inconsistently between virtual cursor modes.</li> <li><a href="http://dev.ckeditor.com/ticket/3789">#3789</a> : The &quot;src&quot; attribute was getting duplicated in some situations.</li> <li><a href="http://dev.ckeditor.com/ticket/3591">#3591</a> : Protecting flash related elements including '&lt;object&gt;', '&lt;embed&gt;' and '&lt;param&gt;'. </li> <li><a href="http://dev.ckeditor.com/ticket/3759">#3759</a> : Fixed CKEDITOR.dom.element::scrollIntoView logic bug which scroll even element is inside viewport. </li> <li><a href="http://dev.ckeditor.com/ticket/3773">#3773</a> : Fixed remove list will merge lines. </li> <li><a href="http://dev.ckeditor.com/ticket/3829">#3829</a> : Fixed remove empty link on output data.</li> <li><a href="http://dev.ckeditor.com/ticket/3730">#3730</a> : Indent is performing on the whole block instead of selected lines in enterMode = BR.</li> <li><a href="http://dev.ckeditor.com/ticket/3844">#3844</a> : Fixed UndoManager register keydown on obsoleted document</li> <li><a href="http://dev.ckeditor.com/ticket/3805">#3805</a> : Enabled SCAYT plugin for IE.</li> <li><a href="http://dev.ckeditor.com/ticket/3834">#3834</a> : Context menu on table caption was incorrect.</li> <li><a href="http://dev.ckeditor.com/ticket/3812">#3812</a> : Fixed an issue in which the editor may show up empty or uneditable in IE7, 8 and Firefox 3.</li> <li><a href="http://dev.ckeditor.com/ticket/3825">#3825</a> : Fixed JS error when opening spellingcheck.</li> <li><a href="http://dev.ckeditor.com/ticket/3862">#3862</a> : Fixed html parser infinite loop on certain malformed source code.</li> <li><a href="http://dev.ckeditor.com/ticket/3639">#3639</a> : Button size was inconsistent.</li> <li><a href="http://dev.ckeditor.com/ticket/3874">#3874</a> : Paste as plain text in Safari loosing lines.</li> <li><a href="http://dev.ckeditor.com/ticket/3849">#3849</a> : Fixed IE8 crashes when applying lists and indenting.</li> <li><a href="http://dev.ckeditor.com/ticket/3876">#3876</a> : Changed dialog checkbox and radio labels to explicit labels.</li> <li><a href="http://dev.ckeditor.com/ticket/3843">#3843</a> : Fixed context submenu position in IE 6 &amp; 7 RTL.</li> <li><a href="http://dev.ckeditor.com/ticket/3864">#3864</a> : [FF]Document is not editable after inserting element on a fresh page.</li> <li><a href="http://dev.ckeditor.com/ticket/3883">#3883</a> : Fixed removing inline style logic incorrect on Firefox2.</li> <li><a href="http://dev.ckeditor.com/ticket/3884">#3884</a> : Empty "href" attribute was duplicated on output data.</li> <li><a href="http://dev.ckeditor.com/ticket/3858">#3858</a> : Fixed the issue where toolbars break up in IE6 and IE7 after the browser is resized.</li> <li><a href="http://dev.ckeditor.com/ticket/3868">#3868</a> : [chrome] SCAYT toolbar options was in reversed order.</li> <li><a href="http://dev.ckeditor.com/ticket/3875">#3875</a> : Fixed an issue in Safari where table row/column/cell menus are not useable when table cells are selected.</li> <li><a href="http://dev.ckeditor.com/ticket/3896">#3896</a> : The editing area was flashing when switching forth and back to source view.</li> <li><a href="http://dev.ckeditor.com/ticket/3894">#3894</a> : Fixed an issue where editor failed to initialize when using the on-demand loading way.</li> <li><a href="http://dev.ckeditor.com/ticket/3903">#3903</a> : Color button plugin doesn't read config entry from editor instance correctly.</li> <li><a href="http://dev.ckeditor.com/ticket/3801">#3801</a> : Comments at the start of the document was lost in IE.</li> <li><a href="http://dev.ckeditor.com/ticket/3871">#3871</a> : Unable to redo when undos to the front of snapshots stack.</li> <li><a href="http://dev.ckeditor.com/ticket/3909">#3909</a> : Move focus from editor into a text input control is broken.</li> <li><a href="http://dev.ckeditor.com/ticket/3870">#3870</a> : The empty paragraph desappears when hitting ENTER after &quot;New Page&quot;.</li> <li><a href="http://dev.ckeditor.com/ticket/3887">#3887</a> : Fixed an issue in which the create list command may leak outside of a selected table cell and into the rest of document.</li> <li><a href="http://dev.ckeditor.com/ticket/3916">#3916</a> : Fixed maximize does not enlarge editor width when width is set.</li> <li><a href="http://dev.ckeditor.com/ticket/3879">#3879</a> : [webkit] Color button panel had incorrect size on first open.</li> <li><a href="http://dev.ckeditor.com/ticket/3839">#3839</a> : Update Scayt plugin to reflect the latest change from SpellChecker.net.</li> <li><a href="http://dev.ckeditor.com/ticket/3742">#3742</a> : Fixed wrong dialog layout for dialogs without tab bar in IE RTL mode .</li> <li><a href="http://dev.ckeditor.com/ticket/3671">#3671</a> : Fixed body fixing should be applied to the real type under fake elements.</li> <li><a href="http://dev.ckeditor.com/ticket/3836">#3836</a> : Fixed remove list in enterMode=BR will merge sibling text to one line.</li> <li><a href="http://dev.ckeditor.com/ticket/3949">#3949</a> : Fixed enterKey within pre-formatted text introduce wrong line-break.</li> <li><a href="http://dev.ckeditor.com/ticket/3878">#3878</a> : Whenever possible, dialogs will not present scrollbars if the content is too big for its standard size.</li> <li><a href="http://dev.ckeditor.com/ticket/3782">#3782</a> : Remove empty list in table cell result in collapsed cell.</li> <li>Updated the following language files:<ul> <li><a href="http://dev.ckeditor.com/ticket/4183">#4183</a> : Basque;</li> <li><a href="http://dev.ckeditor.com/ticket/3837">#3837</a> : Brazilian Portuguese;</li> <li><a href="http://dev.ckeditor.com/ticket/4171">#4171</a> : Catalan;</li> <li><a href="http://dev.ckeditor.com/ticket/4115">#4115</a> : Chinese (Simplified);</li> <li><a href="http://dev.ckeditor.com/ticket/4179">#4179</a> : Chinese (Traditional);</li> <li><a href="http://dev.ckeditor.com/ticket/4102">#4102</a> : Croatian;</li> <li><a href="http://dev.ckeditor.com/ticket/4105">#4105</a> : French;</li> <li><a href="http://dev.ckeditor.com/ticket/4104">#4104</a> : German;</li> <li><a href="http://dev.ckeditor.com/ticket/4116">#4116</a> : Italian;</li> <li><a href="http://dev.ckeditor.com/ticket/4091">#4091</a> : Japanese;</li> <li><a href="http://dev.ckeditor.com/ticket/4120">#4120</a> : Polish;</li> <li><a href="http://dev.ckeditor.com/ticket/3987">#3987</a> : Spanish;</li> <li><a href="http://dev.ckeditor.com/ticket/4089">#4089</a> : Ukrainian;</li> <li><a href="http://dev.ckeditor.com/ticket/4166">#4166</a> : Vietnamese.</li> </ul></li> <li><a href="http://dev.ckeditor.com/ticket/3984">#3984</a> : [IE]The pre-formatted style is generating error.</li> <li><a href="http://dev.ckeditor.com/ticket/3946">#3946</a> : Fixed unable to hide contextmenu.</li> <li><a href="http://dev.ckeditor.com/ticket/3956">#3956</a> : Fixed About dialog in Source Mode for IE.</li> <li><a href="http://dev.ckeditor.com/ticket/3953">#3953</a> : Fixed keystroke for close Paste dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/3951">#3951</a> : Reset size and lock ratio options were not accessible in Image dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/3921">#3921</a> : Fixed Container scroll issue on IE7.</li> <li><a href="http://dev.ckeditor.com/ticket/3940">#3940</a> : Fixed list operation doesn't stop at table.</li> <li><a href="http://dev.ckeditor.com/ticket/3891">#3891</a> : [IE] Fixed 'automatic' font color doesn't work.</li> <li><a href="http://dev.ckeditor.com/ticket/3972">#3972</a> : Fixed unable to remove a single empty list in document in Firefox with enterMode=BR.</li> <li><a href="http://dev.ckeditor.com/ticket/3973">#3973</a> : Fixed list creation error at the end of document.</li> <li><a href="http://dev.ckeditor.com/ticket/3959">#3959</a> : Pasting styled text from word result in content lost.</li> <li><a href="http://dev.ckeditor.com/ticket/3793">#3793</a> : Combined images into sprites.</li> <li><a href="http://dev.ckeditor.com/ticket/3783">#3783</a> : Fixed indenting command in table cells create collapsed paragraph.</li> <li><a href="http://dev.ckeditor.com/ticket/3968">#3968</a> : About dialog layout was broken with IE+Standards+RTL.</li> <li><a href="http://dev.ckeditor.com/ticket/3991">#3991</a> : In IE quirks, text was not visible in v2 and office2003 skins.</li> <li><a href="http://dev.ckeditor.com/ticket/3983">#3983</a> : In IE, we&#39;ll now silently ignore wrong toolbar definition settings which have extra commas being left around.</li> <li>Fixed the following test cases:<ul> <li><a href="http://dev.ckeditor.com/ticket/3992">#3992</a> : core/ckeditor2.html</li> <li><a href="http://dev.ckeditor.com/ticket/4138">#4138</a> : core/plugins.html</li> <li><a href="http://dev.ckeditor.com/ticket/3801">#3801</a> : plugins/htmldataprocessor/htmldataprocessor.html</li> </ul></li> <li><a href="http://dev.ckeditor.com/ticket/3989">#3989</a> : Host page horizontal scrolling a lot when on having righ-to-left direction.</li> <li><a href="http://dev.ckeditor.com/ticket/4001">#4001</a> : Create link around existing image result incorrect.</li> <li><a href="http://dev.ckeditor.com/ticket/3988">#3988</a> : Destroy editor on form submit event cause error.</li> <li><a href="http://dev.ckeditor.com/ticket/3994">#3994</a> : Insert horizontal line at end of document cause error.</li> <li><a href="http://dev.ckeditor.com/ticket/4074">#4074</a> : Indent error with 'indentClasses' config specified.</li> <li><a href="http://dev.ckeditor.com/ticket/4057">#4057</a> : Fixed anchor is lost after switch between editing modes.</li> <li><a href="http://dev.ckeditor.com/ticket/3644">#3644</a> : Image dialog was missin radio lock.</li> <li><a href="http://dev.ckeditor.com/ticket/4014">#4014</a> : Firefox2 had no dialog button backgrounds.</li> <li><a href="http://dev.ckeditor.com/ticket/4018">#4018</a> : Firefox2 had no richcombo text visible.</li> <li><a href="http://dev.ckeditor.com/ticket/4035">#4035</a> : [IE6] Paste dialog size was too small.</li> <li><a href="http://dev.ckeditor.com/ticket/4049">#4049</a> : Kama skin was too wide with config.width.</li> <li>The following released files now doesn't require the _source folder<ul> <li><a href="http://dev.ckeditor.com/ticket/4086">#4086</a> : _samples/ui_languages.html</li> <li><a href="http://dev.ckeditor.com/ticket/4093">#4093</a> : _tests/core/dom/document.html</li> <li><a href="http://dev.ckeditor.com/ticket/4094">#4094</a> : Smiley plugin file</li> <li><a href="http://dev.ckeditor.com/ticket/4097">#4097</a> : No undo/redo support for fontColor and backgroundColor buttons.</li> </ul></li> <li><a href="http://dev.ckeditor.com/ticket/4085">#4085</a> : Paste and Paste from Word dialogs were not well styled in IE+RTL.</li> <li><a href="http://dev.ckeditor.com/ticket/3982">#3982</a> : Fixed enterKey on empty list item result in weird dom structure.</li> <li><a href="http://dev.ckeditor.com/ticket/4101">#4101</a> : Now it is possible to close dialog before gets focus.</li> <li><a href="http://dev.ckeditor.com/ticket/4075">#4075</a> : [IE6/7]Fixed apply custom inline style with "class" attribute failed.</li> <li><a href="http://dev.ckeditor.com/ticket/4087">#4087</a> : [Firefox]Fixed extra blocks created on create list when full document selected.</li> <li><a href="http://dev.ckeditor.com/ticket/4097">#4097</a> : No undo/redo support for fontColor and backgroundColor buttons.</li> <li><a href="http://dev.ckeditor.com/ticket/4111">#4111</a> : Fixed apply block style after inline style applied on full document error.</li> <li><a href="http://dev.ckeditor.com/ticket/3622">#3622</a> : Fixed shift enter with selection not deleting highlighted text.</li> <li><a href="http://dev.ckeditor.com/ticket/4092">#4092</a> : [IE6] Close button was missing for dialog without multiple tabs.</li> <li><a href="http://dev.ckeditor.com/ticket/4003">#4003</a> : Markup on the image dialog was disrupted when removing the border input.</li> <li><a href="http://dev.ckeditor.com/ticket/4096">#4096</a> : Editor content area was pushed down in IE RTL quirks.</li> <li><a href="http://dev.ckeditor.com/ticket/4112">#4112</a> : [FF] Paste dialog had scrollbars in quirks.</li> <li><a href="http://dev.ckeditor.com/ticket/4118">#4118</a> : Dialog dragging was occasionally behaving strangely .</li> <li><a href="http://dev.ckeditor.com/ticket/4077">#4077</a> : The toolbar combos were rendering incorrectly in some languages, like Chinese.</li> <li><a href="http://dev.ckeditor.com/ticket/3622">#3622</a> : The toolbar in the v2 skin was wrapping improperly in some languages.</li> <li><a href="http://dev.ckeditor.com/ticket/4119">#4119</a> : Unable to edit image link with image dialog.</li> <li><a href="http://dev.ckeditor.com/ticket/4117">#4117</a> : Fixed dialog error when transforming image into button.</li> <li><a href="http://dev.ckeditor.com/ticket/4058">#4058</a> : [FF] wysiwyg mode is sometimes not been activated.</li> <li><a href="http://dev.ckeditor.com/ticket/4114">#4114</a> : [IE] RTE + IE6/IE7 Quirks = dialog mispositoned.</li> <li><a href="http://dev.ckeditor.com/ticket/4123">#4123</a> : Some dialog buttons were broken in IE7 quirks.</li> <li><a href="http://dev.ckeditor.com/ticket/4122">#4122</a> : [IE] The image dialog was being rendered improperly when loading an image with long URL.</li> <li><a href="http://dev.ckeditor.com/ticket/4144">#4144</a> : Fixed the white-spaces at the end of &lt;pre&gt; is incorrectly removed.</li> <li><a href="http://dev.ckeditor.com/ticket/4143">#4143</a> : Fixed element id is lost when extracting contents from the range.</li> <li><a href="http://dev.ckeditor.com/ticket/4007">#4007</a> : [IE] Source area overflow from editor chrome.</li> <li><a href="http://dev.ckeditor.com/ticket/4145">#4145</a> : Fixed the on demand (&quot;basic&quot;) loading model of the editor.</li> <li><a href="http://dev.ckeditor.com/ticket/4139">#4139</a> : Fixed list plugin regression of [3903].</li> <li><a href="http://dev.ckeditor.com/ticket/4147">#4147</a> : Unify style text normalization logic when comparing styles.</li> <li><a href="http://dev.ckeditor.com/ticket/4150">#4150</a> : Fixed enlarge list result incorrect at the inner boundary of block.</li> <li><a href="http://dev.ckeditor.com/ticket/4164">#4164</a> : Now it is possible to paste text in Source mode even if forcePasteAsPlainText = true.</li> <li><a href="http://dev.ckeditor.com/ticket/4129">#4129</a> : [FF]Unable to remove list with Ctrl-A.</li> <li><a href="http://dev.ckeditor.com/ticket/4172">#4172</a> : [Safari] The trailing &lt;br&gt; was not been always added to blank lines ending with &amp;nbsp;.</li> <li><a href="http://dev.ckeditor.com/ticket/4178">#4178</a> : It&#39;s now possible to copy and paste Flash content among different editor instances.</li> <li><a href="http://dev.ckeditor.com/ticket/4193">#4193</a> : Automatic font color produced empty span on Firefox 3.5.</li> <li><a href="http://dev.ckeditor.com/ticket/4186">#4186</a> : [FF] Fixed First open float panel cause host page scrollbar blinking.</li> <li><a href="http://dev.ckeditor.com/ticket/4227">#4227</a> : Fixed destroy editor instance created on textarea which is not within form cause error.</li> <li><a href="http://dev.ckeditor.com/ticket/4240">#4240</a> : Fixed editor name containing hyphen break editor completely.</li> <li><a href="http://dev.ckeditor.com/ticket/3828">#3828</a> : Malformed nested list is now corrected by the parser.</li> </ul> <h3> CKEditor 3.0 RC</h3> <p> Changelog starts at this release.</p> <div id="footer"> <hr /> <p> CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a> </p> <p id="copy"> Copyright &copy; 2003-2012, <a href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved. </p> </div> </body> </html>
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/CHANGES.html
HTML
gpl3
166,815
<?php /* * Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * \brief CKEditor class that can be used to create editor * instances in PHP pages on server side. * @see http://ckeditor.com * * Sample usage: * @code * $CKEditor = new CKEditor(); * $CKEditor->editor("editor1", "<p>Initial value.</p>"); * @endcode */ class CKEditor { /** * The version of %CKEditor. */ const version = '3.6.3'; /** * A constant string unique for each release of %CKEditor. */ const timestamp = 'C3HA5RM'; /** * URL to the %CKEditor installation directory (absolute or relative to document root). * If not set, CKEditor will try to guess it's path. * * Example usage: * @code * $CKEditor->basePath = '/ckeditor/'; * @endcode */ public $basePath; /** * An array that holds the global %CKEditor configuration. * For the list of available options, see http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html * * Example usage: * @code * $CKEditor->config['height'] = 400; * // Use @@ at the beggining of a string to ouput it without surrounding quotes. * $CKEditor->config['width'] = '@@screen.width * 0.8'; * @endcode */ public $config = array(); /** * A boolean variable indicating whether CKEditor has been initialized. * Set it to true only if you have already included * &lt;script&gt; tag loading ckeditor.js in your website. */ public $initialized = false; /** * Boolean variable indicating whether created code should be printed out or returned by a function. * * Example 1: get the code creating %CKEditor instance and print it on a page with the "echo" function. * @code * $CKEditor = new CKEditor(); * $CKEditor->returnOutput = true; * $code = $CKEditor->editor("editor1", "<p>Initial value.</p>"); * echo "<p>Editor 1:</p>"; * echo $code; * @endcode */ public $returnOutput = false; /** * An array with textarea attributes. * * When %CKEditor is created with the editor() method, a HTML &lt;textarea&gt; element is created, * it will be displayed to anyone with JavaScript disabled or with incompatible browser. */ public $textareaAttributes = array( "rows" => 8, "cols" => 60 ); /** * A string indicating the creation date of %CKEditor. * Do not change it unless you want to force browsers to not use previously cached version of %CKEditor. */ public $timestamp = "C3HA5RM"; /** * An array that holds event listeners. */ private $events = array(); /** * An array that holds global event listeners. */ private $globalEvents = array(); /** * Main Constructor. * * @param $basePath (string) URL to the %CKEditor installation directory (optional). */ function __construct($basePath = null) { if (!empty($basePath)) { $this->basePath = $basePath; } } /** * Creates a %CKEditor instance. * In incompatible browsers %CKEditor will downgrade to plain HTML &lt;textarea&gt; element. * * @param $name (string) Name of the %CKEditor instance (this will be also the "name" attribute of textarea element). * @param $value (string) Initial value (optional). * @param $config (array) The specific configurations to apply to this editor instance (optional). * @param $events (array) Event listeners for this editor instance (optional). * * Example usage: * @code * $CKEditor = new CKEditor(); * $CKEditor->editor("field1", "<p>Initial value.</p>"); * @endcode * * Advanced example: * @code * $CKEditor = new CKEditor(); * $config = array(); * $config['toolbar'] = array( * array( 'Source', '-', 'Bold', 'Italic', 'Underline', 'Strike' ), * array( 'Image', 'Link', 'Unlink', 'Anchor' ) * ); * $events['instanceReady'] = 'function (ev) { * alert("Loaded: " + ev.editor.name); * }'; * $CKEditor->editor("field1", "<p>Initial value.</p>", $config, $events); * @endcode */ public function editor($name, $value = "", $config = array(), $events = array()) { $attr = ""; foreach ($this->textareaAttributes as $key => $val) { $attr.= " " . $key . '="' . str_replace('"', '&quot;', $val) . '"'; } $out = "<textarea name=\"" . $name . "\"" . $attr . ">" . htmlspecialchars($value) . "</textarea>\n"; if (!$this->initialized) { $out .= $this->init(); } $_config = $this->configSettings($config, $events); $js = $this->returnGlobalEvents(); if (!empty($_config)) $js .= "CKEDITOR.replace('".$name."', ".$this->jsEncode($_config).");"; else $js .= "CKEDITOR.replace('".$name."');"; $out .= $this->script($js); if (!$this->returnOutput) { print $out; $out = ""; } return $out; } /** * Replaces a &lt;textarea&gt; with a %CKEditor instance. * * @param $id (string) The id or name of textarea element. * @param $config (array) The specific configurations to apply to this editor instance (optional). * @param $events (array) Event listeners for this editor instance (optional). * * Example 1: adding %CKEditor to &lt;textarea name="article"&gt;&lt;/textarea&gt; element: * @code * $CKEditor = new CKEditor(); * $CKEditor->replace("article"); * @endcode */ public function replace($id, $config = array(), $events = array()) { $out = ""; if (!$this->initialized) { $out .= $this->init(); } $_config = $this->configSettings($config, $events); $js = $this->returnGlobalEvents(); if (!empty($_config)) { $js .= "CKEDITOR.replace('".$id."', ".$this->jsEncode($_config).");"; } else { $js .= "CKEDITOR.replace('".$id."');"; } $out .= $this->script($js); if (!$this->returnOutput) { print $out; $out = ""; } return $out; } /** * Replace all &lt;textarea&gt; elements available in the document with editor instances. * * @param $className (string) If set, replace all textareas with class className in the page. * * Example 1: replace all &lt;textarea&gt; elements in the page. * @code * $CKEditor = new CKEditor(); * $CKEditor->replaceAll(); * @endcode * * Example 2: replace all &lt;textarea class="myClassName"&gt; elements in the page. * @code * $CKEditor = new CKEditor(); * $CKEditor->replaceAll( 'myClassName' ); * @endcode */ public function replaceAll($className = null) { $out = ""; if (!$this->initialized) { $out .= $this->init(); } $_config = $this->configSettings(); $js = $this->returnGlobalEvents(); if (empty($_config)) { if (empty($className)) { $js .= "CKEDITOR.replaceAll();"; } else { $js .= "CKEDITOR.replaceAll('".$className."');"; } } else { $classDetection = ""; $js .= "CKEDITOR.replaceAll( function(textarea, config) {\n"; if (!empty($className)) { $js .= " var classRegex = new RegExp('(?:^| )' + '". $className ."' + '(?:$| )');\n"; $js .= " if (!classRegex.test(textarea.className))\n"; $js .= " return false;\n"; } $js .= " CKEDITOR.tools.extend(config, ". $this->jsEncode($_config) .", true);"; $js .= "} );"; } $out .= $this->script($js); if (!$this->returnOutput) { print $out; $out = ""; } return $out; } /** * Adds event listener. * Events are fired by %CKEditor in various situations. * * @param $event (string) Event name. * @param $javascriptCode (string) Javascript anonymous function or function name. * * Example usage: * @code * $CKEditor->addEventHandler('instanceReady', 'function (ev) { * alert("Loaded: " + ev.editor.name); * }'); * @endcode */ public function addEventHandler($event, $javascriptCode) { if (!isset($this->events[$event])) { $this->events[$event] = array(); } // Avoid duplicates. if (!in_array($javascriptCode, $this->events[$event])) { $this->events[$event][] = $javascriptCode; } } /** * Clear registered event handlers. * Note: this function will have no effect on already created editor instances. * * @param $event (string) Event name, if not set all event handlers will be removed (optional). */ public function clearEventHandlers($event = null) { if (!empty($event)) { $this->events[$event] = array(); } else { $this->events = array(); } } /** * Adds global event listener. * * @param $event (string) Event name. * @param $javascriptCode (string) Javascript anonymous function or function name. * * Example usage: * @code * $CKEditor->addGlobalEventHandler('dialogDefinition', 'function (ev) { * alert("Loading dialog: " + ev.data.name); * }'); * @endcode */ public function addGlobalEventHandler($event, $javascriptCode) { if (!isset($this->globalEvents[$event])) { $this->globalEvents[$event] = array(); } // Avoid duplicates. if (!in_array($javascriptCode, $this->globalEvents[$event])) { $this->globalEvents[$event][] = $javascriptCode; } } /** * Clear registered global event handlers. * Note: this function will have no effect if the event handler has been already printed/returned. * * @param $event (string) Event name, if not set all event handlers will be removed (optional). */ public function clearGlobalEventHandlers($event = null) { if (!empty($event)) { $this->globalEvents[$event] = array(); } else { $this->globalEvents = array(); } } /** * Prints javascript code. * * @param string $js */ private function script($js) { $out = "<script type=\"text/javascript\">"; $out .= "//<![CDATA[\n"; $out .= $js; $out .= "\n//]]>"; $out .= "</script>\n"; return $out; } /** * Returns the configuration array (global and instance specific settings are merged into one array). * * @param $config (array) The specific configurations to apply to editor instance. * @param $events (array) Event listeners for editor instance. */ private function configSettings($config = array(), $events = array()) { $_config = $this->config; $_events = $this->events; if (is_array($config) && !empty($config)) { $_config = array_merge($_config, $config); } if (is_array($events) && !empty($events)) { foreach ($events as $eventName => $code) { if (!isset($_events[$eventName])) { $_events[$eventName] = array(); } if (!in_array($code, $_events[$eventName])) { $_events[$eventName][] = $code; } } } if (!empty($_events)) { foreach($_events as $eventName => $handlers) { if (empty($handlers)) { continue; } else if (count($handlers) == 1) { $_config['on'][$eventName] = '@@'.$handlers[0]; } else { $_config['on'][$eventName] = '@@function (ev){'; foreach ($handlers as $handler => $code) { $_config['on'][$eventName] .= '('.$code.')(ev);'; } $_config['on'][$eventName] .= '}'; } } } return $_config; } /** * Return global event handlers. */ private function returnGlobalEvents() { static $returnedEvents; $out = ""; if (!isset($returnedEvents)) { $returnedEvents = array(); } if (!empty($this->globalEvents)) { foreach ($this->globalEvents as $eventName => $handlers) { foreach ($handlers as $handler => $code) { if (!isset($returnedEvents[$eventName])) { $returnedEvents[$eventName] = array(); } // Return only new events if (!in_array($code, $returnedEvents[$eventName])) { $out .= ($code ? "\n" : "") . "CKEDITOR.on('". $eventName ."', $code);"; $returnedEvents[$eventName][] = $code; } } } } return $out; } /** * Initializes CKEditor (executed only once). */ private function init() { static $initComplete; $out = ""; if (!empty($initComplete)) { return ""; } if ($this->initialized) { $initComplete = true; return ""; } $args = ""; $ckeditorPath = $this->ckeditorPath(); if (!empty($this->timestamp) && $this->timestamp != "%"."TIMESTAMP%") { $args = '?t=' . $this->timestamp; } // Skip relative paths... if (strpos($ckeditorPath, '..') !== 0) { $out .= $this->script("window.CKEDITOR_BASEPATH='". $ckeditorPath ."';"); } $out .= "<script type=\"text/javascript\" src=\"" . $ckeditorPath . 'ckeditor.js' . $args . "\"></script>\n"; $extraCode = ""; if ($this->timestamp != self::timestamp) { $extraCode .= ($extraCode ? "\n" : "") . "CKEDITOR.timestamp = '". $this->timestamp ."';"; } if ($extraCode) { $out .= $this->script($extraCode); } $initComplete = $this->initialized = true; return $out; } /** * Return path to ckeditor.js. */ private function ckeditorPath() { if (!empty($this->basePath)) { return $this->basePath; } /** * The absolute pathname of the currently executing script. * Note: If a script is executed with the CLI, as a relative path, such as file.php or ../file.php, * $_SERVER['SCRIPT_FILENAME'] will contain the relative path specified by the user. */ if (isset($_SERVER['SCRIPT_FILENAME'])) { $realPath = dirname($_SERVER['SCRIPT_FILENAME']); } else { /** * realpath - Returns canonicalized absolute pathname */ $realPath = realpath( './' ) ; } /** * The filename of the currently executing script, relative to the document root. * For instance, $_SERVER['PHP_SELF'] in a script at the address http://example.com/test.php/foo.bar * would be /test.php/foo.bar. */ $selfPath = dirname($_SERVER['PHP_SELF']); $file = str_replace("\\", "/", __FILE__); if (!$selfPath || !$realPath || !$file) { return "/ckeditor/"; } $documentRoot = substr($realPath, 0, strlen($realPath) - strlen($selfPath)); $fileUrl = substr($file, strlen($documentRoot)); $ckeditorUrl = str_replace("ckeditor_php5.php", "", $fileUrl); return $ckeditorUrl; } /** * This little function provides a basic JSON support. * * @param mixed $val * @return string */ private function jsEncode($val) { if (is_null($val)) { return 'null'; } if (is_bool($val)) { return $val ? 'true' : 'false'; } if (is_int($val)) { return $val; } if (is_float($val)) { return str_replace(',', '.', $val); } if (is_array($val) || is_object($val)) { if (is_array($val) && (array_keys($val) === range(0,count($val)-1))) { return '[' . implode(',', array_map(array($this, 'jsEncode'), $val)) . ']'; } $temp = array(); foreach ($val as $k => $v){ $temp[] = $this->jsEncode("{$k}") . ':' . $this->jsEncode($v); } return '{' . implode(',', $temp) . '}'; } // String otherwise if (strpos($val, '@@') === 0) return substr($val, 2); if (strtoupper(substr($val, 0, 9)) == 'CKEDITOR.') return $val; return '"' . str_replace(array("\\", "/", "\n", "\t", "\r", "\x08", "\x0c", '"'), array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"'), $val) . '"'; } }
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/ckeditor_php5.php
PHP
gpl3
15,333
<?php /* * Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.html or http://ckeditor.com/license */ /*! \mainpage CKEditor - PHP server side intergation * \section intro_sec CKEditor * Visit <a href="http://ckeditor.com">CKEditor web site</a> to find more information about the editor. * \section install_sec Installation * \subsection step1 Include ckeditor.php in your PHP web site. * @code * <?php * include("ckeditor/ckeditor.php"); * ?> * @endcode * \subsection step2 Create CKEditor class instance and use one of available methods to insert CKEditor. * @code * <?php * $CKEditor = new CKEditor(); * echo $CKEditor->textarea("field1", "<p>Initial value.</p>"); * ?> * @endcode */ if ( !function_exists('version_compare') || version_compare( phpversion(), '5', '<' ) ) include_once( 'ckeditor_php4.php' ) ; else include_once( 'ckeditor_php5.php' ) ;
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/ckeditor.php
PHP
gpl3
962
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- == BEGIN TEXT ONLY VERSION == Software License Agreement ========================== CKEditor - The text editor for Internet - http://ckeditor.com Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html (See Appendix A) - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html (See Appendix B) - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html (See Appendix C) You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your license choice. Sources of Intellectual Property Included in CKEditor ===================================================== Where not otherwise indicated, all CKEditor content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, CKEditor will incorporate work done by developers outside of CKSource with their express permission. Trademarks ========== CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders. Appendix A: The GPL License =========================== GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software-to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix B: The LGPL License ============================ GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software-to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages-typically libraries-of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix C: The MPL License =========================== MOZILLA PUBLIC LICENSE Version 1.1 =============== 1. Definitions. 1.0.1. "Commercial Use" means distribution or otherwise making the Covered Code available to a third party. 1.1. "Contributor" means each entity that creates or contributes to the creation of Modifications. 1.2. "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. 1.3. "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. 1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data. 1.5. "Executable" means Covered Code in any form other than Source Code. 1.6. "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. 1.7. "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. 1.8. "License" means this document. 1.8.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. 1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. B. Any new file that contains any part of the Original Code or previous Modifications. 1.10. "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. 1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. 1.11. "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. 1.12. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. 2. Source Code License. 2.1. The Initial Developer Grant. The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and (b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). (c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License. (d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices. 2.2. Contributor Grant. Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). (c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code. (d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor. 3. Distribution Obligations. 3.1. Application of License. The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. 3.2. Availability of Source Code. Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. 3.3. Description of Modifications. You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. 3.4. Intellectual Property Matters (a) Third Party Claims. If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. (b) Contributor APIs. If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file. (c) Representations. Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. 3.5. Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. 3.6. Distribution of Executable Versions. You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. 3.7. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. 4. Inability to Comply Due to Statute or Regulation. If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. 5. Application of this License. This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code. 6. Versions of the License. 6.1. New Versions. Netscape Communications Corporation ("Netscape") may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. 6.2. Effect of New Versions. Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Netscape. No one other than Netscape has the right to modify the terms applicable to Covered Code created under this License. 6.3. Derivative Works. If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", "MPL", "NPL" or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the Mozilla Public License and Netscape Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) 7. DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. 8. TERMINATION. 8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. 8.2. If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that: (a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. (b) any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant. 8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. 8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. 9. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. 10. U.S. GOVERNMENT END USERS. The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. 11. MISCELLANEOUS. This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. 12. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. 13. MULTIPLE-LICENSED CODE. Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". "Multiple-Licensed" means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the NPL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A. EXHIBIT A -Mozilla Public License. ``The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is ______________________________________. The Initial Developer of the Original Code is ________________________. Portions created by ______________________ are Copyright (C) ______ _______________________. All Rights Reserved. Contributor(s): ______________________________________. Alternatively, the contents of this file may be used under the terms of the _____ license (the "[___] License"), in which case the provisions of [______] License are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the [____] License and not to allow others to use your version of this file under the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the [___] License. If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the [___] License." [NOTE: The text of this Exhibit A may differ slightly from the text of the notices in the Source Code files of the Original Code. You should use the text of this Exhibit A rather than the text found in the Original Code Source Code for Your Modifications.] == END TEXT ONLY VERSION == --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>License - CKEditor</title> </head> <body> <h1> Software License Agreement </h1> <p> <strong>CKEditor&trade;</strong> - The text editor for Internet&trade; - <a href="http://ckeditor.com"> http://ckeditor.com</a><br /> Copyright &copy; 2003-2012, <a href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved. </p> <p> Licensed under the terms of any of the following licenses at your choice: </p> <ul> <li><a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a> Version 2 or later (the "GPL");</li> <li><a href="http://www.gnu.org/licenses/lgpl.html">GNU Lesser General Public License</a> Version 2.1 or later (the "LGPL");</li> <li><a href="http://www.mozilla.org/MPL/MPL-1.1.html">Mozilla Public License</a> Version 1.1 or later (the "MPL").</li> </ul> <p> You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "LEGAL" in your version of this software, indicating your license choice. In any case, your choice will not restrict any recipient of your version of this software to use, reproduce, modify and distribute this software under any of the above licenses. </p> <h2> Sources of Intellectual Property Included in CKEditor </h2> <p> Where not otherwise indicated, all CKEditor content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, CKEditor will incorporate work done by developers outside of CKSource with their express permission. </p> <p> <a href="http://developer.yahoo.com/yui/yuitest/">YUI Test</a>: At _source/tests/yuitest.js can be found part of the source code of YUI, which is licensed under the terms of the <a href="http://developer.yahoo.com/yui/license.txt">BSD License</a>. YUI is Copyright &copy; 2008, Yahoo! Inc. </p> <h2> Trademarks </h2> <p> CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders. </p> </body> </html>
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/LICENSE.html
HTML
gpl3
70,729
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add( 'button', { beforeInit : function( editor ) { editor.ui.addHandler( CKEDITOR.UI_BUTTON, CKEDITOR.ui.button.handler ); } }); /** * Button UI element. * @constant * @example */ CKEDITOR.UI_BUTTON = 'button'; /** * Represents a button UI element. This class should not be called directly. To * create new buttons use {@link CKEDITOR.ui.prototype.addButton} instead. * @constructor * @param {Object} definition The button definition. * @example */ CKEDITOR.ui.button = function( definition ) { // Copy all definition properties to this object. CKEDITOR.tools.extend( this, definition, // Set defaults. { title : definition.label, className : definition.className || ( definition.command && 'cke_button_' + definition.command ) || '', click : definition.click || function( editor ) { editor.execCommand( definition.command ); } }); this._ = {}; }; /** * Transforms a button definition in a {@link CKEDITOR.ui.button} instance. * @type Object * @example */ CKEDITOR.ui.button.handler = { create : function( definition ) { return new CKEDITOR.ui.button( definition ); } }; ( function() { CKEDITOR.ui.button.prototype = { /** * Renders the button. * @param {CKEDITOR.editor} editor The editor instance which this button is * to be used by. * @param {Array} output The output array to which append the HTML relative * to this button. * @example */ render : function( editor, output ) { var env = CKEDITOR.env, id = this._.id = CKEDITOR.tools.getNextId(), classes = '', command = this.command, // Get the command name. clickFn; this._.editor = editor; var instance = { id : id, button : this, editor : editor, focus : function() { var element = CKEDITOR.document.getById( id ); element.focus(); }, execute : function() { // IE 6 needs some time before execution (#7922) if ( CKEDITOR.env.ie && CKEDITOR.env.version < 7 ) CKEDITOR.tools.setTimeout( function(){ this.button.click( editor ); }, 0, this ); else this.button.click( editor ); } }; var keydownFn = CKEDITOR.tools.addFunction( function( ev ) { if ( instance.onkey ) { ev = new CKEDITOR.dom.event( ev ); return ( instance.onkey( instance, ev.getKeystroke() ) !== false ); } }); var focusFn = CKEDITOR.tools.addFunction( function( ev ) { var retVal; if ( instance.onfocus ) retVal = ( instance.onfocus( instance, new CKEDITOR.dom.event( ev ) ) !== false ); // FF2: prevent focus event been bubbled up to editor container, which caused unexpected editor focus. if ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 ) ev.preventBubble(); return retVal; }); instance.clickFn = clickFn = CKEDITOR.tools.addFunction( instance.execute, instance ); // Indicate a mode sensitive button. if ( this.modes ) { var modeStates = {}; function updateState() { // "this" is a CKEDITOR.ui.button instance. var mode = editor.mode; if ( mode ) { // Restore saved button state. var state = this.modes[ mode ] ? modeStates[ mode ] != undefined ? modeStates[ mode ] : CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED; this.setState( editor.readOnly && !this.readOnly ? CKEDITOR.TRISTATE_DISABLED : state ); } } editor.on( 'beforeModeUnload', function() { if ( editor.mode && this._.state != CKEDITOR.TRISTATE_DISABLED ) modeStates[ editor.mode ] = this._.state; }, this ); editor.on( 'mode', updateState, this); // If this button is sensitive to readOnly state, update it accordingly. !this.readOnly && editor.on( 'readOnly', updateState, this); } else if ( command ) { // Get the command instance. command = editor.getCommand( command ); if ( command ) { command.on( 'state', function() { this.setState( command.state ); }, this); classes += 'cke_' + ( command.state == CKEDITOR.TRISTATE_ON ? 'on' : command.state == CKEDITOR.TRISTATE_DISABLED ? 'disabled' : 'off' ); } } if ( !command ) classes += 'cke_off'; if ( this.className ) classes += ' ' + this.className; output.push( '<span class="cke_button' + ( this.icon && this.icon.indexOf( '.png' ) == -1 ? ' cke_noalphafix' : '' ) + '">', '<a id="', id, '"' + ' class="', classes, '"', env.gecko && env.version >= 10900 && !env.hc ? '' : '" href="javascript:void(\''+ ( this.title || '' ).replace( "'", '' )+ '\')"', ' title="', this.title, '"' + ' tabindex="-1"' + ' hidefocus="true"' + ' role="button"' + ' aria-labelledby="' + id + '_label"' + ( this.hasArrow ? ' aria-haspopup="true"' : '' ) ); // Some browsers don't cancel key events in the keydown but in the // keypress. // TODO: Check if really needed for Gecko+Mac. if ( env.opera || ( env.gecko && env.mac ) ) { output.push( ' onkeypress="return false;"' ); } // With Firefox, we need to force the button to redraw, otherwise it // will remain in the focus state. if ( env.gecko ) { output.push( ' onblur="this.style.cssText = this.style.cssText;"' ); } output.push( ' onkeydown="return CKEDITOR.tools.callFunction(', keydownFn, ', event);"' + ' onfocus="return CKEDITOR.tools.callFunction(', focusFn,', event);" ' + ( CKEDITOR.env.ie ? 'onclick="return false;" onmouseup' : 'onclick' ) + // #188 '="CKEDITOR.tools.callFunction(', clickFn, ', this); return false;">' + '<span class="cke_icon"' ); if ( this.icon ) { var offset = ( this.iconOffset || 0 ) * -16; output.push( ' style="background-image:url(', CKEDITOR.getUrl( this.icon ), ');background-position:0 ' + offset + 'px;"' ); } output.push( '>&nbsp;</span>' + '<span id="', id, '_label" class="cke_label">', this.label, '</span>' ); if ( this.hasArrow ) { output.push( '<span class="cke_buttonarrow">' // BLACK DOWN-POINTING TRIANGLE + ( CKEDITOR.env.hc ? '&#9660;' : '&nbsp;' ) + '</span>' ); } output.push( '</a>', '</span>' ); if ( this.onRender ) this.onRender(); return instance; }, setState : function( state ) { if ( this._.state == state ) return false; this._.state = state; var element = CKEDITOR.document.getById( this._.id ); if ( element ) { element.setState( state ); state == CKEDITOR.TRISTATE_DISABLED ? element.setAttribute( 'aria-disabled', true ) : element.removeAttribute( 'aria-disabled' ); state == CKEDITOR.TRISTATE_ON ? element.setAttribute( 'aria-pressed', true ) : element.removeAttribute( 'aria-pressed' ); return true; } else return false; } }; })(); /** * Adds a button definition to the UI elements list. * @param {String} name The button name. * @param {Object} definition The button definition. * @example * editorInstance.ui.addButton( 'MyBold', * { * label : 'My Bold', * command : 'bold' * }); */ CKEDITOR.ui.prototype.addButton = function( name, definition ) { this.add( name, CKEDITOR.UI_BUTTON, definition ); };
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/button/plugin.js
JavaScript
gpl3
7,612
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { function protectFormStyles( formElement ) { if ( !formElement || formElement.type != CKEDITOR.NODE_ELEMENT || formElement.getName() != 'form' ) return []; var hijackRecord = [], hijackNames = [ 'style', 'className' ]; for ( var i = 0 ; i < hijackNames.length ; i++ ) { var name = hijackNames[i]; var $node = formElement.$.elements.namedItem( name ); if ( $node ) { var hijackNode = new CKEDITOR.dom.element( $node ); hijackRecord.push( [ hijackNode, hijackNode.nextSibling ] ); hijackNode.remove(); } } return hijackRecord; } function restoreFormStyles( formElement, hijackRecord ) { if ( !formElement || formElement.type != CKEDITOR.NODE_ELEMENT || formElement.getName() != 'form' ) return; if ( hijackRecord.length > 0 ) { for ( var i = hijackRecord.length - 1 ; i >= 0 ; i-- ) { var node = hijackRecord[i][0]; var sibling = hijackRecord[i][1]; if ( sibling ) node.insertBefore( sibling ); else node.appendTo( formElement ); } } } function saveStyles( element, isInsideEditor ) { var data = protectFormStyles( element ); var retval = {}; var $element = element.$; if ( !isInsideEditor ) { retval[ 'class' ] = $element.className || ''; $element.className = ''; } retval.inline = $element.style.cssText || ''; if ( !isInsideEditor ) // Reset any external styles that might interfere. (#2474) $element.style.cssText = 'position: static; overflow: visible'; restoreFormStyles( data ); return retval; } function restoreStyles( element, savedStyles ) { var data = protectFormStyles( element ); var $element = element.$; if ( 'class' in savedStyles ) $element.className = savedStyles[ 'class' ]; if ( 'inline' in savedStyles ) $element.style.cssText = savedStyles.inline; restoreFormStyles( data ); } function refreshCursor( editor ) { // Refresh all editor instances on the page (#5724). var all = CKEDITOR.instances; for ( var i in all ) { var one = all[ i ]; if ( one.mode == 'wysiwyg' && !one.readOnly ) { var body = one.document.getBody(); // Refresh 'contentEditable' otherwise // DOM lifting breaks design mode. (#5560) body.setAttribute( 'contentEditable', false ); body.setAttribute( 'contentEditable', true ); } } if ( editor.focusManager.hasFocus ) { editor.toolbox.focus(); editor.focus(); } } /** * Adding an iframe shim to this element, OR removing the existing one if already applied. * Note: This will only affect IE version below 7. */ function createIframeShim( element ) { if ( !CKEDITOR.env.ie || CKEDITOR.env.version > 6 ) return null; var shim = CKEDITOR.dom.element.createFromHtml( '<iframe frameborder="0" tabindex="-1"' + ' src="javascript:' + 'void((function(){' + 'document.open();' + ( CKEDITOR.env.isCustomDomain() ? 'document.domain=\'' + this.getDocument().$.domain + '\';' : '' ) + 'document.close();' + '})())"' + ' style="display:block;position:absolute;z-index:-1;' + 'progid:DXImageTransform.Microsoft.Alpha(opacity=0);' + '"></iframe>' ); return element.append( shim, true ); } CKEDITOR.plugins.add( 'maximize', { init : function( editor ) { var lang = editor.lang; var mainDocument = CKEDITOR.document, mainWindow = mainDocument.getWindow(); // Saved selection and scroll position for the editing area. var savedSelection, savedScroll; // Saved scroll position for the outer window. var outerScroll; var shim; // Saved resize handler function. function resizeHandler() { var viewPaneSize = mainWindow.getViewPaneSize(); shim && shim.setStyles( { width : viewPaneSize.width + 'px', height : viewPaneSize.height + 'px' } ); editor.resize( viewPaneSize.width, viewPaneSize.height, null, true ); } // Retain state after mode switches. var savedState = CKEDITOR.TRISTATE_OFF; editor.addCommand( 'maximize', { // Disabled on iOS (#8307). modes : { wysiwyg : !CKEDITOR.env.iOS, source : !CKEDITOR.env.iOS }, readOnly : 1, editorFocus : false, exec : function() { var container = editor.container.getChild( 1 ); var contents = editor.getThemeSpace( 'contents' ); // Save current selection and scroll position in editing area. if ( editor.mode == 'wysiwyg' ) { var selection = editor.getSelection(); savedSelection = selection && selection.getRanges(); savedScroll = mainWindow.getScrollPosition(); } else { var $textarea = editor.textarea.$; savedSelection = !CKEDITOR.env.ie && [ $textarea.selectionStart, $textarea.selectionEnd ]; savedScroll = [ $textarea.scrollLeft, $textarea.scrollTop ]; } if ( this.state == CKEDITOR.TRISTATE_OFF ) // Go fullscreen if the state is off. { // Add event handler for resizing. mainWindow.on( 'resize', resizeHandler ); // Save the scroll bar position. outerScroll = mainWindow.getScrollPosition(); // Save and reset the styles for the entire node tree. var currentNode = editor.container; while ( ( currentNode = currentNode.getParent() ) ) { currentNode.setCustomData( 'maximize_saved_styles', saveStyles( currentNode ) ); currentNode.setStyle( 'z-index', editor.config.baseFloatZIndex - 1 ); } contents.setCustomData( 'maximize_saved_styles', saveStyles( contents, true ) ); container.setCustomData( 'maximize_saved_styles', saveStyles( container, true ) ); // Hide scroll bars. var styles = { overflow : CKEDITOR.env.webkit ? '' : 'hidden', // #6896 width : 0, height : 0 }; mainDocument.getDocumentElement().setStyles( styles ); !CKEDITOR.env.gecko && mainDocument.getDocumentElement().setStyle( 'position', 'fixed' ); !( CKEDITOR.env.gecko && CKEDITOR.env.quirks ) && mainDocument.getBody().setStyles( styles ); // Scroll to the top left (IE needs some time for it - #4923). CKEDITOR.env.ie ? setTimeout( function() { mainWindow.$.scrollTo( 0, 0 ); }, 0 ) : mainWindow.$.scrollTo( 0, 0 ); // Resize and move to top left. // Special treatment for FF Quirks (#7284) container.setStyle( 'position', CKEDITOR.env.gecko && CKEDITOR.env.quirks ? 'fixed' : 'absolute' ); container.$.offsetLeft; // SAFARI BUG: See #2066. container.setStyles( { 'z-index' : editor.config.baseFloatZIndex - 1, left : '0px', top : '0px' } ); shim = createIframeShim( container ); // IE6 select element penetration when maximized. (#4459) // Add cke_maximized class before resize handle since that will change things sizes (#5580) container.addClass( 'cke_maximized' ); resizeHandler(); // Still not top left? Fix it. (Bug #174) var offset = container.getDocumentPosition(); container.setStyles( { left : ( -1 * offset.x ) + 'px', top : ( -1 * offset.y ) + 'px' } ); // Fixing positioning editor chrome in Firefox break design mode. (#5149) CKEDITOR.env.gecko && refreshCursor( editor ); } else if ( this.state == CKEDITOR.TRISTATE_ON ) // Restore from fullscreen if the state is on. { // Remove event handler for resizing. mainWindow.removeListener( 'resize', resizeHandler ); // Restore CSS styles for the entire node tree. var editorElements = [ contents, container ]; for ( var i = 0 ; i < editorElements.length ; i++ ) { restoreStyles( editorElements[i], editorElements[i].getCustomData( 'maximize_saved_styles' ) ); editorElements[i].removeCustomData( 'maximize_saved_styles' ); } currentNode = editor.container; while ( ( currentNode = currentNode.getParent() ) ) { restoreStyles( currentNode, currentNode.getCustomData( 'maximize_saved_styles' ) ); currentNode.removeCustomData( 'maximize_saved_styles' ); } // Restore the window scroll position. CKEDITOR.env.ie ? setTimeout( function() { mainWindow.$.scrollTo( outerScroll.x, outerScroll.y ); }, 0 ) : mainWindow.$.scrollTo( outerScroll.x, outerScroll.y ); // Remove cke_maximized class. container.removeClass( 'cke_maximized' ); // Webkit requires a re-layout on editor chrome. (#6695) if ( CKEDITOR.env.webkit ) { container.setStyle( 'display', 'inline' ); setTimeout( function(){ container.setStyle( 'display', 'block' ); }, 0 ); } if ( shim ) { shim.remove(); shim = null; } // Emit a resize event, because this time the size is modified in // restoreStyles. editor.fire( 'resize' ); } this.toggleState(); // Toggle button label. var button = this.uiItems[ 0 ]; // Only try to change the button if it exists (#6166) if( button ) { var label = ( this.state == CKEDITOR.TRISTATE_OFF ) ? lang.maximize : lang.minimize; var buttonNode = editor.element.getDocument().getById( button._.id ); buttonNode.getChild( 1 ).setHtml( label ); buttonNode.setAttribute( 'title', label ); buttonNode.setAttribute( 'href', 'javascript:void("' + label + '");' ); } // Restore selection and scroll position in editing area. if ( editor.mode == 'wysiwyg' ) { if ( savedSelection ) { // Fixing positioning editor chrome in Firefox break design mode. (#5149) CKEDITOR.env.gecko && refreshCursor( editor ); editor.getSelection().selectRanges(savedSelection); var element = editor.getSelection().getStartElement(); element && element.scrollIntoView( true ); } else mainWindow.$.scrollTo( savedScroll.x, savedScroll.y ); } else { if ( savedSelection ) { $textarea.selectionStart = savedSelection[0]; $textarea.selectionEnd = savedSelection[1]; } $textarea.scrollLeft = savedScroll[0]; $textarea.scrollTop = savedScroll[1]; } savedSelection = savedScroll = null; savedState = this.state; }, canUndo : false } ); editor.ui.addButton( 'Maximize', { label : lang.maximize, command : 'maximize' } ); // Restore the command state after mode change, unless it has been changed to disabled (#6467) editor.on( 'mode', function() { var command = editor.getCommand( 'maximize' ); command.setState( command.state == CKEDITOR.TRISTATE_DISABLED ? CKEDITOR.TRISTATE_DISABLED : savedState ); }, null, null, 100 ); } } ); })();
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/maximize/plugin.js
JavaScript
gpl3
11,442
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview Defines the {@link CKEDITOR.xml} class, which represents a * loaded XML document. */ (function() { CKEDITOR.plugins.add( 'xml', {}); /** * Represents a loaded XML document. * @constructor * @param {object|string} xmlObjectOrData A native XML (DOM document) object or * a string containing the XML definition to be loaded. * @example * var xml = <b>new CKEDITOR.xml( '<books><book title="My Book" /></books>' )</b>; */ CKEDITOR.xml = function( xmlObjectOrData ) { var baseXml = null; if ( typeof xmlObjectOrData == 'object' ) baseXml = xmlObjectOrData; else { var data = ( xmlObjectOrData || '' ).replace( /&nbsp;/g, '\xA0' ); if ( window.DOMParser ) baseXml = (new DOMParser()).parseFromString( data, 'text/xml' ); else if ( window.ActiveXObject ) { try { baseXml = new ActiveXObject( 'MSXML2.DOMDocument' ); } catch(e) { try { baseXml = new ActiveXObject( 'Microsoft.XmlDom' ); } catch(e) {} } if ( baseXml ) { baseXml.async = false; baseXml.resolveExternals = false; baseXml.validateOnParse = false; baseXml.loadXML( data ); } } } /** * The native XML (DOM document) used by the class instance. * @type object * @example */ this.baseXml = baseXml; }; CKEDITOR.xml.prototype = { /** * Get a single node from the XML document, based on a XPath query. * @param {String} xpath The XPath query to execute. * @param {Object} [contextNode] The XML DOM node to be used as the context * for the XPath query. The document root is used by default. * @returns {Object} A XML node element or null if the query has no results. * @example * // Create the XML instance. * var xml = new CKEDITOR.xml( '<list><item id="test1" /><item id="test2" /></list>' ); * // Get the first <item> node. * var itemNode = <b>xml.selectSingleNode( 'list/item' )</b>; * // Alert "item". * alert( itemNode.nodeName ); */ selectSingleNode : function( xpath, contextNode ) { var baseXml = this.baseXml; if ( contextNode || ( contextNode = baseXml ) ) { if ( CKEDITOR.env.ie || contextNode.selectSingleNode ) // IE return contextNode.selectSingleNode( xpath ); else if ( baseXml.evaluate ) // Others { var result = baseXml.evaluate( xpath, contextNode, null, 9, null); return ( result && result.singleNodeValue ) || null; } } return null; }, /** * Gets a list node from the XML document, based on a XPath query. * @param {String} xpath The XPath query to execute. * @param {Object} [contextNode] The XML DOM node to be used as the context * for the XPath query. The document root is used by default. * @returns {ArrayLike} An array containing all matched nodes. The array will * be empty if the query has no results. * @example * // Create the XML instance. * var xml = new CKEDITOR.xml( '<list><item id="test1" /><item id="test2" /></list>' ); * // Get the first <item> node. * var itemNodes = xml.selectSingleNode( 'list/item' ); * // Alert "item" twice, one for each <item>. * for ( var i = 0 ; i < itemNodes.length ; i++ ) * alert( itemNodes[i].nodeName ); */ selectNodes : function( xpath, contextNode ) { var baseXml = this.baseXml, nodes = []; if ( contextNode || ( contextNode = baseXml ) ) { if ( CKEDITOR.env.ie || contextNode.selectNodes ) // IE return contextNode.selectNodes( xpath ); else if ( baseXml.evaluate ) // Others { var result = baseXml.evaluate( xpath, contextNode, null, 5, null); if ( result ) { var node; while ( ( node = result.iterateNext() ) ) nodes.push( node ); } } } return nodes; }, /** * Gets the string representation of hte inner contents of a XML node, * based on a XPath query. * @param {String} xpath The XPath query to execute. * @param {Object} [contextNode] The XML DOM node to be used as the context * for the XPath query. The document root is used by default. * @returns {String} The textual representation of the inner contents of * the node or null if the query has no results. * @example * // Create the XML instance. * var xml = new CKEDITOR.xml( '<list><item id="test1" /><item id="test2" /></list>' ); * // Alert "<item id="test1" /><item id="test2" />". * alert( xml.getInnerXml( 'list' ) ); */ getInnerXml : function( xpath, contextNode ) { var node = this.selectSingleNode( xpath, contextNode ), xml = []; if ( node ) { node = node.firstChild; while ( node ) { if ( node.xml ) // IE xml.push( node.xml ); else if ( window.XMLSerializer ) // Others xml.push( ( new XMLSerializer() ).serializeToString( node ) ); node = node.nextSibling; } } return xml.length ? xml.join( '' ) : null; } }; })();
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/xml/plugin.js
JavaScript
gpl3
5,253
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'smiley', function( editor ) { var config = editor.config, lang = editor.lang.smiley, images = config.smiley_images, columns = config.smiley_columns || 8, i; /** * Simulate "this" of a dialog for non-dialog events. * @type {CKEDITOR.dialog} */ var dialog; var onClick = function( evt ) { var target = evt.data.getTarget(), targetName = target.getName(); if ( targetName == 'a' ) target = target.getChild( 0 ); else if ( targetName != 'img' ) return; var src = target.getAttribute( 'cke_src' ), title = target.getAttribute( 'title' ); var img = editor.document.createElement( 'img', { attributes : { src : src, 'data-cke-saved-src' : src, title : title, alt : title, width : target.$.width, height : target.$.height } }); editor.insertElement( img ); dialog.hide(); evt.data.preventDefault(); }; var onKeydown = CKEDITOR.tools.addFunction( function( ev, element ) { ev = new CKEDITOR.dom.event( ev ); element = new CKEDITOR.dom.element( element ); var relative, nodeToMove; var keystroke = ev.getKeystroke(), rtl = editor.lang.dir == 'rtl'; switch ( keystroke ) { // UP-ARROW case 38 : // relative is TR if ( ( relative = element.getParent().getParent().getPrevious() ) ) { nodeToMove = relative.getChild( [element.getParent().getIndex(), 0] ); nodeToMove.focus(); } ev.preventDefault(); break; // DOWN-ARROW case 40 : // relative is TR if ( ( relative = element.getParent().getParent().getNext() ) ) { nodeToMove = relative.getChild( [element.getParent().getIndex(), 0] ); if ( nodeToMove ) nodeToMove.focus(); } ev.preventDefault(); break; // ENTER // SPACE case 32 : onClick( { data: ev } ); ev.preventDefault(); break; // RIGHT-ARROW case rtl ? 37 : 39 : // TAB case 9 : // relative is TD if ( ( relative = element.getParent().getNext() ) ) { nodeToMove = relative.getChild( 0 ); nodeToMove.focus(); ev.preventDefault(true); } // relative is TR else if ( ( relative = element.getParent().getParent().getNext() ) ) { nodeToMove = relative.getChild( [0, 0] ); if ( nodeToMove ) nodeToMove.focus(); ev.preventDefault(true); } break; // LEFT-ARROW case rtl ? 39 : 37 : // SHIFT + TAB case CKEDITOR.SHIFT + 9 : // relative is TD if ( ( relative = element.getParent().getPrevious() ) ) { nodeToMove = relative.getChild( 0 ); nodeToMove.focus(); ev.preventDefault(true); } // relative is TR else if ( ( relative = element.getParent().getParent().getPrevious() ) ) { nodeToMove = relative.getLast().getChild( 0 ); nodeToMove.focus(); ev.preventDefault(true); } break; default : // Do not stop not handled events. return; } }); // Build the HTML for the smiley images table. var labelId = CKEDITOR.tools.getNextId() + '_smiley_emtions_label'; var html = [ '<div>' + '<span id="' + labelId + '" class="cke_voice_label">' + lang.options +'</span>', '<table role="listbox" aria-labelledby="' + labelId + '" style="width:100%;height:100%" cellspacing="2" cellpadding="2"', CKEDITOR.env.ie && CKEDITOR.env.quirks ? ' style="position:absolute;"' : '', '><tbody>' ]; var size = images.length; for ( i = 0 ; i < size ; i++ ) { if ( i % columns === 0 ) html.push( '<tr>' ); var smileyLabelId = 'cke_smile_label_' + i + '_' + CKEDITOR.tools.getNextNumber(); html.push( '<td class="cke_dark_background cke_centered" style="vertical-align: middle;">' + '<a href="javascript:void(0)" role="option"', ' aria-posinset="' + ( i +1 ) + '"', ' aria-setsize="' + size + '"', ' aria-labelledby="' + smileyLabelId + '"', ' class="cke_smile cke_hand" tabindex="-1" onkeydown="CKEDITOR.tools.callFunction( ', onKeydown, ', event, this );">', '<img class="cke_hand" title="', config.smiley_descriptions[i], '"' + ' cke_src="', CKEDITOR.tools.htmlEncode( config.smiley_path + images[ i ] ), '" alt="', config.smiley_descriptions[i], '"', ' src="', CKEDITOR.tools.htmlEncode( config.smiley_path + images[ i ] ), '"', // IE BUG: Below is a workaround to an IE image loading bug to ensure the image sizes are correct. ( CKEDITOR.env.ie ? ' onload="this.setAttribute(\'width\', 2); this.removeAttribute(\'width\');" ' : '' ), '>' + '<span id="' + smileyLabelId + '" class="cke_voice_label">' +config.smiley_descriptions[ i ] + '</span>' + '</a>', '</td>' ); if ( i % columns == columns - 1 ) html.push( '</tr>' ); } if ( i < columns - 1 ) { for ( ; i < columns - 1 ; i++ ) html.push( '<td></td>' ); html.push( '</tr>' ); } html.push( '</tbody></table></div>' ); var smileySelector = { type : 'html', id : 'smileySelector', html : html.join( '' ), onLoad : function( event ) { dialog = event.sender; }, focus : function() { var self = this; // IE need a while to move the focus (#6539). setTimeout( function () { var firstSmile = self.getElement().getElementsByTag( 'a' ).getItem( 0 ); firstSmile.focus(); }, 0 ); }, onClick : onClick, style : 'width: 100%; border-collapse: separate;' }; return { title : editor.lang.smiley.title, minWidth : 270, minHeight : 120, contents : [ { id : 'tab1', label : '', title : '', expand : true, padding : 0, elements : [ smileySelector ] } ], buttons : [ CKEDITOR.dialog.cancelButton ] }; } );
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/smiley/dialogs/smiley.js
JavaScript
gpl3
6,028
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview The "sourcearea" plugin. It registers the "source" editing * mode, which displays the raw data being edited in the editor. */ CKEDITOR.plugins.add( 'sourcearea', { requires : [ 'editingblock' ], init : function( editor ) { var sourcearea = CKEDITOR.plugins.sourcearea, win = CKEDITOR.document.getWindow(); editor.on( 'editingBlockReady', function() { var textarea, onResize; editor.addMode( 'source', { load : function( holderElement, data ) { if ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 ) holderElement.setStyle( 'position', 'relative' ); // Create the source area <textarea>. editor.textarea = textarea = new CKEDITOR.dom.element( 'textarea' ); textarea.setAttributes( { dir : 'ltr', tabIndex : CKEDITOR.env.webkit ? -1 : editor.tabIndex, 'role' : 'textbox', 'aria-label' : editor.lang.editorTitle.replace( '%1', editor.name ) }); textarea.addClass( 'cke_source' ); textarea.addClass( 'cke_enable_context_menu' ); editor.readOnly && textarea.setAttribute( 'readOnly', 'readonly' ); var styles = { // IE7 has overflow the <textarea> from wrapping table cell. width : CKEDITOR.env.ie7Compat ? '99%' : '100%', height : '100%', resize : 'none', outline : 'none', 'text-align' : 'left' }; // Having to make <textarea> fixed sized to conque the following bugs: // 1. The textarea height/width='100%' doesn't constraint to the 'td' in IE6/7. // 2. Unexpected vertical-scrolling behavior happens whenever focus is moving out of editor // if text content within it has overflowed. (#4762) if ( CKEDITOR.env.ie ) { onResize = function() { // Holder rectange size is stretched by textarea, // so hide it just for a moment. textarea.hide(); textarea.setStyle( 'height', holderElement.$.clientHeight + 'px' ); textarea.setStyle( 'width', holderElement.$.clientWidth + 'px' ); // When we have proper holder size, show textarea again. textarea.show(); }; editor.on( 'resize', onResize ); win.on( 'resize', onResize ); setTimeout( onResize, 0 ); } // Reset the holder element and append the // <textarea> to it. holderElement.setHtml( '' ); holderElement.append( textarea ); textarea.setStyles( styles ); editor.fire( 'ariaWidget', textarea ); textarea.on( 'blur', function() { editor.focusManager.blur(); }); textarea.on( 'focus', function() { editor.focusManager.focus(); }); // The editor data "may be dirty" after this point. editor.mayBeDirty = true; // Set the <textarea> value. this.loadData( data ); var keystrokeHandler = editor.keystrokeHandler; if ( keystrokeHandler ) keystrokeHandler.attach( textarea ); setTimeout( function() { editor.mode = 'source'; editor.fire( 'mode', { previousMode : editor._.previousMode } ); }, ( CKEDITOR.env.gecko || CKEDITOR.env.webkit ) ? 100 : 0 ); }, loadData : function( data ) { textarea.setValue( data ); editor.fire( 'dataReady' ); }, getData : function() { return textarea.getValue(); }, getSnapshotData : function() { return textarea.getValue(); }, unload : function( holderElement ) { textarea.clearCustomData(); editor.textarea = textarea = null; if ( onResize ) { editor.removeListener( 'resize', onResize ); win.removeListener( 'resize', onResize ); } if ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 ) holderElement.removeStyle( 'position' ); }, focus : function() { textarea.focus(); } }); }); editor.on( 'readOnly', function() { if ( editor.mode == 'source' ) { if ( editor.readOnly ) editor.textarea.setAttribute( 'readOnly', 'readonly' ); else editor.textarea.removeAttribute( 'readOnly' ); } }); editor.addCommand( 'source', sourcearea.commands.source ); if ( editor.ui.addButton ) { editor.ui.addButton( 'Source', { label : editor.lang.source, command : 'source' }); } editor.on( 'mode', function() { editor.getCommand( 'source' ).setState( editor.mode == 'source' ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF ); }); } }); /** * Holds the definition of commands an UI elements included with the sourcearea * plugin. * @example */ CKEDITOR.plugins.sourcearea = { commands : { source : { modes : { wysiwyg:1, source:1 }, editorFocus : false, readOnly : 1, exec : function( editor ) { if ( editor.mode == 'wysiwyg' ) editor.fire( 'saveSnapshot' ); editor.getCommand( 'source' ).setState( CKEDITOR.TRISTATE_DISABLED ); editor.setMode( editor.mode == 'source' ? 'wysiwyg' : 'source' ); }, canUndo : false } } };
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/sourcearea/plugin.js
JavaScript
gpl3
5,613
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** @fileoverview The "dialogui" plugin. */ CKEDITOR.plugins.add( 'dialogui' ); (function() { var initPrivateObject = function( elementDefinition ) { this._ || ( this._ = {} ); this._['default'] = this._.initValue = elementDefinition['default'] || ''; this._.required = elementDefinition[ 'required' ] || false; var args = [ this._ ]; for ( var i = 1 ; i < arguments.length ; i++ ) args.push( arguments[i] ); args.push( true ); CKEDITOR.tools.extend.apply( CKEDITOR.tools, args ); return this._; }, textBuilder = { build : function( dialog, elementDefinition, output ) { return new CKEDITOR.ui.dialog.textInput( dialog, elementDefinition, output ); } }, commonBuilder = { build : function( dialog, elementDefinition, output ) { return new CKEDITOR.ui.dialog[elementDefinition.type]( dialog, elementDefinition, output ); } }, containerBuilder = { build : function( dialog, elementDefinition, output ) { var children = elementDefinition.children, child, childHtmlList = [], childObjList = []; for ( var i = 0 ; ( i < children.length && ( child = children[i] ) ) ; i++ ) { var childHtml = []; childHtmlList.push( childHtml ); childObjList.push( CKEDITOR.dialog._.uiElementBuilders[ child.type ].build( dialog, child, childHtml ) ); } return new CKEDITOR.ui.dialog[ elementDefinition.type ]( dialog, childObjList, childHtmlList, output, elementDefinition ); } }, commonPrototype = { isChanged : function() { return this.getValue() != this.getInitValue(); }, reset : function( noChangeEvent ) { this.setValue( this.getInitValue(), noChangeEvent ); }, setInitValue : function() { this._.initValue = this.getValue(); }, resetInitValue : function() { this._.initValue = this._['default']; }, getInitValue : function() { return this._.initValue; } }, commonEventProcessors = CKEDITOR.tools.extend( {}, CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors, { onChange : function( dialog, func ) { if ( !this._.domOnChangeRegistered ) { dialog.on( 'load', function() { this.getInputElement().on( 'change', function() { // Make sure 'onchange' doesn't get fired after dialog closed. (#5719) if ( !dialog.parts.dialog.isVisible() ) return; this.fire( 'change', { value : this.getValue() } ); }, this ); }, this ); this._.domOnChangeRegistered = true; } this.on( 'change', func ); } }, true ), eventRegex = /^on([A-Z]\w+)/, cleanInnerDefinition = function( def ) { // An inner UI element should not have the parent's type, title or events. for ( var i in def ) { if ( eventRegex.test( i ) || i == 'title' || i == 'type' ) delete def[i]; } return def; }; CKEDITOR.tools.extend( CKEDITOR.ui.dialog, /** @lends CKEDITOR.ui.dialog */ { /** * Base class for all dialog elements with a textual label on the left. * @constructor * @example * @extends CKEDITOR.ui.dialog.uiElement * @param {CKEDITOR.dialog} dialog * Parent dialog object. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition * The element definition. Accepted fields: * <ul> * <li><strong>label</strong> (Required) The label string.</li> * <li><strong>labelLayout</strong> (Optional) Put 'horizontal' here if the * label element is to be layed out horizontally. Otherwise a vertical * layout will be used.</li> * <li><strong>widths</strong> (Optional) This applies only for horizontal * layouts - an 2-element array of lengths to specify the widths of the * label and the content element.</li> * </ul> * @param {Array} htmlList * List of HTML code to output to. * @param {Function} contentHtml * A function returning the HTML code string to be added inside the content * cell. */ labeledElement : function( dialog, elementDefinition, htmlList, contentHtml ) { if ( arguments.length < 4 ) return; var _ = initPrivateObject.call( this, elementDefinition ); _.labelId = CKEDITOR.tools.getNextId() + '_label'; var children = this._.children = []; /** @ignore */ var innerHTML = function() { var html = [], requiredClass = elementDefinition.required ? ' cke_required' : '' ; if ( elementDefinition.labelLayout != 'horizontal' ) html.push( '<label class="cke_dialog_ui_labeled_label' + requiredClass + '" ', ' id="'+ _.labelId + '"', ' for="' + _.inputId + '"', ( elementDefinition.labelStyle ? ' style="' + elementDefinition.labelStyle + '"' : '' ) +'>', elementDefinition.label, '</label>', '<div class="cke_dialog_ui_labeled_content"' + ( elementDefinition.controlStyle ? ' style="' + elementDefinition.controlStyle + '"' : '' ) + ' role="presentation">', contentHtml.call( this, dialog, elementDefinition ), '</div>' ); else { var hboxDefinition = { type : 'hbox', widths : elementDefinition.widths, padding : 0, children : [ { type : 'html', html : '<label class="cke_dialog_ui_labeled_label' + requiredClass + '"' + ' id="' + _.labelId + '"' + ' for="' + _.inputId + '"' + ( elementDefinition.labelStyle ? ' style="' + elementDefinition.labelStyle + '"' : '' ) +'>' + CKEDITOR.tools.htmlEncode( elementDefinition.label ) + '</span>' }, { type : 'html', html : '<span class="cke_dialog_ui_labeled_content"' + ( elementDefinition.controlStyle ? ' style="' + elementDefinition.controlStyle + '"' : '' ) + '>' + contentHtml.call( this, dialog, elementDefinition ) + '</span>' } ] }; CKEDITOR.dialog._.uiElementBuilders.hbox.build( dialog, hboxDefinition, html ); } return html.join( '' ); }; CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, htmlList, 'div', null, { role : 'presentation' }, innerHTML ); }, /** * A text input with a label. This UI element class represents both the * single-line text inputs and password inputs in dialog boxes. * @constructor * @example * @extends CKEDITOR.ui.dialog.labeledElement * @param {CKEDITOR.dialog} dialog * Parent dialog object. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition * The element definition. Accepted fields: * <ul> * <li><strong>default</strong> (Optional) The default value.</li> * <li><strong>validate</strong> (Optional) The validation function. </li> * <li><strong>maxLength</strong> (Optional) The maximum length of text box * contents.</li> * <li><strong>size</strong> (Optional) The size of the text box. This is * usually overridden by the size defined by the skin, however.</li> * </ul> * @param {Array} htmlList * List of HTML code to output to. */ textInput : function( dialog, elementDefinition, htmlList ) { if ( arguments.length < 3 ) return; initPrivateObject.call( this, elementDefinition ); var domId = this._.inputId = CKEDITOR.tools.getNextId() + '_textInput', attributes = { 'class' : 'cke_dialog_ui_input_' + elementDefinition.type, id : domId, type : elementDefinition.type }, i; // Set the validator, if any. if ( elementDefinition.validate ) this.validate = elementDefinition.validate; // Set the max length and size. if ( elementDefinition.maxLength ) attributes.maxlength = elementDefinition.maxLength; if ( elementDefinition.size ) attributes.size = elementDefinition.size; if ( elementDefinition.inputStyle ) attributes.style = elementDefinition.inputStyle; // If user presses Enter in a text box, it implies clicking OK for the dialog. var me = this, keyPressedOnMe = false; dialog.on( 'load', function() { me.getInputElement().on( 'keydown', function( evt ) { if ( evt.data.getKeystroke() == 13 ) keyPressedOnMe = true; } ); // Lower the priority this 'keyup' since 'ok' will close the dialog.(#3749) me.getInputElement().on( 'keyup', function( evt ) { if ( evt.data.getKeystroke() == 13 && keyPressedOnMe ) { dialog.getButton( 'ok' ) && setTimeout( function () { dialog.getButton( 'ok' ).click(); }, 0 ); keyPressedOnMe = false; } }, null, null, 1000 ); } ); /** @ignore */ var innerHTML = function() { // IE BUG: Text input fields in IE at 100% would exceed a <td> or inline // container's width, so need to wrap it inside a <div>. var html = [ '<div class="cke_dialog_ui_input_', elementDefinition.type, '" role="presentation"' ]; if ( elementDefinition.width ) html.push( 'style="width:'+ elementDefinition.width +'" ' ); html.push( '><input ' ); attributes[ 'aria-labelledby' ] = this._.labelId; this._.required && ( attributes[ 'aria-required' ] = this._.required ); for ( var i in attributes ) html.push( i + '="' + attributes[i] + '" ' ); html.push( ' /></div>' ); return html.join( '' ); }; CKEDITOR.ui.dialog.labeledElement.call( this, dialog, elementDefinition, htmlList, innerHTML ); }, /** * A text area with a label on the top or left. * @constructor * @extends CKEDITOR.ui.dialog.labeledElement * @example * @param {CKEDITOR.dialog} dialog * Parent dialog object. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition * The element definition. Accepted fields: * <ul> * <li><strong>rows</strong> (Optional) The number of rows displayed. * Defaults to 5 if not defined.</li> * <li><strong>cols</strong> (Optional) The number of cols displayed. * Defaults to 20 if not defined. Usually overridden by skins.</li> * <li><strong>default</strong> (Optional) The default value.</li> * <li><strong>validate</strong> (Optional) The validation function. </li> * </ul> * @param {Array} htmlList * List of HTML code to output to. */ textarea : function( dialog, elementDefinition, htmlList ) { if ( arguments.length < 3 ) return; initPrivateObject.call( this, elementDefinition ); var me = this, domId = this._.inputId = CKEDITOR.tools.getNextId() + '_textarea', attributes = {}; if ( elementDefinition.validate ) this.validate = elementDefinition.validate; // Generates the essential attributes for the textarea tag. attributes.rows = elementDefinition.rows || 5; attributes.cols = elementDefinition.cols || 20; if ( typeof elementDefinition.inputStyle != 'undefined' ) attributes.style = elementDefinition.inputStyle; /** @ignore */ var innerHTML = function() { attributes[ 'aria-labelledby' ] = this._.labelId; this._.required && ( attributes[ 'aria-required' ] = this._.required ); var html = [ '<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea class="cke_dialog_ui_input_textarea" id="', domId, '" ' ]; for ( var i in attributes ) html.push( i + '="' + CKEDITOR.tools.htmlEncode( attributes[i] ) + '" ' ); html.push( '>', CKEDITOR.tools.htmlEncode( me._['default'] ), '</textarea></div>' ); return html.join( '' ); }; CKEDITOR.ui.dialog.labeledElement.call( this, dialog, elementDefinition, htmlList, innerHTML ); }, /** * A single checkbox with a label on the right. * @constructor * @extends CKEDITOR.ui.dialog.uiElement * @example * @param {CKEDITOR.dialog} dialog * Parent dialog object. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition * The element definition. Accepted fields: * <ul> * <li><strong>checked</strong> (Optional) Whether the checkbox is checked * on instantiation. Defaults to false.</li> * <li><strong>validate</strong> (Optional) The validation function.</li> * <li><strong>label</strong> (Optional) The checkbox label.</li> * </ul> * @param {Array} htmlList * List of HTML code to output to. */ checkbox : function( dialog, elementDefinition, htmlList ) { if ( arguments.length < 3 ) return; var _ = initPrivateObject.call( this, elementDefinition, { 'default' : !!elementDefinition[ 'default' ] } ); if ( elementDefinition.validate ) this.validate = elementDefinition.validate; /** @ignore */ var innerHTML = function() { var myDefinition = CKEDITOR.tools.extend( {}, elementDefinition, { id : elementDefinition.id ? elementDefinition.id + '_checkbox' : CKEDITOR.tools.getNextId() + '_checkbox' }, true ), html = []; var labelId = CKEDITOR.tools.getNextId() + '_label'; var attributes = { 'class' : 'cke_dialog_ui_checkbox_input', type : 'checkbox', 'aria-labelledby' : labelId }; cleanInnerDefinition( myDefinition ); if ( elementDefinition[ 'default' ] ) attributes.checked = 'checked'; if ( typeof myDefinition.inputStyle != 'undefined' ) myDefinition.style = myDefinition.inputStyle; _.checkbox = new CKEDITOR.ui.dialog.uiElement( dialog, myDefinition, html, 'input', null, attributes ); html.push( ' <label id="', labelId, '" for="', attributes.id, '"' + ( elementDefinition.labelStyle ? ' style="' + elementDefinition.labelStyle + '"' : '' ) + '>', CKEDITOR.tools.htmlEncode( elementDefinition.label ), '</label>' ); return html.join( '' ); }; CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, htmlList, 'span', null, null, innerHTML ); }, /** * A group of radio buttons. * @constructor * @example * @extends CKEDITOR.ui.dialog.labeledElement * @param {CKEDITOR.dialog} dialog * Parent dialog object. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition * The element definition. Accepted fields: * <ul> * <li><strong>default</strong> (Required) The default value.</li> * <li><strong>validate</strong> (Optional) The validation function.</li> * <li><strong>items</strong> (Required) An array of options. Each option * is a 1- or 2-item array of format [ 'Description', 'Value' ]. If 'Value' * is missing, then the value would be assumed to be the same as the * description.</li> * </ul> * @param {Array} htmlList * List of HTML code to output to. */ radio : function( dialog, elementDefinition, htmlList ) { if ( arguments.length < 3) return; initPrivateObject.call( this, elementDefinition ); if ( !this._['default'] ) this._['default'] = this._.initValue = elementDefinition.items[0][1]; if ( elementDefinition.validate ) this.validate = elementDefinition.valdiate; var children = [], me = this; /** @ignore */ var innerHTML = function() { var inputHtmlList = [], html = [], commonAttributes = { 'class' : 'cke_dialog_ui_radio_item', 'aria-labelledby' : this._.labelId }, commonName = elementDefinition.id ? elementDefinition.id + '_radio' : CKEDITOR.tools.getNextId() + '_radio'; for ( var i = 0 ; i < elementDefinition.items.length ; i++ ) { var item = elementDefinition.items[i], title = item[2] !== undefined ? item[2] : item[0], value = item[1] !== undefined ? item[1] : item[0], inputId = CKEDITOR.tools.getNextId() + '_radio_input', labelId = inputId + '_label', inputDefinition = CKEDITOR.tools.extend( {}, elementDefinition, { id : inputId, title : null, type : null }, true ), labelDefinition = CKEDITOR.tools.extend( {}, inputDefinition, { title : title }, true ), inputAttributes = { type : 'radio', 'class' : 'cke_dialog_ui_radio_input', name : commonName, value : value, 'aria-labelledby' : labelId }, inputHtml = []; if ( me._['default'] == value ) inputAttributes.checked = 'checked'; cleanInnerDefinition( inputDefinition ); cleanInnerDefinition( labelDefinition ); if ( typeof inputDefinition.inputStyle != 'undefined' ) inputDefinition.style = inputDefinition.inputStyle; children.push( new CKEDITOR.ui.dialog.uiElement( dialog, inputDefinition, inputHtml, 'input', null, inputAttributes ) ); inputHtml.push( ' ' ); new CKEDITOR.ui.dialog.uiElement( dialog, labelDefinition, inputHtml, 'label', null, { id : labelId, 'for' : inputAttributes.id }, item[0] ); inputHtmlList.push( inputHtml.join( '' ) ); } new CKEDITOR.ui.dialog.hbox( dialog, children, inputHtmlList, html ); return html.join( '' ); }; CKEDITOR.ui.dialog.labeledElement.call( this, dialog, elementDefinition, htmlList, innerHTML ); this._.children = children; }, /** * A button with a label inside. * @constructor * @example * @extends CKEDITOR.ui.dialog.uiElement * @param {CKEDITOR.dialog} dialog * Parent dialog object. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition * The element definition. Accepted fields: * <ul> * <li><strong>label</strong> (Required) The button label.</li> * <li><strong>disabled</strong> (Optional) Set to true if you want the * button to appear in disabled state.</li> * </ul> * @param {Array} htmlList * List of HTML code to output to. */ button : function( dialog, elementDefinition, htmlList ) { if ( !arguments.length ) return; if ( typeof elementDefinition == 'function' ) elementDefinition = elementDefinition( dialog.getParentEditor() ); initPrivateObject.call( this, elementDefinition, { disabled : elementDefinition.disabled || false } ); // Add OnClick event to this input. CKEDITOR.event.implementOn( this ); var me = this; // Register an event handler for processing button clicks. dialog.on( 'load', function( eventInfo ) { var element = this.getElement(); (function() { element.on( 'click', function( evt ) { me.fire( 'click', { dialog : me.getDialog() } ); evt.data.preventDefault(); } ); element.on( 'keydown', function( evt ) { if ( evt.data.getKeystroke() in { 32:1 } ) { me.click(); evt.data.preventDefault(); } } ); })(); element.unselectable(); }, this ); var outerDefinition = CKEDITOR.tools.extend( {}, elementDefinition ); delete outerDefinition.style; var labelId = CKEDITOR.tools.getNextId() + '_label'; CKEDITOR.ui.dialog.uiElement.call( this, dialog, outerDefinition, htmlList, 'a', null, { style : elementDefinition.style, href : 'javascript:void(0)', title : elementDefinition.label, hidefocus : 'true', 'class' : elementDefinition['class'], role : 'button', 'aria-labelledby' : labelId }, '<span id="' + labelId + '" class="cke_dialog_ui_button">' + CKEDITOR.tools.htmlEncode( elementDefinition.label ) + '</span>' ); }, /** * A select box. * @extends CKEDITOR.ui.dialog.uiElement * @example * @constructor * @param {CKEDITOR.dialog} dialog * Parent dialog object. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition * The element definition. Accepted fields: * <ul> * <li><strong>default</strong> (Required) The default value.</li> * <li><strong>validate</strong> (Optional) The validation function.</li> * <li><strong>items</strong> (Required) An array of options. Each option * is a 1- or 2-item array of format [ 'Description', 'Value' ]. If 'Value' * is missing, then the value would be assumed to be the same as the * description.</li> * <li><strong>multiple</strong> (Optional) Set this to true if you'd like * to have a multiple-choice select box.</li> * <li><strong>size</strong> (Optional) The number of items to display in * the select box.</li> * </ul> * @param {Array} htmlList * List of HTML code to output to. */ select : function( dialog, elementDefinition, htmlList ) { if ( arguments.length < 3 ) return; var _ = initPrivateObject.call( this, elementDefinition ); if ( elementDefinition.validate ) this.validate = elementDefinition.validate; _.inputId = CKEDITOR.tools.getNextId() + '_select'; /** @ignore */ var innerHTML = function() { var myDefinition = CKEDITOR.tools.extend( {}, elementDefinition, { id : elementDefinition.id ? elementDefinition.id + '_select' : CKEDITOR.tools.getNextId() + '_select' }, true ), html = [], innerHTML = [], attributes = { 'id' : _.inputId, 'class' : 'cke_dialog_ui_input_select', 'aria-labelledby' : this._.labelId }; // Add multiple and size attributes from element definition. if ( elementDefinition.size != undefined ) attributes.size = elementDefinition.size; if ( elementDefinition.multiple != undefined ) attributes.multiple = elementDefinition.multiple; cleanInnerDefinition( myDefinition ); for ( var i = 0, item ; i < elementDefinition.items.length && ( item = elementDefinition.items[i] ) ; i++ ) { innerHTML.push( '<option value="', CKEDITOR.tools.htmlEncode( item[1] !== undefined ? item[1] : item[0] ).replace( /"/g, '&quot;' ), '" /> ', CKEDITOR.tools.htmlEncode( item[0] ) ); } if ( typeof myDefinition.inputStyle != 'undefined' ) myDefinition.style = myDefinition.inputStyle; _.select = new CKEDITOR.ui.dialog.uiElement( dialog, myDefinition, html, 'select', null, attributes, innerHTML.join( '' ) ); return html.join( '' ); }; CKEDITOR.ui.dialog.labeledElement.call( this, dialog, elementDefinition, htmlList, innerHTML ); }, /** * A file upload input. * @extends CKEDITOR.ui.dialog.labeledElement * @example * @constructor * @param {CKEDITOR.dialog} dialog * Parent dialog object. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition * The element definition. Accepted fields: * <ul> * <li><strong>validate</strong> (Optional) The validation function.</li> * </ul> * @param {Array} htmlList * List of HTML code to output to. */ file : function( dialog, elementDefinition, htmlList ) { if ( arguments.length < 3 ) return; if ( elementDefinition['default'] === undefined ) elementDefinition['default'] = ''; var _ = CKEDITOR.tools.extend( initPrivateObject.call( this, elementDefinition ), { definition : elementDefinition, buttons : [] } ); if ( elementDefinition.validate ) this.validate = elementDefinition.validate; /** @ignore */ var innerHTML = function() { _.frameId = CKEDITOR.tools.getNextId() + '_fileInput'; // Support for custom document.domain in IE. var isCustomDomain = CKEDITOR.env.isCustomDomain(); var html = [ '<iframe' + ' frameborder="0"' + ' allowtransparency="0"' + ' class="cke_dialog_ui_input_file"' + ' id="', _.frameId, '"' + ' title="', elementDefinition.label, '"' + ' src="javascript:void(' ]; html.push( isCustomDomain ? '(function(){' + 'document.open();' + 'document.domain=\'' + document.domain + '\';' + 'document.close();' + '})()' : '0' ); html.push( ')">' + '</iframe>' ); return html.join( '' ); }; // IE BUG: Parent container does not resize to contain the iframe automatically. dialog.on( 'load', function() { var iframe = CKEDITOR.document.getById( _.frameId ), contentDiv = iframe.getParent(); contentDiv.addClass( 'cke_dialog_ui_input_file' ); } ); CKEDITOR.ui.dialog.labeledElement.call( this, dialog, elementDefinition, htmlList, innerHTML ); }, /** * A button for submitting the file in a file upload input. * @extends CKEDITOR.ui.dialog.button * @example * @constructor * @param {CKEDITOR.dialog} dialog * Parent dialog object. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition * The element definition. Accepted fields: * <ul> * <li><strong>for</strong> (Required) The file input's page and element Id * to associate to, in a 2-item array format: [ 'page_id', 'element_id' ]. * </li> * <li><strong>validate</strong> (Optional) The validation function.</li> * </ul> * @param {Array} htmlList * List of HTML code to output to. */ fileButton : function( dialog, elementDefinition, htmlList ) { if ( arguments.length < 3 ) return; var _ = initPrivateObject.call( this, elementDefinition ), me = this; if ( elementDefinition.validate ) this.validate = elementDefinition.validate; var myDefinition = CKEDITOR.tools.extend( {}, elementDefinition ); var onClick = myDefinition.onClick; myDefinition.className = ( myDefinition.className ? myDefinition.className + ' ' : '' ) + 'cke_dialog_ui_button'; myDefinition.onClick = function( evt ) { var target = elementDefinition[ 'for' ]; // [ pageId, elementId ] if ( !onClick || onClick.call( this, evt ) !== false ) { dialog.getContentElement( target[0], target[1] ).submit(); this.disable(); } }; dialog.on( 'load', function() { dialog.getContentElement( elementDefinition[ 'for' ][0], elementDefinition[ 'for' ][1] )._.buttons.push( me ); } ); CKEDITOR.ui.dialog.button.call( this, dialog, myDefinition, htmlList ); }, html : (function() { var myHtmlRe = /^\s*<[\w:]+\s+([^>]*)?>/, theirHtmlRe = /^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/, emptyTagRe = /\/$/; /** * A dialog element made from raw HTML code. * @extends CKEDITOR.ui.dialog.uiElement * @name CKEDITOR.ui.dialog.html * @param {CKEDITOR.dialog} dialog Parent dialog object. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition Element definition. * Accepted fields: * <ul> * <li><strong>html</strong> (Required) HTML code of this element.</li> * </ul> * @param {Array} htmlList List of HTML code to be added to the dialog's content area. * @example * @constructor */ return function( dialog, elementDefinition, htmlList ) { if ( arguments.length < 3 ) return; var myHtmlList = [], myHtml, theirHtml = elementDefinition.html, myMatch, theirMatch; // If the HTML input doesn't contain any tags at the beginning, add a <span> tag around it. if ( theirHtml.charAt( 0 ) != '<' ) theirHtml = '<span>' + theirHtml + '</span>'; // Look for focus function in definition. var focus = elementDefinition.focus; if ( focus ) { var oldFocus = this.focus; this.focus = function() { oldFocus.call( this ); typeof focus == 'function' && focus.call( this ); this.fire( 'focus' ); }; if ( elementDefinition.isFocusable ) { var oldIsFocusable = this.isFocusable; this.isFocusable = oldIsFocusable; } this.keyboardFocusable = true; } CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, myHtmlList, 'span', null, null, '' ); // Append the attributes created by the uiElement call to the real HTML. myHtml = myHtmlList.join( '' ); myMatch = myHtml.match( myHtmlRe ); theirMatch = theirHtml.match( theirHtmlRe ) || [ '', '', '' ]; if ( emptyTagRe.test( theirMatch[1] ) ) { theirMatch[1] = theirMatch[1].slice( 0, -1 ); theirMatch[2] = '/' + theirMatch[2]; } htmlList.push( [ theirMatch[1], ' ', myMatch[1] || '', theirMatch[2] ].join( '' ) ); }; })(), /** * Form fieldset for grouping dialog UI elements. * @constructor * @extends CKEDITOR.ui.dialog.uiElement * @param {CKEDITOR.dialog} dialog Parent dialog object. * @param {Array} childObjList * Array of {@link CKEDITOR.ui.dialog.uiElement} objects inside this * container. * @param {Array} childHtmlList * Array of HTML code that correspond to the HTML output of all the * objects in childObjList. * @param {Array} htmlList * Array of HTML code that this element will output to. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition * The element definition. Accepted fields: * <ul> * <li><strong>label</strong> (Optional) The legend of the this fieldset.</li> * <li><strong>children</strong> (Required) An array of dialog field definitions which will be grouped inside this fieldset. </li> * </ul> */ fieldset : function( dialog, childObjList, childHtmlList, htmlList, elementDefinition ) { var legendLabel = elementDefinition.label; /** @ignore */ var innerHTML = function() { var html = []; legendLabel && html.push( '<legend' + ( elementDefinition.labelStyle ? ' style="' + elementDefinition.labelStyle + '"' : '' ) + '>' + legendLabel + '</legend>' ); for ( var i = 0; i < childHtmlList.length; i++ ) html.push( childHtmlList[ i ] ); return html.join( '' ); }; this._ = { children : childObjList }; CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, htmlList, 'fieldset', null, null, innerHTML ); } }, true ); CKEDITOR.ui.dialog.html.prototype = new CKEDITOR.ui.dialog.uiElement; CKEDITOR.ui.dialog.labeledElement.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.uiElement, /** @lends CKEDITOR.ui.dialog.labeledElement.prototype */ { /** * Sets the label text of the element. * @param {String} label The new label text. * @returns {CKEDITOR.ui.dialog.labeledElement} The current labeled element. * @example */ setLabel : function( label ) { var node = CKEDITOR.document.getById( this._.labelId ); if ( node.getChildCount() < 1 ) ( new CKEDITOR.dom.text( label, CKEDITOR.document ) ).appendTo( node ); else node.getChild( 0 ).$.nodeValue = label; return this; }, /** * Retrieves the current label text of the elment. * @returns {String} The current label text. * @example */ getLabel : function() { var node = CKEDITOR.document.getById( this._.labelId ); if ( !node || node.getChildCount() < 1 ) return ''; else return node.getChild( 0 ).getText(); }, /** * Defines the onChange event for UI element definitions. * @field * @type Object * @example */ eventProcessors : commonEventProcessors }, true ); CKEDITOR.ui.dialog.button.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.uiElement, /** @lends CKEDITOR.ui.dialog.button.prototype */ { /** * Simulates a click to the button. * @example * @returns {Object} Return value of the 'click' event. */ click : function() { if ( !this._.disabled ) return this.fire( 'click', { dialog : this._.dialog } ); this.getElement().$.blur(); return false; }, /** * Enables the button. * @example */ enable : function() { this._.disabled = false; var element = this.getElement(); element && element.removeClass( 'cke_disabled' ); }, /** * Disables the button. * @example */ disable : function() { this._.disabled = true; this.getElement().addClass( 'cke_disabled' ); }, isVisible : function() { return this.getElement().getFirst().isVisible(); }, isEnabled : function() { return !this._.disabled; }, /** * Defines the onChange event and onClick for button element definitions. * @field * @type Object * @example */ eventProcessors : CKEDITOR.tools.extend( {}, CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors, { /** @ignore */ onClick : function( dialog, func ) { this.on( 'click', function() { // Some browsers (Chrome, IE8, IE7 compat mode) don't move // focus to clicked button. Force this. this.getElement().focus(); func.apply( this, arguments ); }); } }, true ), /** * Handler for the element's access key up event. Simulates a click to * the button. * @example */ accessKeyUp : function() { this.click(); }, /** * Handler for the element's access key down event. Simulates a mouse * down to the button. * @example */ accessKeyDown : function() { this.focus(); }, keyboardFocusable : true }, true ); CKEDITOR.ui.dialog.textInput.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.labeledElement, /** @lends CKEDITOR.ui.dialog.textInput.prototype */ { /** * Gets the text input DOM element under this UI object. * @example * @returns {CKEDITOR.dom.element} The DOM element of the text input. */ getInputElement : function() { return CKEDITOR.document.getById( this._.inputId ); }, /** * Puts focus into the text input. * @example */ focus : function() { var me = this.selectParentTab(); // GECKO BUG: setTimeout() is needed to workaround invisible selections. setTimeout( function() { var element = me.getInputElement(); element && element.$.focus(); }, 0 ); }, /** * Selects all the text in the text input. * @example */ select : function() { var me = this.selectParentTab(); // GECKO BUG: setTimeout() is needed to workaround invisible selections. setTimeout( function() { var e = me.getInputElement(); if ( e ) { e.$.focus(); e.$.select(); } }, 0 ); }, /** * Handler for the text input's access key up event. Makes a select() * call to the text input. * @example */ accessKeyUp : function() { this.select(); }, /** * Sets the value of this text input object. * @param {Object} value The new value. * @returns {CKEDITOR.ui.dialog.textInput} The current UI element. * @example * uiElement.setValue( 'Blamo' ); */ setValue : function( value ) { !value && ( value = '' ); return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply( this, arguments ); }, keyboardFocusable : true }, commonPrototype, true ); CKEDITOR.ui.dialog.textarea.prototype = new CKEDITOR.ui.dialog.textInput(); CKEDITOR.ui.dialog.select.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.labeledElement, /** @lends CKEDITOR.ui.dialog.select.prototype */ { /** * Gets the DOM element of the select box. * @returns {CKEDITOR.dom.element} The &lt;select&gt; element of this UI * element. * @example */ getInputElement : function() { return this._.select.getElement(); }, /** * Adds an option to the select box. * @param {String} label Option label. * @param {String} value (Optional) Option value, if not defined it'll be * assumed to be the same as the label. * @param {Number} index (Optional) Position of the option to be inserted * to. If not defined the new option will be inserted to the end of list. * @example * @returns {CKEDITOR.ui.dialog.select} The current select UI element. */ add : function( label, value, index ) { var option = new CKEDITOR.dom.element( 'option', this.getDialog().getParentEditor().document ), selectElement = this.getInputElement().$; option.$.text = label; option.$.value = ( value === undefined || value === null ) ? label : value; if ( index === undefined || index === null ) { if ( CKEDITOR.env.ie ) selectElement.add( option.$ ); else selectElement.add( option.$, null ); } else selectElement.add( option.$, index ); return this; }, /** * Removes an option from the selection list. * @param {Number} index Index of the option to be removed. * @example * @returns {CKEDITOR.ui.dialog.select} The current select UI element. */ remove : function( index ) { var selectElement = this.getInputElement().$; selectElement.remove( index ); return this; }, /** * Clears all options out of the selection list. * @returns {CKEDITOR.ui.dialog.select} The current select UI element. */ clear : function() { var selectElement = this.getInputElement().$; while ( selectElement.length > 0 ) selectElement.remove( 0 ); return this; }, keyboardFocusable : true }, commonPrototype, true ); CKEDITOR.ui.dialog.checkbox.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.uiElement, /** @lends CKEDITOR.ui.dialog.checkbox.prototype */ { /** * Gets the checkbox DOM element. * @example * @returns {CKEDITOR.dom.element} The DOM element of the checkbox. */ getInputElement : function() { return this._.checkbox.getElement(); }, /** * Sets the state of the checkbox. * @example * @param {Boolean} true to tick the checkbox, false to untick it. * @param {Boolean} noChangeEvent Internal commit, to supress 'change' event on this element. */ setValue : function( checked, noChangeEvent ) { this.getInputElement().$.checked = checked; !noChangeEvent && this.fire( 'change', { value : checked } ); }, /** * Gets the state of the checkbox. * @example * @returns {Boolean} true means the checkbox is ticked, false means it's not ticked. */ getValue : function() { return this.getInputElement().$.checked; }, /** * Handler for the access key up event. Toggles the checkbox. * @example */ accessKeyUp : function() { this.setValue( !this.getValue() ); }, /** * Defines the onChange event for UI element definitions. * @field * @type Object * @example */ eventProcessors : { onChange : function( dialog, func ) { if ( !CKEDITOR.env.ie ) return commonEventProcessors.onChange.apply( this, arguments ); else { dialog.on( 'load', function() { var element = this._.checkbox.getElement(); element.on( 'propertychange', function( evt ) { evt = evt.data.$; if ( evt.propertyName == 'checked' ) this.fire( 'change', { value : element.$.checked } ); }, this ); }, this ); this.on( 'change', func ); } return null; } }, keyboardFocusable : true }, commonPrototype, true ); CKEDITOR.ui.dialog.radio.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.uiElement, /** @lends CKEDITOR.ui.dialog.radio.prototype */ { /** * Checks one of the radio buttons in this button group. * @example * @param {String} value The value of the button to be chcked. * @param {Boolean} noChangeEvent Internal commit, to supress 'change' event on this element. */ setValue : function( value, noChangeEvent ) { var children = this._.children, item; for ( var i = 0 ; ( i < children.length ) && ( item = children[i] ) ; i++ ) item.getElement().$.checked = ( item.getValue() == value ); !noChangeEvent && this.fire( 'change', { value : value } ); }, /** * Gets the value of the currently checked radio button. * @example * @returns {String} The currently checked button's value. */ getValue : function() { var children = this._.children; for ( var i = 0 ; i < children.length ; i++ ) { if ( children[i].getElement().$.checked ) return children[i].getValue(); } return null; }, /** * Handler for the access key up event. Focuses the currently * selected radio button, or the first radio button if none is * selected. * @example */ accessKeyUp : function() { var children = this._.children, i; for ( i = 0 ; i < children.length ; i++ ) { if ( children[i].getElement().$.checked ) { children[i].getElement().focus(); return; } } children[0].getElement().focus(); }, /** * Defines the onChange event for UI element definitions. * @field * @type Object * @example */ eventProcessors : { onChange : function( dialog, func ) { if ( !CKEDITOR.env.ie ) return commonEventProcessors.onChange.apply( this, arguments ); else { dialog.on( 'load', function() { var children = this._.children, me = this; for ( var i = 0 ; i < children.length ; i++ ) { var element = children[i].getElement(); element.on( 'propertychange', function( evt ) { evt = evt.data.$; if ( evt.propertyName == 'checked' && this.$.checked ) me.fire( 'change', { value : this.getAttribute( 'value' ) } ); } ); } }, this ); this.on( 'change', func ); } return null; } }, keyboardFocusable : true }, commonPrototype, true ); CKEDITOR.ui.dialog.file.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.labeledElement, commonPrototype, /** @lends CKEDITOR.ui.dialog.file.prototype */ { /** * Gets the &lt;input&gt; element of this file input. * @returns {CKEDITOR.dom.element} The file input element. * @example */ getInputElement : function() { var frameDocument = CKEDITOR.document.getById( this._.frameId ).getFrameDocument(); return frameDocument.$.forms.length > 0 ? new CKEDITOR.dom.element( frameDocument.$.forms[0].elements[0] ) : this.getElement(); }, /** * Uploads the file in the file input. * @returns {CKEDITOR.ui.dialog.file} This object. * @example */ submit : function() { this.getInputElement().getParent().$.submit(); return this; }, /** * Get the action assigned to the form. * @returns {String} The value of the action. * @example */ getAction : function() { return this.getInputElement().getParent().$.action; }, /** * The events must be applied on the inner input element, and * that must be done when the iframe & form has been loaded */ registerEvents : function( definition ) { var regex = /^on([A-Z]\w+)/, match; var registerDomEvent = function( uiElement, dialog, eventName, func ) { uiElement.on( 'formLoaded', function() { uiElement.getInputElement().on( eventName, func, uiElement ); }); }; for ( var i in definition ) { if ( !( match = i.match( regex ) ) ) continue; if ( this.eventProcessors[i] ) this.eventProcessors[i].call( this, this._.dialog, definition[i] ); else registerDomEvent( this, this._.dialog, match[1].toLowerCase(), definition[i] ); } return this; }, /** * Redraws the file input and resets the file path in the file input. * The redraw logic is necessary because non-IE browsers tend to clear * the &lt;iframe&gt; containing the file input after closing the dialog. * @example */ reset : function() { var _ = this._, frameElement = CKEDITOR.document.getById( _.frameId ), frameDocument = frameElement.getFrameDocument(), elementDefinition = _.definition, buttons = _.buttons, callNumber = this.formLoadedNumber, unloadNumber = this.formUnloadNumber, langDir = _.dialog._.editor.lang.dir, langCode = _.dialog._.editor.langCode; // The callback function for the iframe, but we must call tools.addFunction only once // so we store the function number in this.formLoadedNumber if ( !callNumber ) { callNumber = this.formLoadedNumber = CKEDITOR.tools.addFunction( function() { // Now we can apply the events to the input type=file this.fire( 'formLoaded' ) ; }, this ) ; // Remove listeners attached to the content of the iframe (the file input) unloadNumber = this.formUnloadNumber = CKEDITOR.tools.addFunction( function() { this.getInputElement().clearCustomData(); }, this ) ; this.getDialog()._.editor.on( 'destroy', function() { CKEDITOR.tools.removeFunction( callNumber ); CKEDITOR.tools.removeFunction( unloadNumber ); } ); } function generateFormField() { frameDocument.$.open(); // Support for custom document.domain in IE. if ( CKEDITOR.env.isCustomDomain() ) frameDocument.$.domain = document.domain; var size = ''; if ( elementDefinition.size ) size = elementDefinition.size - ( CKEDITOR.env.ie ? 7 : 0 ); // "Browse" button is bigger in IE. frameDocument.$.write( [ '<html dir="' + langDir + '" lang="' + langCode + '"><head><title></title></head><body style="margin: 0; overflow: hidden; background: transparent;">', '<form enctype="multipart/form-data" method="POST" dir="' + langDir + '" lang="' + langCode + '" action="', CKEDITOR.tools.htmlEncode( elementDefinition.action ), '">', '<input type="file" name="', CKEDITOR.tools.htmlEncode( elementDefinition.id || 'cke_upload' ), '" size="', CKEDITOR.tools.htmlEncode( size > 0 ? size : "" ), '" />', '</form>', '</body></html>', '<script>window.parent.CKEDITOR.tools.callFunction(' + callNumber + ');', 'window.onbeforeunload = function() {window.parent.CKEDITOR.tools.callFunction(' + unloadNumber + ')}</script>' ].join( '' ) ); frameDocument.$.close(); for ( var i = 0 ; i < buttons.length ; i++ ) buttons[i].enable(); } // #3465: Wait for the browser to finish rendering the dialog first. if ( CKEDITOR.env.gecko ) setTimeout( generateFormField, 500 ); else generateFormField(); }, getValue : function() { return this.getInputElement().$.value || ''; }, /*** * The default value of input type="file" is an empty string, but during initialization * of this UI element, the iframe still isn't ready so it can't be read from that object * Setting it manually prevents later issues about the current value ("") being different * of the initial value (undefined as it asked for .value of a div) */ setInitValue : function() { this._.initValue = ''; }, /** * Defines the onChange event for UI element definitions. * @field * @type Object * @example */ eventProcessors : { onChange : function( dialog, func ) { // If this method is called several times (I'm not sure about how this can happen but the default // onChange processor includes this protection) // In order to reapply to the new element, the property is deleted at the beggining of the registerEvents method if ( !this._.domOnChangeRegistered ) { // By listening for the formLoaded event, this handler will get reapplied when a new // form is created this.on( 'formLoaded', function() { this.getInputElement().on( 'change', function(){ this.fire( 'change', { value : this.getValue() } ); }, this ); }, this ); this._.domOnChangeRegistered = true; } this.on( 'change', func ); } }, keyboardFocusable : true }, true ); CKEDITOR.ui.dialog.fileButton.prototype = new CKEDITOR.ui.dialog.button; CKEDITOR.ui.dialog.fieldset.prototype = CKEDITOR.tools.clone( CKEDITOR.ui.dialog.hbox.prototype ); CKEDITOR.dialog.addUIElement( 'text', textBuilder ); CKEDITOR.dialog.addUIElement( 'password', textBuilder ); CKEDITOR.dialog.addUIElement( 'textarea', commonBuilder ); CKEDITOR.dialog.addUIElement( 'checkbox', commonBuilder ); CKEDITOR.dialog.addUIElement( 'radio', commonBuilder ); CKEDITOR.dialog.addUIElement( 'button', commonBuilder ); CKEDITOR.dialog.addUIElement( 'select', commonBuilder ); CKEDITOR.dialog.addUIElement( 'file', commonBuilder ); CKEDITOR.dialog.addUIElement( 'fileButton', commonBuilder ); CKEDITOR.dialog.addUIElement( 'html', commonBuilder ); CKEDITOR.dialog.addUIElement( 'fieldset', containerBuilder ); })(); /** * Fired when the value of the uiElement is changed * @name CKEDITOR.ui.dialog.uiElement#change * @event */ /** * Fired when the inner frame created by the element is ready. * Each time the button is used or the dialog is loaded a new * form might be created. * @name CKEDITOR.ui.dialog.fileButton#formLoaded * @event */
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/dialogui/plugin.js
JavaScript
gpl3
51,361
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ // Register a plugin named "sample". CKEDITOR.plugins.add( 'keystrokes', { beforeInit : function( editor ) { /** * Controls keystrokes typing in this editor instance. * @name CKEDITOR.editor.prototype.keystrokeHandler * @type CKEDITOR.keystrokeHandler * @example */ editor.keystrokeHandler = new CKEDITOR.keystrokeHandler( editor ); editor.specialKeys = {}; }, init : function( editor ) { var keystrokesConfig = editor.config.keystrokes, blockedConfig = editor.config.blockedKeystrokes; var keystrokes = editor.keystrokeHandler.keystrokes, blockedKeystrokes = editor.keystrokeHandler.blockedKeystrokes; for ( var i = 0 ; i < keystrokesConfig.length ; i++ ) keystrokes[ keystrokesConfig[i][0] ] = keystrokesConfig[i][1]; for ( i = 0 ; i < blockedConfig.length ; i++ ) blockedKeystrokes[ blockedConfig[i] ] = 1; } }); /** * Controls keystrokes typing in an editor instance. * @constructor * @param {CKEDITOR.editor} editor The editor instance. * @example */ CKEDITOR.keystrokeHandler = function( editor ) { if ( editor.keystrokeHandler ) return editor.keystrokeHandler; /** * List of keystrokes associated to commands. Each entry points to the * command to be executed. * @type Object * @example */ this.keystrokes = {}; /** * List of keystrokes that should be blocked if not defined at * {@link keystrokes}. In this way it is possible to block the default * browser behavior for those keystrokes. * @type Object * @example */ this.blockedKeystrokes = {}; this._ = { editor : editor }; return this; }; (function() { var cancel; var onKeyDown = function( event ) { // The DOM event object is passed by the "data" property. event = event.data; var keyCombination = event.getKeystroke(); var command = this.keystrokes[ keyCombination ]; var editor = this._.editor; cancel = ( editor.fire( 'key', { keyCode : keyCombination } ) === true ); if ( !cancel ) { if ( command ) { var data = { from : 'keystrokeHandler' }; cancel = ( editor.execCommand( command, data ) !== false ); } if ( !cancel ) { var handler = editor.specialKeys[ keyCombination ]; cancel = ( handler && handler( editor ) === true ); if ( !cancel ) cancel = !!this.blockedKeystrokes[ keyCombination ]; } } if ( cancel ) event.preventDefault( true ); return !cancel; }; var onKeyPress = function( event ) { if ( cancel ) { cancel = false; event.data.preventDefault( true ); } }; CKEDITOR.keystrokeHandler.prototype = { /** * Attaches this keystroke handle to a DOM object. Keystrokes typed ** over this object will get handled by this keystrokeHandler. * @param {CKEDITOR.dom.domObject} domObject The DOM object to attach * to. * @example */ attach : function( domObject ) { // For most browsers, it is enough to listen to the keydown event // only. domObject.on( 'keydown', onKeyDown, this ); // Some browsers instead, don't cancel key events in the keydown, but in the // keypress. So we must do a longer trip in those cases. if ( CKEDITOR.env.opera || ( CKEDITOR.env.gecko && CKEDITOR.env.mac ) ) domObject.on( 'keypress', onKeyPress, this ); } }; })(); /** * A list of keystrokes to be blocked if not defined in the {@link CKEDITOR.config.keystrokes} * setting. In this way it is possible to block the default browser behavior * for those keystrokes. * @type Array * @default (see example) * @example * // This is actually the default value. * config.blockedKeystrokes = * [ * CKEDITOR.CTRL + 66 &#47;*B*&#47;, * CKEDITOR.CTRL + 73 &#47;*I*&#47;, * CKEDITOR.CTRL + 85 &#47;*U*&#47; * ]; */ CKEDITOR.config.blockedKeystrokes = [ CKEDITOR.CTRL + 66 /*B*/, CKEDITOR.CTRL + 73 /*I*/, CKEDITOR.CTRL + 85 /*U*/ ]; /** * A list associating keystrokes to editor commands. Each element in the list * is an array where the first item is the keystroke, and the second is the * name of the command to be executed. * @type Array * @default (see example) * @example * // This is actually the default value. * config.keystrokes = * [ * [ CKEDITOR.ALT + 121 &#47;*F10*&#47;, 'toolbarFocus' ], * [ CKEDITOR.ALT + 122 &#47;*F11*&#47;, 'elementsPathFocus' ], * * [ CKEDITOR.SHIFT + 121 &#47;*F10*&#47;, 'contextMenu' ], * * [ CKEDITOR.CTRL + 90 &#47;*Z*&#47;, 'undo' ], * [ CKEDITOR.CTRL + 89 &#47;*Y*&#47;, 'redo' ], * [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 90 &#47;*Z*&#47;, 'redo' ], * * [ CKEDITOR.CTRL + 76 &#47;*L*&#47;, 'link' ], * * [ CKEDITOR.CTRL + 66 &#47;*B*&#47;, 'bold' ], * [ CKEDITOR.CTRL + 73 &#47;*I*&#47;, 'italic' ], * [ CKEDITOR.CTRL + 85 &#47;*U*&#47;, 'underline' ], * * [ CKEDITOR.ALT + 109 &#47;*-*&#47;, 'toolbarCollapse' ] * ]; */ CKEDITOR.config.keystrokes = [ [ CKEDITOR.ALT + 121 /*F10*/, 'toolbarFocus' ], [ CKEDITOR.ALT + 122 /*F11*/, 'elementsPathFocus' ], [ CKEDITOR.SHIFT + 121 /*F10*/, 'contextMenu' ], [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 121 /*F10*/, 'contextMenu' ], [ CKEDITOR.CTRL + 90 /*Z*/, 'undo' ], [ CKEDITOR.CTRL + 89 /*Y*/, 'redo' ], [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 90 /*Z*/, 'redo' ], [ CKEDITOR.CTRL + 76 /*L*/, 'link' ], [ CKEDITOR.CTRL + 66 /*B*/, 'bold' ], [ CKEDITOR.CTRL + 73 /*I*/, 'italic' ], [ CKEDITOR.CTRL + 85 /*U*/, 'underline' ], [ CKEDITOR.ALT + ( CKEDITOR.env.ie || CKEDITOR.env.webkit ? 189 : 109 ) /*-*/, 'toolbarCollapse' ], [ CKEDITOR.ALT + 48 /*0*/, 'a11yHelp' ] ]; /** * Fired when any keyboard key (or combination) is pressed into the editing area. * @name CKEDITOR.editor#key * @event * @param {Number} data.keyCode A number representing the key code (or * combination). It is the sum of the current key code and the * {@link CKEDITOR.CTRL}, {@link CKEDITOR.SHIFT} and {@link CKEDITOR.ALT} * constants, if those are pressed. */
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/keystrokes/plugin.js
JavaScript
gpl3
6,299
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @file Blockquote. */ (function() { function getState( editor, path ) { var firstBlock = path.block || path.blockLimit; if ( !firstBlock || firstBlock.getName() == 'body' ) return CKEDITOR.TRISTATE_OFF; // See if the first block has a blockquote parent. if ( firstBlock.getAscendant( 'blockquote', true ) ) return CKEDITOR.TRISTATE_ON; return CKEDITOR.TRISTATE_OFF; } function onSelectionChange( evt ) { var editor = evt.editor; if ( editor.readOnly ) return; var command = editor.getCommand( 'blockquote' ); command.state = getState( editor, evt.data.path ); command.fire( 'state' ); } function noBlockLeft( bqBlock ) { for ( var i = 0, length = bqBlock.getChildCount(), child ; i < length && ( child = bqBlock.getChild( i ) ) ; i++ ) { if ( child.type == CKEDITOR.NODE_ELEMENT && child.isBlockBoundary() ) return false; } return true; } var commandObject = { exec : function( editor ) { var state = editor.getCommand( 'blockquote' ).state, selection = editor.getSelection(), range = selection && selection.getRanges( true )[0]; if ( !range ) return; var bookmarks = selection.createBookmarks(); // Kludge for #1592: if the bookmark nodes are in the beginning of // blockquote, then move them to the nearest block element in the // blockquote. if ( CKEDITOR.env.ie ) { var bookmarkStart = bookmarks[0].startNode, bookmarkEnd = bookmarks[0].endNode, cursor; if ( bookmarkStart && bookmarkStart.getParent().getName() == 'blockquote' ) { cursor = bookmarkStart; while ( ( cursor = cursor.getNext() ) ) { if ( cursor.type == CKEDITOR.NODE_ELEMENT && cursor.isBlockBoundary() ) { bookmarkStart.move( cursor, true ); break; } } } if ( bookmarkEnd && bookmarkEnd.getParent().getName() == 'blockquote' ) { cursor = bookmarkEnd; while ( ( cursor = cursor.getPrevious() ) ) { if ( cursor.type == CKEDITOR.NODE_ELEMENT && cursor.isBlockBoundary() ) { bookmarkEnd.move( cursor ); break; } } } } var iterator = range.createIterator(), block; iterator.enlargeBr = editor.config.enterMode != CKEDITOR.ENTER_BR; if ( state == CKEDITOR.TRISTATE_OFF ) { var paragraphs = []; while ( ( block = iterator.getNextParagraph() ) ) paragraphs.push( block ); // If no paragraphs, create one from the current selection position. if ( paragraphs.length < 1 ) { var para = editor.document.createElement( editor.config.enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ), firstBookmark = bookmarks.shift(); range.insertNode( para ); para.append( new CKEDITOR.dom.text( '\ufeff', editor.document ) ); range.moveToBookmark( firstBookmark ); range.selectNodeContents( para ); range.collapse( true ); firstBookmark = range.createBookmark(); paragraphs.push( para ); bookmarks.unshift( firstBookmark ); } // Make sure all paragraphs have the same parent. var commonParent = paragraphs[0].getParent(), tmp = []; for ( var i = 0 ; i < paragraphs.length ; i++ ) { block = paragraphs[i]; commonParent = commonParent.getCommonAncestor( block.getParent() ); } // The common parent must not be the following tags: table, tbody, tr, ol, ul. var denyTags = { table : 1, tbody : 1, tr : 1, ol : 1, ul : 1 }; while ( denyTags[ commonParent.getName() ] ) commonParent = commonParent.getParent(); // Reconstruct the block list to be processed such that all resulting blocks // satisfy parentNode.equals( commonParent ). var lastBlock = null; while ( paragraphs.length > 0 ) { block = paragraphs.shift(); while ( !block.getParent().equals( commonParent ) ) block = block.getParent(); if ( !block.equals( lastBlock ) ) tmp.push( block ); lastBlock = block; } // If any of the selected blocks is a blockquote, remove it to prevent // nested blockquotes. while ( tmp.length > 0 ) { block = tmp.shift(); if ( block.getName() == 'blockquote' ) { var docFrag = new CKEDITOR.dom.documentFragment( editor.document ); while ( block.getFirst() ) { docFrag.append( block.getFirst().remove() ); paragraphs.push( docFrag.getLast() ); } docFrag.replace( block ); } else paragraphs.push( block ); } // Now we have all the blocks to be included in a new blockquote node. var bqBlock = editor.document.createElement( 'blockquote' ); bqBlock.insertBefore( paragraphs[0] ); while ( paragraphs.length > 0 ) { block = paragraphs.shift(); bqBlock.append( block ); } } else if ( state == CKEDITOR.TRISTATE_ON ) { var moveOutNodes = [], database = {}; while ( ( block = iterator.getNextParagraph() ) ) { var bqParent = null, bqChild = null; while ( block.getParent() ) { if ( block.getParent().getName() == 'blockquote' ) { bqParent = block.getParent(); bqChild = block; break; } block = block.getParent(); } // Remember the blocks that were recorded down in the moveOutNodes array // to prevent duplicates. if ( bqParent && bqChild && !bqChild.getCustomData( 'blockquote_moveout' ) ) { moveOutNodes.push( bqChild ); CKEDITOR.dom.element.setMarker( database, bqChild, 'blockquote_moveout', true ); } } CKEDITOR.dom.element.clearAllMarkers( database ); var movedNodes = [], processedBlockquoteBlocks = []; database = {}; while ( moveOutNodes.length > 0 ) { var node = moveOutNodes.shift(); bqBlock = node.getParent(); // If the node is located at the beginning or the end, just take it out // without splitting. Otherwise, split the blockquote node and move the // paragraph in between the two blockquote nodes. if ( !node.getPrevious() ) node.remove().insertBefore( bqBlock ); else if ( !node.getNext() ) node.remove().insertAfter( bqBlock ); else { node.breakParent( node.getParent() ); processedBlockquoteBlocks.push( node.getNext() ); } // Remember the blockquote node so we can clear it later (if it becomes empty). if ( !bqBlock.getCustomData( 'blockquote_processed' ) ) { processedBlockquoteBlocks.push( bqBlock ); CKEDITOR.dom.element.setMarker( database, bqBlock, 'blockquote_processed', true ); } movedNodes.push( node ); } CKEDITOR.dom.element.clearAllMarkers( database ); // Clear blockquote nodes that have become empty. for ( i = processedBlockquoteBlocks.length - 1 ; i >= 0 ; i-- ) { bqBlock = processedBlockquoteBlocks[i]; if ( noBlockLeft( bqBlock ) ) bqBlock.remove(); } if ( editor.config.enterMode == CKEDITOR.ENTER_BR ) { var firstTime = true; while ( movedNodes.length ) { node = movedNodes.shift(); if ( node.getName() == 'div' ) { docFrag = new CKEDITOR.dom.documentFragment( editor.document ); var needBeginBr = firstTime && node.getPrevious() && !( node.getPrevious().type == CKEDITOR.NODE_ELEMENT && node.getPrevious().isBlockBoundary() ); if ( needBeginBr ) docFrag.append( editor.document.createElement( 'br' ) ); var needEndBr = node.getNext() && !( node.getNext().type == CKEDITOR.NODE_ELEMENT && node.getNext().isBlockBoundary() ); while ( node.getFirst() ) node.getFirst().remove().appendTo( docFrag ); if ( needEndBr ) docFrag.append( editor.document.createElement( 'br' ) ); docFrag.replace( node ); firstTime = false; } } } } selection.selectBookmarks( bookmarks ); editor.focus(); } }; CKEDITOR.plugins.add( 'blockquote', { init : function( editor ) { editor.addCommand( 'blockquote', commandObject ); editor.ui.addButton( 'Blockquote', { label : editor.lang.blockquote, command : 'blockquote' } ); editor.on( 'selectionChange', onSelectionChange ); }, requires : [ 'domiterator' ] } ); })();
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/blockquote/plugin.js
JavaScript
gpl3
8,767
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @file Spell checker */ // Register a plugin named "wsc". CKEDITOR.plugins.add( 'wsc', { requires : [ 'dialog' ], init : function( editor ) { var commandName = 'checkspell'; var command = editor.addCommand( commandName, new CKEDITOR.dialogCommand( commandName ) ); // SpellChecker doesn't work in Opera and with custom domain command.modes = { wysiwyg : ( !CKEDITOR.env.opera && !CKEDITOR.env.air && document.domain == window.location.hostname ) }; editor.ui.addButton( 'SpellChecker', { label : editor.lang.spellCheck.toolbar, command : commandName }); CKEDITOR.dialog.add( commandName, this.path + 'dialogs/wsc.js' ); } }); CKEDITOR.config.wsc_customerId = CKEDITOR.config.wsc_customerId || '1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk' ; CKEDITOR.config.wsc_customLoaderScript = CKEDITOR.config.wsc_customLoaderScript || null;
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/wsc/plugin.js
JavaScript
gpl3
1,082
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'checkspell', function( editor ) { var number = CKEDITOR.tools.getNextNumber(), iframeId = 'cke_frame_' + number, textareaId = 'cke_data_' + number, errorBoxId = 'cke_error_' + number, interval, protocol = document.location.protocol || 'http:', errorMsg = editor.lang.spellCheck.notAvailable; var pasteArea = '<textarea'+ ' style="display: none"' + ' id="' + textareaId + '"' + ' rows="10"' + ' cols="40">' + ' </textarea><div' + ' id="' + errorBoxId + '"' + ' style="display:none;color:red;font-size:16px;font-weight:bold;padding-top:160px;text-align:center;z-index:11;">' + '</div><iframe' + ' src=""' + ' style="width:100%;background-color:#f1f1e3;"' + ' frameborder="0"' + ' name="' + iframeId + '"' + ' id="' + iframeId + '"' + ' allowtransparency="1">' + '</iframe>'; var wscCoreUrl = editor.config.wsc_customLoaderScript || ( protocol + '//loader.webspellchecker.net/sproxy_fck/sproxy.php' + '?plugin=fck2' + '&customerid=' + editor.config.wsc_customerId + '&cmd=script&doc=wsc&schema=22' ); if ( editor.config.wsc_customLoaderScript ) errorMsg += '<p style="color:#000;font-size:11px;font-weight: normal;text-align:center;padding-top:10px">' + editor.lang.spellCheck.errorLoading.replace( /%s/g, editor.config.wsc_customLoaderScript ) + '</p>'; function burnSpelling( dialog, errorMsg ) { var i = 0; return function () { if ( typeof( window.doSpell ) == 'function' ) { //Call from window.setInteval expected at once. if ( typeof( interval ) != 'undefined' ) window.clearInterval( interval ); initAndSpell( dialog ); } else if ( i++ == 180 ) // Timeout: 180 * 250ms = 45s. window._cancelOnError( errorMsg ); }; } window._cancelOnError = function( m ) { if ( typeof( window.WSC_Error ) == 'undefined' ) { CKEDITOR.document.getById( iframeId ).setStyle( 'display', 'none' ); var errorBox = CKEDITOR.document.getById( errorBoxId ); errorBox.setStyle( 'display', 'block' ); errorBox.setHtml( m || editor.lang.spellCheck.notAvailable ); } }; function initAndSpell( dialog ) { var LangComparer = new window._SP_FCK_LangCompare(), // Language abbr standarts comparer. pluginPath = CKEDITOR.getUrl( editor.plugins.wsc.path + 'dialogs/' ), // Service paths corecting/preparing. framesetPath = pluginPath + 'tmpFrameset.html'; // global var is used in FCK specific core // change on equal var used in fckplugin.js window.gFCKPluginName = 'wsc'; LangComparer.setDefaulLangCode( editor.config.defaultLanguage ); window.doSpell({ ctrl : textareaId, lang : editor.config.wsc_lang || LangComparer.getSPLangCode(editor.langCode ), intLang: editor.config.wsc_uiLang || LangComparer.getSPLangCode(editor.langCode ), winType : iframeId, // If not defined app will run on winpopup. // Callback binding section. onCancel : function() { dialog.hide(); }, onFinish : function( dT ) { editor.focus(); dialog.getParentEditor().setData( dT.value ); dialog.hide(); }, // Some manipulations with client static pages. staticFrame : framesetPath, framesetPath : framesetPath, iframePath : pluginPath + 'ciframe.html', // Styles defining. schemaURI : pluginPath + 'wsc.css', userDictionaryName: editor.config.wsc_userDictionaryName, customDictionaryName: editor.config.wsc_customDictionaryIds && editor.config.wsc_customDictionaryIds.split(","), domainName: editor.config.wsc_domainName }); // Hide user message console (if application was loaded more then after timeout). CKEDITOR.document.getById( errorBoxId ).setStyle( 'display', 'none' ); CKEDITOR.document.getById( iframeId ).setStyle( 'display', 'block' ); } return { title : editor.config.wsc_dialogTitle || editor.lang.spellCheck.title, minWidth : 485, minHeight : 380, buttons : [ CKEDITOR.dialog.cancelButton ], onShow : function() { var contentArea = this.getContentElement( 'general', 'content' ).getElement(); contentArea.setHtml( pasteArea ); contentArea.getChild( 2 ).setStyle( 'height', this._.contentSize.height + 'px' ); if ( typeof( window.doSpell ) != 'function' ) { // Load script. CKEDITOR.document.getHead().append( CKEDITOR.document.createElement( 'script', { attributes : { type : 'text/javascript', src : wscCoreUrl } }) ); } var sData = editor.getData(); // Get the data to be checked. CKEDITOR.document.getById( textareaId ).setValue( sData ); interval = window.setInterval( burnSpelling( this, errorMsg ), 250 ); }, onHide : function() { window.ooo = undefined; window.int_framsetLoaded = undefined; window.framesetLoaded = undefined; window.is_window_opened = false; }, contents : [ { id : 'general', label : editor.config.wsc_dialogTitle || editor.lang.spellCheck.title, padding : 0, elements : [ { type : 'html', id : 'content', html : '' } ] } ] }; }); // Expand the spell-check frame when dialog resized. (#6829) CKEDITOR.dialog.on( 'resize', function( evt ) { var data = evt.data, dialog = data.dialog; if ( dialog._.name == 'checkspell' ) { var content = dialog.getContentElement( 'general', 'content' ).getElement(), iframe = content && content.getChild( 2 ); iframe && iframe.setSize( 'height', data.height ); iframe && iframe.setSize( 'width', data.width ); } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/wsc/dialogs/wsc.js
JavaScript
gpl3
5,893
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!-- Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license --> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript"> function gup( name ) { name = name.replace( /[\[]/, '\\\[' ).replace( /[\]]/, '\\\]' ) ; var regexS = '[\\?&]' + name + '=([^&#]*)' ; var regex = new RegExp( regexS ) ; var results = regex.exec( window.location.href ) ; if ( results ) return results[ 1 ] ; else return '' ; } var interval; function sendData2Master() { var destination = window.parent.parent ; try { if ( destination.XDTMaster ) { var t = destination.XDTMaster.read( [ gup( 'cmd' ), gup( 'data' ) ] ) ; window.clearInterval( interval ) ; } } catch (e) {} } function onLoad() { interval = window.setInterval( sendData2Master, 100 ); } </script> </head> <body onload="onLoad()"><p></p></body> </html>
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/wsc/dialogs/ciframe.html
HTML
gpl3
1,120
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <!-- Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license --> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript"> function doLoadScript( url ) { if ( !url ) return false ; var s = document.createElement( "script" ) ; s.type = "text/javascript" ; s.src = url ; document.getElementsByTagName( "head" )[ 0 ].appendChild( s ) ; return true ; } var opener; function tryLoad() { opener = window.parent; // get access to global parameters var oParams = window.opener.oldFramesetPageParams; // make frameset rows string prepare var sFramesetRows = ( parseInt( oParams.firstframeh, 10 ) || '30') + ",*," + ( parseInt( oParams.thirdframeh, 10 ) || '150' ) + ',0' ; document.getElementById( 'itFrameset' ).rows = sFramesetRows ; // dynamic including init frames and crossdomain transport code // from config sproxy_js_frameset url var addScriptUrl = oParams.sproxy_js_frameset ; doLoadScript( addScriptUrl ) ; } </script> </head> <frameset id="itFrameset" onload="tryLoad();" border="0" rows="30,*,*,0"> <frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="0" marginwidth="2" src="" name="navbar"></frame> <frame scrolling="auto" framespacing="0" frameborder="0" noresize="noresize" marginheight="0" marginwidth="0" src="" name="mid"></frame> <frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="1" marginwidth="1" src="" name="bot"></frame> <frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="1" marginwidth="1" src="" name="spellsuggestall"></frame> </frameset> </html>
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/wsc/dialogs/tmpFrameset.html
HTML
gpl3
1,935
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add( 'contextmenu', { requires : [ 'menu' ], // Make sure the base class (CKEDITOR.menu) is loaded before it (#3318). onLoad : function() { CKEDITOR.plugins.contextMenu = CKEDITOR.tools.createClass( { base : CKEDITOR.menu, $ : function( editor ) { this.base.call( this, editor, { panel: { className : editor.skinClass + ' cke_contextmenu', attributes : { 'aria-label' : editor.lang.contextmenu.options } } }); }, proto : { addTarget : function( element, nativeContextMenuOnCtrl ) { // Opera doesn't support 'contextmenu' event, we have duo approaches employed here: // 1. Inherit the 'button override' hack we introduced in v2 (#4530), while this require the Opera browser // option 'Allow script to detect context menu/right click events' to be always turned on. // 2. Considering the fact that ctrl/meta key is not been occupied // for multiple range selecting (like Gecko), we use this key // combination as a fallback for triggering context-menu. (#4530) if ( CKEDITOR.env.opera && !( 'oncontextmenu' in document.body )) { var contextMenuOverrideButton; element.on( 'mousedown', function( evt ) { evt = evt.data; if ( evt.$.button != 2 ) { if ( evt.getKeystroke() == CKEDITOR.CTRL + 1 ) element.fire( 'contextmenu', evt ); return; } if ( nativeContextMenuOnCtrl && ( CKEDITOR.env.mac ? evt.$.metaKey : evt.$.ctrlKey ) ) return; var target = evt.getTarget(); if ( !contextMenuOverrideButton ) { var ownerDoc = target.getDocument(); contextMenuOverrideButton = ownerDoc.createElement( 'input' ) ; contextMenuOverrideButton.$.type = 'button' ; ownerDoc.getBody().append( contextMenuOverrideButton ) ; } contextMenuOverrideButton.setAttribute( 'style', 'position:absolute;top:' + ( evt.$.clientY - 2 ) + 'px;left:' + ( evt.$.clientX - 2 ) + 'px;width:5px;height:5px;opacity:0.01' ); } ); element.on( 'mouseup', function ( evt ) { if ( contextMenuOverrideButton ) { contextMenuOverrideButton.remove(); contextMenuOverrideButton = undefined; // Simulate 'contextmenu' event. element.fire( 'contextmenu', evt.data ); } } ); } element.on( 'contextmenu', function( event ) { var domEvent = event.data; if ( nativeContextMenuOnCtrl && // Safari on Windows always show 'ctrlKey' as true in 'contextmenu' event, // which make this property unreliable. (#4826) ( CKEDITOR.env.webkit ? holdCtrlKey : ( CKEDITOR.env.mac ? domEvent.$.metaKey : domEvent.$.ctrlKey ) ) ) return; // Cancel the browser context menu. domEvent.preventDefault(); var offsetParent = domEvent.getTarget().getDocument().getDocumentElement(), offsetX = domEvent.$.clientX, offsetY = domEvent.$.clientY; CKEDITOR.tools.setTimeout( function() { this.open( offsetParent, null, offsetX, offsetY ); // IE needs a short while to allow selection change before opening menu. (#7908) }, CKEDITOR.env.ie? 200 : 0, this ); }, this ); if ( CKEDITOR.env.opera ) { // 'contextmenu' event triggered by Windows menu key is unpreventable, // cancel the key event itself. (#6534) element.on( 'keypress' , function ( evt ) { var domEvent = evt.data; if ( domEvent.$.keyCode === 0 ) domEvent.preventDefault(); }); } if ( CKEDITOR.env.webkit ) { var holdCtrlKey, onKeyDown = function( event ) { holdCtrlKey = CKEDITOR.env.mac ? event.data.$.metaKey : event.data.$.ctrlKey ; }, resetOnKeyUp = function() { holdCtrlKey = 0; }; element.on( 'keydown', onKeyDown ); element.on( 'keyup', resetOnKeyUp ); element.on( 'contextmenu', resetOnKeyUp ); } }, open : function( offsetParent, corner, offsetX, offsetY ) { this.editor.focus(); offsetParent = offsetParent || CKEDITOR.document.getDocumentElement(); this.show( offsetParent, corner, offsetX, offsetY ); } } }); }, beforeInit : function( editor ) { editor.contextMenu = new CKEDITOR.plugins.contextMenu( editor ); editor.addCommand( 'contextMenu', { exec : function() { editor.contextMenu.open( editor.document.getBody() ); } }); } }); /** * Whether to show the browser native context menu when the <em>Ctrl</em> or * <em>Meta</em> (Mac) key is pressed on opening the context menu with the * right mouse button click or the <em>Menu</em> key. * @name CKEDITOR.config.browserContextMenuOnCtrl * @since 3.0.2 * @type Boolean * @default <code>true</code> * @example * config.browserContextMenuOnCtrl = false; */
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/contextmenu/plugin.js
JavaScript
gpl3
5,353
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add( 'basicstyles', { requires : [ 'styles', 'button' ], init : function( editor ) { // All buttons use the same code to register. So, to avoid // duplications, let's use this tool function. var addButtonCommand = function( buttonName, buttonLabel, commandName, styleDefiniton ) { var style = new CKEDITOR.style( styleDefiniton ); editor.attachStyleStateChange( style, function( state ) { !editor.readOnly && editor.getCommand( commandName ).setState( state ); }); editor.addCommand( commandName, new CKEDITOR.styleCommand( style ) ); editor.ui.addButton( buttonName, { label : buttonLabel, command : commandName }); }; var config = editor.config, lang = editor.lang; addButtonCommand( 'Bold' , lang.bold , 'bold' , config.coreStyles_bold ); addButtonCommand( 'Italic' , lang.italic , 'italic' , config.coreStyles_italic ); addButtonCommand( 'Underline' , lang.underline , 'underline' , config.coreStyles_underline ); addButtonCommand( 'Strike' , lang.strike , 'strike' , config.coreStyles_strike ); addButtonCommand( 'Subscript' , lang.subscript , 'subscript' , config.coreStyles_subscript ); addButtonCommand( 'Superscript' , lang.superscript , 'superscript' , config.coreStyles_superscript ); } }); // Basic Inline Styles. /** * The style definition that applies the <strong>bold</strong> style to the text. * @type Object * @default <code>{ element : 'strong', overrides : 'b' }</code> * @example * config.coreStyles_bold = { element : 'b', overrides : 'strong' }; * @example * config.coreStyles_bold = * { * element : 'span', * attributes : { 'class' : 'Bold' } * }; */ CKEDITOR.config.coreStyles_bold = { element : 'strong', overrides : 'b' }; /** * The style definition that applies the <em>italics</em> style to the text. * @type Object * @default <code>{ element : 'em', overrides : 'i' }</code> * @example * config.coreStyles_italic = { element : 'i', overrides : 'em' }; * @example * CKEDITOR.config.coreStyles_italic = * { * element : 'span', * attributes : { 'class' : 'Italic' } * }; */ CKEDITOR.config.coreStyles_italic = { element : 'em', overrides : 'i' }; /** * The style definition that applies the <u>underline</u> style to the text. * @type Object * @default <code>{ element : 'u' }</code> * @example * CKEDITOR.config.coreStyles_underline = * { * element : 'span', * attributes : { 'class' : 'Underline' } * }; */ CKEDITOR.config.coreStyles_underline = { element : 'u' }; /** * The style definition that applies the <strike>strike-through</strike> style to the text. * @type Object * @default <code>{ element : 'strike' }</code> * @example * CKEDITOR.config.coreStyles_strike = * { * element : 'span', * attributes : { 'class' : 'StrikeThrough' }, * overrides : 'strike' * }; */ CKEDITOR.config.coreStyles_strike = { element : 'strike' }; /** * The style definition that applies the subscript style to the text. * @type Object * @default <code>{ element : 'sub' }</code> * @example * CKEDITOR.config.coreStyles_subscript = * { * element : 'span', * attributes : { 'class' : 'Subscript' }, * overrides : 'sub' * }; */ CKEDITOR.config.coreStyles_subscript = { element : 'sub' }; /** * The style definition that applies the superscript style to the text. * @type Object * @default <code>{ element : 'sup' }</code> * @example * CKEDITOR.config.coreStyles_superscript = * { * element : 'span', * attributes : { 'class' : 'Superscript' }, * overrides : 'sup' * }; */ CKEDITOR.config.coreStyles_superscript = { element : 'sup' };
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/basicstyles/plugin.js
JavaScript
gpl3
4,074
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview The "div" plugin. It wraps the selected block level elements with a 'div' element with specified styles and attributes. * */ (function() { CKEDITOR.plugins.add( 'div', { requires : [ 'editingblock', 'domiterator', 'styles' ], init : function( editor ) { var lang = editor.lang.div; editor.addCommand( 'creatediv', new CKEDITOR.dialogCommand( 'creatediv' ) ); editor.addCommand( 'editdiv', new CKEDITOR.dialogCommand( 'editdiv' ) ); editor.addCommand( 'removediv', { exec : function( editor ) { var selection = editor.getSelection(), ranges = selection && selection.getRanges(), range, bookmarks = selection.createBookmarks(), walker, toRemove = []; function findDiv( node ) { var path = new CKEDITOR.dom.elementPath( node ), blockLimit = path.blockLimit, div = blockLimit.is( 'div' ) && blockLimit; if ( div && !div.data( 'cke-div-added' ) ) { toRemove.push( div ); div.data( 'cke-div-added' ); } } for ( var i = 0 ; i < ranges.length ; i++ ) { range = ranges[ i ]; if ( range.collapsed ) findDiv( selection.getStartElement() ); else { walker = new CKEDITOR.dom.walker( range ); walker.evaluator = findDiv; walker.lastForward(); } } for ( i = 0 ; i < toRemove.length ; i++ ) toRemove[ i ].remove( true ); selection.selectBookmarks( bookmarks ); } } ); editor.ui.addButton( 'CreateDiv', { label : lang.toolbar, command :'creatediv' } ); if ( editor.addMenuItems ) { editor.addMenuItems( { editdiv : { label : lang.edit, command : 'editdiv', group : 'div', order : 1 }, removediv: { label : lang.remove, command : 'removediv', group : 'div', order : 5 } } ); if ( editor.contextMenu ) { editor.contextMenu.addListener( function( element, selection ) { if ( !element || element.isReadOnly() ) return null; var elementPath = new CKEDITOR.dom.elementPath( element ), blockLimit = elementPath.blockLimit; if ( blockLimit && blockLimit.getAscendant( 'div', true ) ) { return { editdiv : CKEDITOR.TRISTATE_OFF, removediv : CKEDITOR.TRISTATE_OFF }; } return null; } ); } } CKEDITOR.dialog.add( 'creatediv', this.path + 'dialogs/div.js' ); CKEDITOR.dialog.add( 'editdiv', this.path + 'dialogs/div.js' ); } } ); })();
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/div/plugin.js
JavaScript
gpl3
2,944
/* * Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { /** * Add to collection with DUP examination. * @param {Object} collection * @param {Object} element * @param {Object} database */ function addSafely( collection, element, database ) { // 1. IE doesn't support customData on text nodes; // 2. Text nodes never get chance to appear twice; if ( !element.is || !element.getCustomData( 'block_processed' ) ) { element.is && CKEDITOR.dom.element.setMarker( database, element, 'block_processed', true ); collection.push( element ); } } function getNonEmptyChildren( element ) { var retval = []; var children = element.getChildren(); for ( var i = 0 ; i < children.count() ; i++ ) { var child = children.getItem( i ); if ( ! ( child.type === CKEDITOR.NODE_TEXT && ( /^[ \t\n\r]+$/ ).test( child.getText() ) ) ) retval.push( child ); } return retval; } /** * Dialog reused by both 'creatediv' and 'editdiv' commands. * @param {Object} editor * @param {String} command The command name which indicate what the current command is. */ function divDialog( editor, command ) { // Definition of elements at which div operation should stopped. var divLimitDefinition = ( function(){ // Customzie from specialize blockLimit elements var definition = CKEDITOR.tools.extend( {}, CKEDITOR.dtd.$blockLimit ); // Exclude 'div' itself. delete definition.div; // Exclude 'td' and 'th' when 'wrapping table' if ( editor.config.div_wrapTable ) { delete definition.td; delete definition.th; } return definition; })(); // DTD of 'div' element var dtd = CKEDITOR.dtd.div; /** * Get the first div limit element on the element's path. * @param {Object} element */ function getDivLimitElement( element ) { var pathElements = new CKEDITOR.dom.elementPath( element ).elements; var divLimit; for ( var i = 0; i < pathElements.length ; i++ ) { if ( pathElements[ i ].getName() in divLimitDefinition ) { divLimit = pathElements[ i ]; break; } } return divLimit; } /** * Init all fields' setup/commit function. * @memberof divDialog */ function setupFields() { this.foreach( function( field ) { // Exclude layout container elements if ( /^(?!vbox|hbox)/.test( field.type ) ) { if ( !field.setup ) { // Read the dialog fields values from the specified // element attributes. field.setup = function( element ) { field.setValue( element.getAttribute( field.id ) || '' ); }; } if ( !field.commit ) { // Set element attributes assigned by the dialog // fields. field.commit = function( element ) { var fieldValue = this.getValue(); // ignore default element attribute values if ( 'dir' == field.id && element.getComputedStyle( 'direction' ) == fieldValue ) return; if ( fieldValue ) element.setAttribute( field.id, fieldValue ); else element.removeAttribute( field.id ); }; } } } ); } /** * Wrapping 'div' element around appropriate blocks among the selected ranges. * @param {Object} editor */ function createDiv( editor ) { // new adding containers OR detected pre-existed containers. var containers = []; // node markers store. var database = {}; // All block level elements which contained by the ranges. var containedBlocks = [], block; // Get all ranges from the selection. var selection = editor.document.getSelection(), ranges = selection.getRanges(); var bookmarks = selection.createBookmarks(); var i, iterator; // Calcualte a default block tag if we need to create blocks. var blockTag = editor.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p'; // collect all included elements from dom-iterator for ( i = 0 ; i < ranges.length ; i++ ) { iterator = ranges[ i ].createIterator(); while ( ( block = iterator.getNextParagraph() ) ) { // include contents of blockLimit elements. if ( block.getName() in divLimitDefinition ) { var j, childNodes = block.getChildren(); for ( j = 0 ; j < childNodes.count() ; j++ ) addSafely( containedBlocks, childNodes.getItem( j ) , database ); } else { // Bypass dtd disallowed elements. while ( !dtd[ block.getName() ] && block.getName() != 'body' ) block = block.getParent(); addSafely( containedBlocks, block, database ); } } } CKEDITOR.dom.element.clearAllMarkers( database ); var blockGroups = groupByDivLimit( containedBlocks ); var ancestor, blockEl, divElement; for ( i = 0 ; i < blockGroups.length ; i++ ) { var currentNode = blockGroups[ i ][ 0 ]; // Calculate the common parent node of all contained elements. ancestor = currentNode.getParent(); for ( j = 1 ; j < blockGroups[ i ].length; j++ ) ancestor = ancestor.getCommonAncestor( blockGroups[ i ][ j ] ); divElement = new CKEDITOR.dom.element( 'div', editor.document ); // Normalize the blocks in each group to a common parent. for ( j = 0; j < blockGroups[ i ].length ; j++ ) { currentNode = blockGroups[ i ][ j ]; while ( !currentNode.getParent().equals( ancestor ) ) currentNode = currentNode.getParent(); // This could introduce some duplicated elements in array. blockGroups[ i ][ j ] = currentNode; } // Wrapped blocks counting var fixedBlock = null; for ( j = 0 ; j < blockGroups[ i ].length ; j++ ) { currentNode = blockGroups[ i ][ j ]; // Avoid DUP elements introduced by grouping. if ( !( currentNode.getCustomData && currentNode.getCustomData( 'block_processed' ) ) ) { currentNode.is && CKEDITOR.dom.element.setMarker( database, currentNode, 'block_processed', true ); // Establish new container, wrapping all elements in this group. if ( !j ) divElement.insertBefore( currentNode ); divElement.append( currentNode ); } } CKEDITOR.dom.element.clearAllMarkers( database ); containers.push( divElement ); } selection.selectBookmarks( bookmarks ); return containers; } function getDiv( editor ) { var path = new CKEDITOR.dom.elementPath( editor.getSelection().getStartElement() ), blockLimit = path.blockLimit, div = blockLimit && blockLimit.getAscendant( 'div', true ); return div; } /** * Divide a set of nodes to different groups by their path's blocklimit element. * Note: the specified nodes should be in source order naturally, which mean they are supposed to producea by following class: * * CKEDITOR.dom.range.Iterator * * CKEDITOR.dom.domWalker * @return {Array []} the grouped nodes */ function groupByDivLimit( nodes ) { var groups = [], lastDivLimit = null, path, block; for ( var i = 0 ; i < nodes.length ; i++ ) { block = nodes[i]; var limit = getDivLimitElement( block ); if ( !limit.equals( lastDivLimit ) ) { lastDivLimit = limit ; groups.push( [] ) ; } groups[ groups.length - 1 ].push( block ) ; } return groups; } // Synchronous field values to other impacted fields is required, e.g. div styles // change should also alter inline-style text. function commitInternally( targetFields ) { var dialog = this.getDialog(), element = dialog._element && dialog._element.clone() || new CKEDITOR.dom.element( 'div', editor.document ); // Commit this field and broadcast to target fields. this.commit( element, true ); targetFields = [].concat( targetFields ); var length = targetFields.length, field; for ( var i = 0; i < length; i++ ) { field = dialog.getContentElement.apply( dialog, targetFields[ i ].split( ':' ) ); field && field.setup && field.setup( element, true ); } } // Registered 'CKEDITOR.style' instances. var styles = {} ; /** * Hold a collection of created block container elements. */ var containers = []; /** * @type divDialog */ return { title : editor.lang.div.title, minWidth : 400, minHeight : 165, contents : [ { id :'info', label :editor.lang.common.generalTab, title :editor.lang.common.generalTab, elements : [ { type :'hbox', widths : [ '50%', '50%' ], children : [ { id :'elementStyle', type :'select', style :'width: 100%;', label :editor.lang.div.styleSelectLabel, 'default' : '', // Options are loaded dynamically. items : [ [ editor.lang.common.notSet , '' ] ], onChange : function() { commitInternally.call( this, [ 'info:class', 'advanced:dir', 'advanced:style' ] ); }, setup : function( element ) { for ( var name in styles ) styles[ name ].checkElementRemovable( element, true ) && this.setValue( name ); }, commit: function( element ) { var styleName; if ( ( styleName = this.getValue() ) ) { var style = styles[ styleName ]; var customData = element.getCustomData( 'elementStyle' ) || ''; style.applyToObject( element ); element.setCustomData( 'elementStyle', customData + style._.definition.attributes.style ); } } }, { id :'class', type :'text', label :editor.lang.common.cssClass, 'default' : '' } ] } ] }, { id :'advanced', label :editor.lang.common.advancedTab, title :editor.lang.common.advancedTab, elements : [ { type :'vbox', padding :1, children : [ { type :'hbox', widths : [ '50%', '50%' ], children : [ { type :'text', id :'id', label :editor.lang.common.id, 'default' : '' }, { type :'text', id :'lang', label :editor.lang.link.langCode, 'default' : '' } ] }, { type :'hbox', children : [ { type :'text', id :'style', style :'width: 100%;', label :editor.lang.common.cssStyle, 'default' : '', commit : function( element ) { // Merge with 'elementStyle', which is of higher priority. var merged = this.getValue() + ( element.getCustomData( 'elementStyle' ) || '' ); element.setAttribute( 'style', merged ); } } ] }, { type :'hbox', children : [ { type :'text', id :'title', style :'width: 100%;', label :editor.lang.common.advisoryTitle, 'default' : '' } ] }, { type :'select', id :'dir', style :'width: 100%;', label :editor.lang.common.langDir, 'default' : '', items : [ [ editor.lang.common.notSet , '' ], [ editor.lang.common.langDirLtr, 'ltr' ], [ editor.lang.common.langDirRtl, 'rtl' ] ] } ] } ] } ], onLoad : function() { setupFields.call( this ); // Preparing for the 'elementStyle' field. var dialog = this, stylesField = this.getContentElement( 'info', 'elementStyle' ); // Reuse the 'stylescombo' plugin's styles definition. editor.getStylesSet( function( stylesDefinitions ) { var styleName; if ( stylesDefinitions ) { // Digg only those styles that apply to 'div'. for ( var i = 0 ; i < stylesDefinitions.length ; i++ ) { var styleDefinition = stylesDefinitions[ i ]; if ( styleDefinition.element && styleDefinition.element == 'div' ) { styleName = styleDefinition.name; styles[ styleName ] = new CKEDITOR.style( styleDefinition ); // Populate the styles field options with style name. stylesField.items.push( [ styleName, styleName ] ); stylesField.add( styleName, styleName ); } } } // We should disable the content element // it if no options are available at all. stylesField[ stylesField.items.length > 1 ? 'enable' : 'disable' ](); // Now setup the field value manually. setTimeout( function() { stylesField.setup( dialog._element ); }, 0 ); } ); }, onShow : function() { // Whether always create new container regardless of existed // ones. if ( command == 'editdiv' ) { // Try to discover the containers that already existed in // ranges var div = getDiv( editor ); // update dialog field values div && this.setupContent( this._element = div ); } }, onOk : function() { if ( command == 'editdiv' ) containers = [ this._element ]; else containers = createDiv( editor, true ); // Update elements attributes var size = containers.length; for ( var i = 0; i < size; i++ ) { this.commitContent( containers[ i ] ); // Remove empty 'style' attribute. !containers[ i ].getAttribute( 'style' ) && containers[ i ].removeAttribute( 'style' ); } this.hide(); }, onHide : function() { // Remove style only when editing existing DIV. (#6315) if ( command == 'editdiv' ) this._element.removeCustomData( 'elementStyle' ); delete this._element; } }; } CKEDITOR.dialog.add( 'creatediv', function( editor ) { return divDialog( editor, 'creatediv' ); } ); CKEDITOR.dialog.add( 'editdiv', function( editor ) { return divDialog( editor, 'editdiv' ); } ); } )(); /* * @name CKEDITOR.config.div_wrapTable * Whether to wrap the whole table instead of indivisual cells when created 'div' in table cell. * @type Boolean * @default false * @example config.div_wrapTable = true; */
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/div/dialogs/div.js
JavaScript
gpl3
14,886
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add( 'find', { init : function( editor ) { var forms = CKEDITOR.plugins.find; editor.ui.addButton( 'Find', { label : editor.lang.findAndReplace.find, command : 'find' }); var findCommand = editor.addCommand( 'find', new CKEDITOR.dialogCommand( 'find' ) ); findCommand.canUndo = false; findCommand.readOnly = 1; editor.ui.addButton( 'Replace', { label : editor.lang.findAndReplace.replace, command : 'replace' }); var replaceCommand = editor.addCommand( 'replace', new CKEDITOR.dialogCommand( 'replace' ) ); replaceCommand.canUndo = false; CKEDITOR.dialog.add( 'find', this.path + 'dialogs/find.js' ); CKEDITOR.dialog.add( 'replace', this.path + 'dialogs/find.js' ); }, requires : [ 'styles' ] } ); /** * Defines the style to be used to highlight results with the find dialog. * @type Object * @default { element : 'span', styles : { 'background-color' : '#004', 'color' : '#fff' } } * @example * // Highlight search results with blue on yellow. * config.find_highlight = * { * element : 'span', * styles : { 'background-color' : '#ff0', 'color' : '#00f' } * }; */ CKEDITOR.config.find_highlight = { element : 'span', styles : { 'background-color' : '#004', 'color' : '#fff' } };
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/find/plugin.js
JavaScript
gpl3
1,483
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { var isReplace; function findEvaluator( node ) { return node.type == CKEDITOR.NODE_TEXT && node.getLength() > 0 && ( !isReplace || !node.isReadOnly() ); } /** * Elements which break characters been considered as sequence. */ function nonCharactersBoundary( node ) { return !( node.type == CKEDITOR.NODE_ELEMENT && node.isBlockBoundary( CKEDITOR.tools.extend( {}, CKEDITOR.dtd.$empty, CKEDITOR.dtd.$nonEditable ) ) ); } /** * Get the cursor object which represent both current character and it's dom * position thing. */ var cursorStep = function() { return { textNode : this.textNode, offset : this.offset, character : this.textNode ? this.textNode.getText().charAt( this.offset ) : null, hitMatchBoundary : this._.matchBoundary }; }; var pages = [ 'find', 'replace' ], fieldsMapping = [ [ 'txtFindFind', 'txtFindReplace' ], [ 'txtFindCaseChk', 'txtReplaceCaseChk' ], [ 'txtFindWordChk', 'txtReplaceWordChk' ], [ 'txtFindCyclic', 'txtReplaceCyclic' ] ]; /** * Synchronize corresponding filed values between 'replace' and 'find' pages. * @param {String} currentPageId The page id which receive values. */ function syncFieldsBetweenTabs( currentPageId ) { var sourceIndex, targetIndex, sourceField, targetField; sourceIndex = currentPageId === 'find' ? 1 : 0; targetIndex = 1 - sourceIndex; var i, l = fieldsMapping.length; for ( i = 0 ; i < l ; i++ ) { sourceField = this.getContentElement( pages[ sourceIndex ], fieldsMapping[ i ][ sourceIndex ] ); targetField = this.getContentElement( pages[ targetIndex ], fieldsMapping[ i ][ targetIndex ] ); targetField.setValue( sourceField.getValue() ); } } var findDialog = function( editor, startupPage ) { // Style object for highlights: (#5018) // 1. Defined as full match style to avoid compromising ordinary text color styles. // 2. Must be apply onto inner-most text to avoid conflicting with ordinary text color styles visually. var highlightStyle = new CKEDITOR.style( CKEDITOR.tools.extend( { attributes : { 'data-cke-highlight': 1 }, fullMatch : 1, ignoreReadonly : 1, childRule : function(){ return 0; } }, editor.config.find_highlight, true ) ); /** * Iterator which walk through the specified range char by char. By * default the walking will not stop at the character boundaries, until * the end of the range is encountered. * @param { CKEDITOR.dom.range } range * @param {Boolean} matchWord Whether the walking will stop at character boundary. */ var characterWalker = function( range , matchWord ) { var self = this; var walker = new CKEDITOR.dom.walker( range ); walker.guard = matchWord ? nonCharactersBoundary : function( node ) { !nonCharactersBoundary( node ) && ( self._.matchBoundary = true ); }; walker[ 'evaluator' ] = findEvaluator; walker.breakOnFalse = 1; if ( range.startContainer.type == CKEDITOR.NODE_TEXT ) { this.textNode = range.startContainer; this.offset = range.startOffset - 1; } this._ = { matchWord : matchWord, walker : walker, matchBoundary : false }; }; characterWalker.prototype = { next : function() { return this.move(); }, back : function() { return this.move( true ); }, move : function( rtl ) { var currentTextNode = this.textNode; // Already at the end of document, no more character available. if ( currentTextNode === null ) return cursorStep.call( this ); this._.matchBoundary = false; // There are more characters in the text node, step forward. if ( currentTextNode && rtl && this.offset > 0 ) { this.offset--; return cursorStep.call( this ); } else if ( currentTextNode && this.offset < currentTextNode.getLength() - 1 ) { this.offset++; return cursorStep.call( this ); } else { currentTextNode = null; // At the end of the text node, walking foward for the next. while ( !currentTextNode ) { currentTextNode = this._.walker[ rtl ? 'previous' : 'next' ].call( this._.walker ); // Stop searching if we're need full word match OR // already reach document end. if ( this._.matchWord && !currentTextNode || this._.walker._.end ) break; } // Found a fresh text node. this.textNode = currentTextNode; if ( currentTextNode ) this.offset = rtl ? currentTextNode.getLength() - 1 : 0; else this.offset = 0; } return cursorStep.call( this ); } }; /** * A range of cursors which represent a trunk of characters which try to * match, it has the same length as the pattern string. */ var characterRange = function( characterWalker, rangeLength ) { this._ = { walker : characterWalker, cursors : [], rangeLength : rangeLength, highlightRange : null, isMatched : 0 }; }; characterRange.prototype = { /** * Translate this range to {@link CKEDITOR.dom.range} */ toDomRange : function() { var range = new CKEDITOR.dom.range( editor.document ); var cursors = this._.cursors; if ( cursors.length < 1 ) { var textNode = this._.walker.textNode; if ( textNode ) range.setStartAfter( textNode ); else return null; } else { var first = cursors[0], last = cursors[ cursors.length - 1 ]; range.setStart( first.textNode, first.offset ); range.setEnd( last.textNode, last.offset + 1 ); } return range; }, /** * Reflect the latest changes from dom range. */ updateFromDomRange : function( domRange ) { var cursor, walker = new characterWalker( domRange ); this._.cursors = []; do { cursor = walker.next(); if ( cursor.character ) this._.cursors.push( cursor ); } while ( cursor.character ); this._.rangeLength = this._.cursors.length; }, setMatched : function() { this._.isMatched = true; }, clearMatched : function() { this._.isMatched = false; }, isMatched : function() { return this._.isMatched; }, /** * Hightlight the current matched chunk of text. */ highlight : function() { // Do not apply if nothing is found. if ( this._.cursors.length < 1 ) return; // Remove the previous highlight if there's one. if ( this._.highlightRange ) this.removeHighlight(); // Apply the highlight. var range = this.toDomRange(), bookmark = range.createBookmark(); highlightStyle.applyToRange( range ); range.moveToBookmark( bookmark ); this._.highlightRange = range; // Scroll the editor to the highlighted area. var element = range.startContainer; if ( element.type != CKEDITOR.NODE_ELEMENT ) element = element.getParent(); element.scrollIntoView(); // Update the character cursors. this.updateFromDomRange( range ); }, /** * Remove highlighted find result. */ removeHighlight : function() { if ( !this._.highlightRange ) return; var bookmark = this._.highlightRange.createBookmark(); highlightStyle.removeFromRange( this._.highlightRange ); this._.highlightRange.moveToBookmark( bookmark ); this.updateFromDomRange( this._.highlightRange ); this._.highlightRange = null; }, isReadOnly : function() { if ( !this._.highlightRange ) return 0; return this._.highlightRange.startContainer.isReadOnly(); }, moveBack : function() { var retval = this._.walker.back(), cursors = this._.cursors; if ( retval.hitMatchBoundary ) this._.cursors = cursors = []; cursors.unshift( retval ); if ( cursors.length > this._.rangeLength ) cursors.pop(); return retval; }, moveNext : function() { var retval = this._.walker.next(), cursors = this._.cursors; // Clear the cursors queue if we've crossed a match boundary. if ( retval.hitMatchBoundary ) this._.cursors = cursors = []; cursors.push( retval ); if ( cursors.length > this._.rangeLength ) cursors.shift(); return retval; }, getEndCharacter : function() { var cursors = this._.cursors; if ( cursors.length < 1 ) return null; return cursors[ cursors.length - 1 ].character; }, getNextCharacterRange : function( maxLength ) { var lastCursor, nextRangeWalker, cursors = this._.cursors; if ( ( lastCursor = cursors[ cursors.length - 1 ] ) && lastCursor.textNode ) nextRangeWalker = new characterWalker( getRangeAfterCursor( lastCursor ) ); // In case it's an empty range (no cursors), figure out next range from walker (#4951). else nextRangeWalker = this._.walker; return new characterRange( nextRangeWalker, maxLength ); }, getCursors : function() { return this._.cursors; } }; // The remaining document range after the character cursor. function getRangeAfterCursor( cursor , inclusive ) { var range = new CKEDITOR.dom.range(); range.setStart( cursor.textNode, ( inclusive ? cursor.offset : cursor.offset + 1 ) ); range.setEndAt( editor.document.getBody(), CKEDITOR.POSITION_BEFORE_END ); return range; } // The document range before the character cursor. function getRangeBeforeCursor( cursor ) { var range = new CKEDITOR.dom.range(); range.setStartAt( editor.document.getBody(), CKEDITOR.POSITION_AFTER_START ); range.setEnd( cursor.textNode, cursor.offset ); return range; } var KMP_NOMATCH = 0, KMP_ADVANCED = 1, KMP_MATCHED = 2; /** * Examination the occurrence of a word which implement KMP algorithm. */ var kmpMatcher = function( pattern, ignoreCase ) { var overlap = [ -1 ]; if ( ignoreCase ) pattern = pattern.toLowerCase(); for ( var i = 0 ; i < pattern.length ; i++ ) { overlap.push( overlap[i] + 1 ); while ( overlap[ i + 1 ] > 0 && pattern.charAt( i ) != pattern .charAt( overlap[ i + 1 ] - 1 ) ) overlap[ i + 1 ] = overlap[ overlap[ i + 1 ] - 1 ] + 1; } this._ = { overlap : overlap, state : 0, ignoreCase : !!ignoreCase, pattern : pattern }; }; kmpMatcher.prototype = { feedCharacter : function( c ) { if ( this._.ignoreCase ) c = c.toLowerCase(); while ( true ) { if ( c == this._.pattern.charAt( this._.state ) ) { this._.state++; if ( this._.state == this._.pattern.length ) { this._.state = 0; return KMP_MATCHED; } return KMP_ADVANCED; } else if ( !this._.state ) return KMP_NOMATCH; else this._.state = this._.overlap[ this._.state ]; } return null; }, reset : function() { this._.state = 0; } }; var wordSeparatorRegex = /[.,"'?!;: \u0085\u00a0\u1680\u280e\u2028\u2029\u202f\u205f\u3000]/; var isWordSeparator = function( c ) { if ( !c ) return true; var code = c.charCodeAt( 0 ); return ( code >= 9 && code <= 0xd ) || ( code >= 0x2000 && code <= 0x200a ) || wordSeparatorRegex.test( c ); }; var finder = { searchRange : null, matchRange : null, find : function( pattern, matchCase, matchWord, matchCyclic, highlightMatched, cyclicRerun ) { if ( !this.matchRange ) this.matchRange = new characterRange( new characterWalker( this.searchRange ), pattern.length ); else { this.matchRange.removeHighlight(); this.matchRange = this.matchRange.getNextCharacterRange( pattern.length ); } var matcher = new kmpMatcher( pattern, !matchCase ), matchState = KMP_NOMATCH, character = '%'; while ( character !== null ) { this.matchRange.moveNext(); while ( ( character = this.matchRange.getEndCharacter() ) ) { matchState = matcher.feedCharacter( character ); if ( matchState == KMP_MATCHED ) break; if ( this.matchRange.moveNext().hitMatchBoundary ) matcher.reset(); } if ( matchState == KMP_MATCHED ) { if ( matchWord ) { var cursors = this.matchRange.getCursors(), tail = cursors[ cursors.length - 1 ], head = cursors[ 0 ]; var headWalker = new characterWalker( getRangeBeforeCursor( head ), true ), tailWalker = new characterWalker( getRangeAfterCursor( tail ), true ); if ( ! ( isWordSeparator( headWalker.back().character ) && isWordSeparator( tailWalker.next().character ) ) ) continue; } this.matchRange.setMatched(); if ( highlightMatched !== false ) this.matchRange.highlight(); return true; } } this.matchRange.clearMatched(); this.matchRange.removeHighlight(); // Clear current session and restart with the default search // range. // Re-run the finding once for cyclic.(#3517) if ( matchCyclic && !cyclicRerun ) { this.searchRange = getSearchRange( 1 ); this.matchRange = null; return arguments.callee.apply( this, Array.prototype.slice.call( arguments ).concat( [ true ] ) ); } return false; }, /** * Record how much replacement occurred toward one replacing. */ replaceCounter : 0, replace : function( dialog, pattern, newString, matchCase, matchWord, matchCyclic , isReplaceAll ) { isReplace = 1; // Successiveness of current replace/find. var result = 0; // 1. Perform the replace when there's already a match here. // 2. Otherwise perform the find but don't replace it immediately. if ( this.matchRange && this.matchRange.isMatched() && !this.matchRange._.isReplaced && !this.matchRange.isReadOnly() ) { // Turn off highlight for a while when saving snapshots. this.matchRange.removeHighlight(); var domRange = this.matchRange.toDomRange(); var text = editor.document.createText( newString ); if ( !isReplaceAll ) { // Save undo snaps before and after the replacement. var selection = editor.getSelection(); selection.selectRanges( [ domRange ] ); editor.fire( 'saveSnapshot' ); } domRange.deleteContents(); domRange.insertNode( text ); if ( !isReplaceAll ) { selection.selectRanges( [ domRange ] ); editor.fire( 'saveSnapshot' ); } this.matchRange.updateFromDomRange( domRange ); if ( !isReplaceAll ) this.matchRange.highlight(); this.matchRange._.isReplaced = true; this.replaceCounter++; result = 1; } else result = this.find( pattern, matchCase, matchWord, matchCyclic, !isReplaceAll ); isReplace = 0; return result; } }; /** * The range in which find/replace happened, receive from user * selection prior. */ function getSearchRange( isDefault ) { var searchRange, sel = editor.getSelection(), body = editor.document.getBody(); if ( sel && !isDefault ) { searchRange = sel.getRanges()[ 0 ].clone(); searchRange.collapse( true ); } else { searchRange = new CKEDITOR.dom.range(); searchRange.setStartAt( body, CKEDITOR.POSITION_AFTER_START ); } searchRange.setEndAt( body, CKEDITOR.POSITION_BEFORE_END ); return searchRange; } var lang = editor.lang.findAndReplace; return { title : lang.title, resizable : CKEDITOR.DIALOG_RESIZE_NONE, minWidth : 350, minHeight : 170, buttons : [ CKEDITOR.dialog.cancelButton ], // Cancel button only. contents : [ { id : 'find', label : lang.find, title : lang.find, accessKey : '', elements : [ { type : 'hbox', widths : [ '230px', '90px' ], children : [ { type : 'text', id : 'txtFindFind', label : lang.findWhat, isChanged : false, labelLayout : 'horizontal', accessKey : 'F' }, { type : 'button', id : 'btnFind', align : 'left', style : 'width:100%', label : lang.find, onClick : function() { var dialog = this.getDialog(); if ( !finder.find( dialog.getValueOf( 'find', 'txtFindFind' ), dialog.getValueOf( 'find', 'txtFindCaseChk' ), dialog.getValueOf( 'find', 'txtFindWordChk' ), dialog.getValueOf( 'find', 'txtFindCyclic' ) ) ) alert( lang .notFoundMsg ); } } ] }, { type : 'fieldset', label : CKEDITOR.tools.htmlEncode( lang.findOptions ), style : 'margin-top:29px', children : [ { type : 'vbox', padding : 0, children : [ { type : 'checkbox', id : 'txtFindCaseChk', isChanged : false, label : lang.matchCase }, { type : 'checkbox', id : 'txtFindWordChk', isChanged : false, label : lang.matchWord }, { type : 'checkbox', id : 'txtFindCyclic', isChanged : false, 'default' : true, label : lang.matchCyclic } ] } ] } ] }, { id : 'replace', label : lang.replace, accessKey : 'M', elements : [ { type : 'hbox', widths : [ '230px', '90px' ], children : [ { type : 'text', id : 'txtFindReplace', label : lang.findWhat, isChanged : false, labelLayout : 'horizontal', accessKey : 'F' }, { type : 'button', id : 'btnFindReplace', align : 'left', style : 'width:100%', label : lang.replace, onClick : function() { var dialog = this.getDialog(); if ( !finder.replace( dialog, dialog.getValueOf( 'replace', 'txtFindReplace' ), dialog.getValueOf( 'replace', 'txtReplace' ), dialog.getValueOf( 'replace', 'txtReplaceCaseChk' ), dialog.getValueOf( 'replace', 'txtReplaceWordChk' ), dialog.getValueOf( 'replace', 'txtReplaceCyclic' ) ) ) alert( lang .notFoundMsg ); } } ] }, { type : 'hbox', widths : [ '230px', '90px' ], children : [ { type : 'text', id : 'txtReplace', label : lang.replaceWith, isChanged : false, labelLayout : 'horizontal', accessKey : 'R' }, { type : 'button', id : 'btnReplaceAll', align : 'left', style : 'width:100%', label : lang.replaceAll, isChanged : false, onClick : function() { var dialog = this.getDialog(); var replaceNums; finder.replaceCounter = 0; // Scope to full document. finder.searchRange = getSearchRange( 1 ); if ( finder.matchRange ) { finder.matchRange.removeHighlight(); finder.matchRange = null; } editor.fire( 'saveSnapshot' ); while ( finder.replace( dialog, dialog.getValueOf( 'replace', 'txtFindReplace' ), dialog.getValueOf( 'replace', 'txtReplace' ), dialog.getValueOf( 'replace', 'txtReplaceCaseChk' ), dialog.getValueOf( 'replace', 'txtReplaceWordChk' ), false, true ) ) { /*jsl:pass*/ } if ( finder.replaceCounter ) { alert( lang.replaceSuccessMsg.replace( /%1/, finder.replaceCounter ) ); editor.fire( 'saveSnapshot' ); } else alert( lang.notFoundMsg ); } } ] }, { type : 'fieldset', label : CKEDITOR.tools.htmlEncode( lang.findOptions ), children : [ { type : 'vbox', padding : 0, children : [ { type : 'checkbox', id : 'txtReplaceCaseChk', isChanged : false, label : lang.matchCase }, { type : 'checkbox', id : 'txtReplaceWordChk', isChanged : false, label : lang.matchWord }, { type : 'checkbox', id : 'txtReplaceCyclic', isChanged : false, 'default' : true, label : lang.matchCyclic } ] } ] } ] } ], onLoad : function() { var dialog = this; // Keep track of the current pattern field in use. var patternField, wholeWordChkField; // Ignore initial page select on dialog show var isUserSelect = 0; this.on( 'hide', function() { isUserSelect = 0; }); this.on( 'show', function() { isUserSelect = 1; }); this.selectPage = CKEDITOR.tools.override( this.selectPage, function( originalFunc ) { return function( pageId ) { originalFunc.call( dialog, pageId ); var currPage = dialog._.tabs[ pageId ]; var patternFieldInput, patternFieldId, wholeWordChkFieldId; patternFieldId = pageId === 'find' ? 'txtFindFind' : 'txtFindReplace'; wholeWordChkFieldId = pageId === 'find' ? 'txtFindWordChk' : 'txtReplaceWordChk'; patternField = dialog.getContentElement( pageId, patternFieldId ); wholeWordChkField = dialog.getContentElement( pageId, wholeWordChkFieldId ); // Prepare for check pattern text filed 'keyup' event if ( !currPage.initialized ) { patternFieldInput = CKEDITOR.document .getById( patternField._.inputId ); currPage.initialized = true; } // Synchronize fields on tab switch. if ( isUserSelect ) syncFieldsBetweenTabs.call( this, pageId ); }; } ); }, onShow : function() { // Establish initial searching start position. finder.searchRange = getSearchRange(); // Fill in the find field with selected text. var selectedText = this.getParentEditor().getSelection().getSelectedText(), patternFieldId = ( startupPage == 'find' ? 'txtFindFind' : 'txtFindReplace' ); var field = this.getContentElement( startupPage, patternFieldId ); field.setValue( selectedText ); field.select(); this.selectPage( startupPage ); this[ ( startupPage == 'find' && this._.editor.readOnly? 'hide' : 'show' ) + 'Page' ]( 'replace'); }, onHide : function() { var range; if ( finder.matchRange && finder.matchRange.isMatched() ) { finder.matchRange.removeHighlight(); editor.focus(); range = finder.matchRange.toDomRange(); if ( range ) editor.getSelection().selectRanges( [ range ] ); } // Clear current session before dialog close delete finder.matchRange; }, onFocus : function() { if ( startupPage == 'replace' ) return this.getContentElement( 'replace', 'txtFindReplace' ); else return this.getContentElement( 'find', 'txtFindFind' ); } }; }; CKEDITOR.dialog.add( 'find', function( editor ) { return findDialog( editor, 'find' ); }); CKEDITOR.dialog.add( 'replace', function( editor ) { return findDialog( editor, 'replace' ); }); })();
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/find/dialogs/find.js
JavaScript
gpl3
24,690
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add( 'removeformat', { requires : [ 'selection' ], init : function( editor ) { editor.addCommand( 'removeFormat', CKEDITOR.plugins.removeformat.commands.removeformat ); editor.ui.addButton( 'RemoveFormat', { label : editor.lang.removeFormat, command : 'removeFormat' }); editor._.removeFormat = { filters: [] }; } }); CKEDITOR.plugins.removeformat = { commands : { removeformat : { exec : function( editor ) { var tagsRegex = editor._.removeFormatRegex || ( editor._.removeFormatRegex = new RegExp( '^(?:' + editor.config.removeFormatTags.replace( /,/g,'|' ) + ')$', 'i' ) ); var removeAttributes = editor._.removeAttributes || ( editor._.removeAttributes = editor.config.removeFormatAttributes.split( ',' ) ); var filter = CKEDITOR.plugins.removeformat.filter; var ranges = editor.getSelection().getRanges( 1 ), iterator = ranges.createIterator(), range; while ( ( range = iterator.getNextRange() ) ) { if ( ! range.collapsed ) range.enlarge( CKEDITOR.ENLARGE_ELEMENT ); // Bookmark the range so we can re-select it after processing. var bookmark = range.createBookmark(), // The style will be applied within the bookmark boundaries. startNode = bookmark.startNode, endNode = bookmark.endNode, currentNode; // We need to check the selection boundaries (bookmark spans) to break // the code in a way that we can properly remove partially selected nodes. // For example, removing a <b> style from // <b>This is [some text</b> to show <b>the] problem</b> // ... where [ and ] represent the selection, must result: // <b>This is </b>[some text to show the]<b> problem</b> // The strategy is simple, we just break the partial nodes before the // removal logic, having something that could be represented this way: // <b>This is </b>[<b>some text</b> to show <b>the</b>]<b> problem</b> var breakParent = function( node ) { // Let's start checking the start boundary. var path = new CKEDITOR.dom.elementPath( node ), pathElements = path.elements; for ( var i = 1, pathElement ; pathElement = pathElements[ i ] ; i++ ) { if ( pathElement.equals( path.block ) || pathElement.equals( path.blockLimit ) ) break; // If this element can be removed (even partially). if ( tagsRegex.test( pathElement.getName() ) && filter( editor, pathElement ) ) node.breakParent( pathElement ); } }; breakParent( startNode ); if ( endNode ) { breakParent( endNode ); // Navigate through all nodes between the bookmarks. currentNode = startNode.getNextSourceNode( true, CKEDITOR.NODE_ELEMENT ); while ( currentNode ) { // If we have reached the end of the selection, stop looping. if ( currentNode.equals( endNode ) ) break; // Cache the next node to be processed. Do it now, because // currentNode may be removed. var nextNode = currentNode.getNextSourceNode( false, CKEDITOR.NODE_ELEMENT ); // This node must not be a fake element. if ( !( currentNode.getName() == 'img' && currentNode.data( 'cke-realelement' ) ) && filter( editor, currentNode ) ) { // Remove elements nodes that match with this style rules. if ( tagsRegex.test( currentNode.getName() ) ) currentNode.remove( 1 ); else { currentNode.removeAttributes( removeAttributes ); editor.fire( 'removeFormatCleanup', currentNode ); } } currentNode = nextNode; } } range.moveToBookmark( bookmark ); } editor.getSelection().selectRanges( ranges ); } } }, /** * Perform the remove format filters on the passed element. * @param {CKEDITOR.editor} editor * @param {CKEDITOR.dom.element} element */ filter : function ( editor, element ) { var filters = editor._.removeFormat.filters; for ( var i = 0; i < filters.length; i++ ) { if ( filters[ i ]( element ) === false ) return false; } return true; } }; /** * Add to a collection of functions to decide whether a specific * element should be considered as formatting element and thus * could be removed during <b>removeFormat</b> command, * Note: Only available with the existence of 'removeformat' plugin. * @since 3.3 * @param {Function} func The function to be called, which will be passed a {CKEDITOR.dom.element} element to test. * @example * // Don't remove empty span * editor.addRemoveFormatFilter.push( function( element ) * { * return !( element.is( 'span' ) && CKEDITOR.tools.isEmpty( element.getAttributes() ) ); * }); */ CKEDITOR.editor.prototype.addRemoveFormatFilter = function( func ) { this._.removeFormat.filters.push( func ); }; /** * A comma separated list of elements to be removed when executing the "remove " format" command. Note that only inline elements are allowed. * @type String * @default 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var' * @example */ CKEDITOR.config.removeFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var'; /** * A comma separated list of elements attributes to be removed when executing * the "remove format" command. * @type String * @default 'class,style,lang,width,height,align,hspace,valign' * @example */ CKEDITOR.config.removeFormatAttributes = 'class,style,lang,width,height,align,hspace,valign'; /** * Fired after an element was cleaned by the removeFormat plugin. * @name CKEDITOR.editor#removeFormatCleanup * @event * @param {Object} data.element The element that was cleaned up. */
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/removeformat/plugin.js
JavaScript
gpl3
6,147
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { CKEDITOR.plugins.add( 'enterkey', { requires : [ 'keystrokes', 'indent' ], init : function( editor ) { editor.addCommand( 'enter', { modes : { wysiwyg:1 }, editorFocus : false, exec : function( editor ){ enter( editor ); } }); editor.addCommand( 'shiftEnter', { modes : { wysiwyg:1 }, editorFocus : false, exec : function( editor ){ shiftEnter( editor ); } }); var keystrokes = editor.keystrokeHandler.keystrokes; keystrokes[ 13 ] = 'enter'; keystrokes[ CKEDITOR.SHIFT + 13 ] = 'shiftEnter'; } }); CKEDITOR.plugins.enterkey = { enterBlock : function( editor, mode, range, forceMode ) { // Get the range for the current selection. range = range || getRange( editor ); // We may not have valid ranges to work on, like when inside a // contenteditable=false element. if ( !range ) return; var doc = range.document; var atBlockStart = range.checkStartOfBlock(), atBlockEnd = range.checkEndOfBlock(), path = new CKEDITOR.dom.elementPath( range.startContainer ), block = path.block; if ( atBlockStart && atBlockEnd ) { // Exit the list when we're inside an empty list item block. (#5376) if ( block && ( block.is( 'li' ) || block.getParent().is( 'li' ) ) ) { editor.execCommand( 'outdent' ); return; } if ( block && block.getParent().is( 'blockquote' ) ) { block.breakParent( block.getParent() ); // If we were at the start of <blockquote>, there will be an empty element before it now. if ( !block.getPrevious().getFirst( CKEDITOR.dom.walker.invisible(1) ) ) block.getPrevious().remove(); // If we were at the end of <blockquote>, there will be an empty element after it now. if ( !block.getNext().getFirst( CKEDITOR.dom.walker.invisible(1) ) ) block.getNext().remove(); range.moveToElementEditStart( block ); range.select(); return; } } // Don't split <pre> if we're in the middle of it, act as shift enter key. else if ( block && block.is( 'pre' ) ) { if ( !atBlockEnd ) { enterBr( editor, mode, range, forceMode ); return; } } // Don't split caption blocks. (#7944) else if ( block && CKEDITOR.dtd.$captionBlock[ block.getName() ] ) { enterBr( editor, mode, range, forceMode ); return; } // Determine the block element to be used. var blockTag = ( mode == CKEDITOR.ENTER_DIV ? 'div' : 'p' ); // Split the range. var splitInfo = range.splitBlock( blockTag ); if ( !splitInfo ) return; // Get the current blocks. var previousBlock = splitInfo.previousBlock, nextBlock = splitInfo.nextBlock; var isStartOfBlock = splitInfo.wasStartOfBlock, isEndOfBlock = splitInfo.wasEndOfBlock; var node; // If this is a block under a list item, split it as well. (#1647) if ( nextBlock ) { node = nextBlock.getParent(); if ( node.is( 'li' ) ) { nextBlock.breakParent( node ); nextBlock.move( nextBlock.getNext(), 1 ); } } else if ( previousBlock && ( node = previousBlock.getParent() ) && node.is( 'li' ) ) { previousBlock.breakParent( node ); node = previousBlock.getNext(); range.moveToElementEditStart( node ); previousBlock.move( previousBlock.getPrevious() ); } // If we have both the previous and next blocks, it means that the // boundaries were on separated blocks, or none of them where on the // block limits (start/end). if ( !isStartOfBlock && !isEndOfBlock ) { // If the next block is an <li> with another list tree as the first // child, we'll need to append a filler (<br>/NBSP) or the list item // wouldn't be editable. (#1420) if ( nextBlock.is( 'li' ) && ( node = nextBlock.getFirst( CKEDITOR.dom.walker.invisible( true ) ) ) && node.is && node.is( 'ul', 'ol' ) ) ( CKEDITOR.env.ie ? doc.createText( '\xa0' ) : doc.createElement( 'br' ) ).insertBefore( node ); // Move the selection to the end block. if ( nextBlock ) range.moveToElementEditStart( nextBlock ); } else { var newBlock, newBlockDir; if ( previousBlock ) { // Do not enter this block if it's a header tag, or we are in // a Shift+Enter (#77). Create a new block element instead // (later in the code). if ( previousBlock.is( 'li' ) || ! ( headerTagRegex.test( previousBlock.getName() ) || previousBlock.is( 'pre' ) ) ) { // Otherwise, duplicate the previous block. newBlock = previousBlock.clone(); } } else if ( nextBlock ) newBlock = nextBlock.clone(); if ( !newBlock ) { // We have already created a new list item. (#6849) if ( node && node.is( 'li' ) ) newBlock = node; else { newBlock = doc.createElement( blockTag ); if ( previousBlock && ( newBlockDir = previousBlock.getDirection() ) ) newBlock.setAttribute( 'dir', newBlockDir ); } } // Force the enter block unless we're talking of a list item. else if ( forceMode && !newBlock.is( 'li' ) ) newBlock.renameNode( blockTag ); // Recreate the inline elements tree, which was available // before hitting enter, so the same styles will be available in // the new block. var elementPath = splitInfo.elementPath; if ( elementPath ) { for ( var i = 0, len = elementPath.elements.length ; i < len ; i++ ) { var element = elementPath.elements[ i ]; if ( element.equals( elementPath.block ) || element.equals( elementPath.blockLimit ) ) break; if ( CKEDITOR.dtd.$removeEmpty[ element.getName() ] ) { element = element.clone(); newBlock.moveChildren( element ); newBlock.append( element ); } } } if ( !CKEDITOR.env.ie ) newBlock.appendBogus(); if ( !newBlock.getParent() ) range.insertNode( newBlock ); // list item start number should not be duplicated (#7330), but we need // to remove the attribute after it's onto the DOM tree because of old IEs (#7581). newBlock.is( 'li' ) && newBlock.removeAttribute( 'value' ); // This is tricky, but to make the new block visible correctly // we must select it. // The previousBlock check has been included because it may be // empty if we have fixed a block-less space (like ENTER into an // empty table cell). if ( CKEDITOR.env.ie && isStartOfBlock && ( !isEndOfBlock || !previousBlock.getChildCount() ) ) { // Move the selection to the new block. range.moveToElementEditStart( isEndOfBlock ? previousBlock : newBlock ); range.select(); } // Move the selection to the new block. range.moveToElementEditStart( isStartOfBlock && !isEndOfBlock ? nextBlock : newBlock ); } if ( !CKEDITOR.env.ie ) { if ( nextBlock ) { // If we have split the block, adds a temporary span at the // range position and scroll relatively to it. var tmpNode = doc.createElement( 'span' ); // We need some content for Safari. tmpNode.setHtml( '&nbsp;' ); range.insertNode( tmpNode ); tmpNode.scrollIntoView(); range.deleteContents(); } else { // We may use the above scroll logic for the new block case // too, but it gives some weird result with Opera. newBlock.scrollIntoView(); } } range.select(); }, enterBr : function( editor, mode, range, forceMode ) { // Get the range for the current selection. range = range || getRange( editor ); // We may not have valid ranges to work on, like when inside a // contenteditable=false element. if ( !range ) return; var doc = range.document; // Determine the block element to be used. var blockTag = ( mode == CKEDITOR.ENTER_DIV ? 'div' : 'p' ); var isEndOfBlock = range.checkEndOfBlock(); var elementPath = new CKEDITOR.dom.elementPath( editor.getSelection().getStartElement() ); var startBlock = elementPath.block, startBlockTag = startBlock && elementPath.block.getName(); var isPre = false; if ( !forceMode && startBlockTag == 'li' ) { enterBlock( editor, mode, range, forceMode ); return; } // If we are at the end of a header block. if ( !forceMode && isEndOfBlock && headerTagRegex.test( startBlockTag ) ) { var newBlock, newBlockDir; if ( ( newBlockDir = startBlock.getDirection() ) ) { newBlock = doc.createElement( 'div' ); newBlock.setAttribute( 'dir', newBlockDir ); newBlock.insertAfter( startBlock ); range.setStart( newBlock, 0 ); } else { // Insert a <br> after the current paragraph. doc.createElement( 'br' ).insertAfter( startBlock ); // A text node is required by Gecko only to make the cursor blink. if ( CKEDITOR.env.gecko ) doc.createText( '' ).insertAfter( startBlock ); // IE has different behaviors regarding position. range.setStartAt( startBlock.getNext(), CKEDITOR.env.ie ? CKEDITOR.POSITION_BEFORE_START : CKEDITOR.POSITION_AFTER_START ); } } else { var lineBreak; isPre = ( startBlockTag == 'pre' ); // Gecko prefers <br> as line-break inside <pre> (#4711). if ( isPre && !CKEDITOR.env.gecko ) lineBreak = doc.createText( CKEDITOR.env.ie ? '\r' : '\n' ); else lineBreak = doc.createElement( 'br' ); range.deleteContents(); range.insertNode( lineBreak ); // IE has different behavior regarding position. if ( CKEDITOR.env.ie ) range.setStartAt( lineBreak, CKEDITOR.POSITION_AFTER_END ); else { // A text node is required by Gecko only to make the cursor blink. // We need some text inside of it, so the bogus <br> is properly // created. doc.createText( '\ufeff' ).insertAfter( lineBreak ); // If we are at the end of a block, we must be sure the bogus node is available in that block. if ( isEndOfBlock ) lineBreak.getParent().appendBogus(); // Now we can remove the text node contents, so the caret doesn't // stop on it. lineBreak.getNext().$.nodeValue = ''; range.setStartAt( lineBreak.getNext(), CKEDITOR.POSITION_AFTER_START ); // Scroll into view, for non IE. var dummy = null; // BR is not positioned in Opera and Webkit. if ( !CKEDITOR.env.gecko ) { dummy = doc.createElement( 'span' ); // We need have some contents for Webkit to position it // under parent node. ( #3681) dummy.setHtml('&nbsp;'); } else dummy = doc.createElement( 'br' ); dummy.insertBefore( lineBreak.getNext() ); dummy.scrollIntoView(); dummy.remove(); } } // This collapse guarantees the cursor will be blinking. range.collapse( true ); range.select( isPre ); } }; var plugin = CKEDITOR.plugins.enterkey, enterBr = plugin.enterBr, enterBlock = plugin.enterBlock, headerTagRegex = /^h[1-6]$/; function shiftEnter( editor ) { // Only effective within document. if ( editor.mode != 'wysiwyg' ) return false; // On SHIFT+ENTER: // 1. We want to enforce the mode to be respected, instead // of cloning the current block. (#77) return enter( editor, editor.config.shiftEnterMode, 1 ); } function enter( editor, mode, forceMode ) { forceMode = editor.config.forceEnterMode || forceMode; // Only effective within document. if ( editor.mode != 'wysiwyg' ) return false; if ( !mode ) mode = editor.config.enterMode; // Use setTimout so the keys get cancelled immediatelly. setTimeout( function() { editor.fire( 'saveSnapshot' ); // Save undo step. if ( mode == CKEDITOR.ENTER_BR ) enterBr( editor, mode, null, forceMode ); else enterBlock( editor, mode, null, forceMode ); editor.fire( 'saveSnapshot' ); }, 0 ); return true; } function getRange( editor ) { // Get the selection ranges. var ranges = editor.getSelection().getRanges( true ); // Delete the contents of all ranges except the first one. for ( var i = ranges.length - 1 ; i > 0 ; i-- ) { ranges[ i ].deleteContents(); } // Return the first range. return ranges[ 0 ]; } })();
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/enterkey/plugin.js
JavaScript
gpl3
12,826
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @file Insert and remove numbered and bulleted lists. */ (function() { var listNodeNames = { ol : 1, ul : 1 }, emptyTextRegex = /^[\n\r\t ]*$/; var whitespaces = CKEDITOR.dom.walker.whitespaces(), bookmarks = CKEDITOR.dom.walker.bookmark(), nonEmpty = function( node ){ return !( whitespaces( node ) || bookmarks( node ) );}, blockBogus = CKEDITOR.dom.walker.bogus(); function cleanUpDirection( element ) { var dir, parent, parentDir; if ( ( dir = element.getDirection() ) ) { parent = element.getParent(); while ( parent && !( parentDir = parent.getDirection() ) ) parent = parent.getParent(); if ( dir == parentDir ) element.removeAttribute( 'dir' ); } } CKEDITOR.plugins.list = { /* * Convert a DOM list tree into a data structure that is easier to * manipulate. This operation should be non-intrusive in the sense that it * does not change the DOM tree, with the exception that it may add some * markers to the list item nodes when database is specified. */ listToArray : function( listNode, database, baseArray, baseIndentLevel, grandparentNode ) { if ( !listNodeNames[ listNode.getName() ] ) return []; if ( !baseIndentLevel ) baseIndentLevel = 0; if ( !baseArray ) baseArray = []; // Iterate over all list items to and look for inner lists. for ( var i = 0, count = listNode.getChildCount() ; i < count ; i++ ) { var listItem = listNode.getChild( i ); // Fixing malformed nested lists by moving it into a previous list item. (#6236) if( listItem.type == CKEDITOR.NODE_ELEMENT && listItem.getName() in CKEDITOR.dtd.$list ) CKEDITOR.plugins.list.listToArray( listItem, database, baseArray, baseIndentLevel + 1 ); // It may be a text node or some funny stuff. if ( listItem.$.nodeName.toLowerCase() != 'li' ) continue; var itemObj = { 'parent' : listNode, indent : baseIndentLevel, element : listItem, contents : [] }; if ( !grandparentNode ) { itemObj.grandparent = listNode.getParent(); if ( itemObj.grandparent && itemObj.grandparent.$.nodeName.toLowerCase() == 'li' ) itemObj.grandparent = itemObj.grandparent.getParent(); } else itemObj.grandparent = grandparentNode; if ( database ) CKEDITOR.dom.element.setMarker( database, listItem, 'listarray_index', baseArray.length ); baseArray.push( itemObj ); for ( var j = 0, itemChildCount = listItem.getChildCount(), child; j < itemChildCount ; j++ ) { child = listItem.getChild( j ); if ( child.type == CKEDITOR.NODE_ELEMENT && listNodeNames[ child.getName() ] ) // Note the recursion here, it pushes inner list items with // +1 indentation in the correct order. CKEDITOR.plugins.list.listToArray( child, database, baseArray, baseIndentLevel + 1, itemObj.grandparent ); else itemObj.contents.push( child ); } } return baseArray; }, // Convert our internal representation of a list back to a DOM forest. arrayToList : function( listArray, database, baseIndex, paragraphMode, dir ) { if ( !baseIndex ) baseIndex = 0; if ( !listArray || listArray.length < baseIndex + 1 ) return null; var i, doc = listArray[ baseIndex ].parent.getDocument(), retval = new CKEDITOR.dom.documentFragment( doc ), rootNode = null, currentIndex = baseIndex, indentLevel = Math.max( listArray[ baseIndex ].indent, 0 ), currentListItem = null, orgDir, block, paragraphName = ( paragraphMode == CKEDITOR.ENTER_P ? 'p' : 'div' ); while ( 1 ) { var item = listArray[ currentIndex ]; orgDir = item.element.getDirection( 1 ); if ( item.indent == indentLevel ) { if ( !rootNode || listArray[ currentIndex ].parent.getName() != rootNode.getName() ) { rootNode = listArray[ currentIndex ].parent.clone( false, 1 ); dir && rootNode.setAttribute( 'dir', dir ); retval.append( rootNode ); } currentListItem = rootNode.append( item.element.clone( 0, 1 ) ); if ( orgDir != rootNode.getDirection( 1 ) ) currentListItem.setAttribute( 'dir', orgDir ); for ( i = 0 ; i < item.contents.length ; i++ ) currentListItem.append( item.contents[i].clone( 1, 1 ) ); currentIndex++; } else if ( item.indent == Math.max( indentLevel, 0 ) + 1 ) { // Maintain original direction (#6861). var currDir = listArray[ currentIndex - 1 ].element.getDirection( 1 ), listData = CKEDITOR.plugins.list.arrayToList( listArray, null, currentIndex, paragraphMode, currDir != orgDir ? orgDir: null ); // If the next block is an <li> with another list tree as the first // child, we'll need to append a filler (<br>/NBSP) or the list item // wouldn't be editable. (#6724) if ( !currentListItem.getChildCount() && CKEDITOR.env.ie && !( doc.$.documentMode > 7 )) currentListItem.append( doc.createText( '\xa0' ) ); currentListItem.append( listData.listNode ); currentIndex = listData.nextIndex; } else if ( item.indent == -1 && !baseIndex && item.grandparent ) { if ( listNodeNames[ item.grandparent.getName() ] ) currentListItem = item.element.clone( false, true ); else currentListItem = new CKEDITOR.dom.documentFragment( doc ); // Migrate all children to the new container, // apply the proper text direction. var dirLoose = item.grandparent.getDirection( 1 ) != orgDir, needsBlock = currentListItem.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT && paragraphMode != CKEDITOR.ENTER_BR, li = item.element, className = li.getAttribute( 'class' ), style = li.getAttribute( 'style' ); var child, count = item.contents.length; for ( i = 0 ; i < count; i++ ) { child = item.contents[ i ]; if ( child.type == CKEDITOR.NODE_ELEMENT && child.isBlockBoundary() ) { // Apply direction on content blocks. if ( dirLoose && !child.getDirection() ) child.setAttribute( 'dir', orgDir ); // Merge into child styles. style && child.setAttribute( 'style', style.replace( /([^;])$/, '$1;') + ( child.getAttribute( 'style' ) || '' ) ); className && child.addClass( className ); } else if ( dirLoose || needsBlock || style || className ) { // Establish new block to hold text direction and styles. if ( !block ) { block = doc.createElement( paragraphName ); dirLoose && block.setAttribute( 'dir', orgDir ); } // Copy over styles to new block; style && block.setAttribute( 'style', style ); className && block.setAttribute( 'class', className ); block.append( child.clone( 1, 1 ) ); } currentListItem.append( block || child.clone( 1, 1 ) ); } if ( currentListItem.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT && currentIndex != listArray.length - 1 ) { var last = currentListItem.getLast(); if ( last && last.type == CKEDITOR.NODE_ELEMENT && last.getAttribute( 'type' ) == '_moz' ) { last.remove(); } if ( !( last = currentListItem.getLast( nonEmpty ) && last.type == CKEDITOR.NODE_ELEMENT && last.getName() in CKEDITOR.dtd.$block ) ) { currentListItem.append( doc.createElement( 'br' ) ); } } var currentListItemName = currentListItem.$.nodeName.toLowerCase(); if ( !CKEDITOR.env.ie && ( currentListItemName == 'div' || currentListItemName == 'p' ) ) currentListItem.appendBogus(); retval.append( currentListItem ); rootNode = null; currentIndex++; } else return null; block = null; if ( listArray.length <= currentIndex || Math.max( listArray[ currentIndex ].indent, 0 ) < indentLevel ) break; } if ( database ) { var currentNode = retval.getFirst(), listRoot = listArray[ 0 ].parent; while ( currentNode ) { if ( currentNode.type == CKEDITOR.NODE_ELEMENT ) { // Clear marker attributes for the new list tree made of cloned nodes, if any. CKEDITOR.dom.element.clearMarkers( database, currentNode ); // Clear redundant direction attribute specified on list items. if ( currentNode.getName() in CKEDITOR.dtd.$listItem ) cleanUpDirection( currentNode ); } currentNode = currentNode.getNextSourceNode(); } } return { listNode : retval, nextIndex : currentIndex }; } }; function onSelectionChange( evt ) { if ( evt.editor.readOnly ) return null; var path = evt.data.path, blockLimit = path.blockLimit, elements = path.elements, element, i; // Grouping should only happen under blockLimit.(#3940). for ( i = 0 ; i < elements.length && ( element = elements[ i ] ) && !element.equals( blockLimit ); i++ ) { if ( listNodeNames[ elements[ i ].getName() ] ) return this.setState( this.type == elements[ i ].getName() ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF ); } return this.setState( CKEDITOR.TRISTATE_OFF ); } function changeListType( editor, groupObj, database, listsCreated ) { // This case is easy... // 1. Convert the whole list into a one-dimensional array. // 2. Change the list type by modifying the array. // 3. Recreate the whole list by converting the array to a list. // 4. Replace the original list with the recreated list. var listArray = CKEDITOR.plugins.list.listToArray( groupObj.root, database ), selectedListItems = []; for ( var i = 0 ; i < groupObj.contents.length ; i++ ) { var itemNode = groupObj.contents[i]; itemNode = itemNode.getAscendant( 'li', true ); if ( !itemNode || itemNode.getCustomData( 'list_item_processed' ) ) continue; selectedListItems.push( itemNode ); CKEDITOR.dom.element.setMarker( database, itemNode, 'list_item_processed', true ); } var root = groupObj.root, fakeParent = root.getDocument().createElement( this.type ); // Copy all attributes, except from 'start' and 'type'. root.copyAttributes( fakeParent, { start : 1, type : 1 } ); // The list-style-type property should be ignored. fakeParent.removeStyle( 'list-style-type' ); for ( i = 0 ; i < selectedListItems.length ; i++ ) { var listIndex = selectedListItems[i].getCustomData( 'listarray_index' ); listArray[listIndex].parent = fakeParent; } var newList = CKEDITOR.plugins.list.arrayToList( listArray, database, null, editor.config.enterMode ); var child, length = newList.listNode.getChildCount(); for ( i = 0 ; i < length && ( child = newList.listNode.getChild( i ) ) ; i++ ) { if ( child.getName() == this.type ) listsCreated.push( child ); } newList.listNode.replace( groupObj.root ); } var headerTagRegex = /^h[1-6]$/; function createList( editor, groupObj, listsCreated ) { var contents = groupObj.contents, doc = groupObj.root.getDocument(), listContents = []; // It is possible to have the contents returned by DomRangeIterator to be the same as the root. // e.g. when we're running into table cells. // In such a case, enclose the childNodes of contents[0] into a <div>. if ( contents.length == 1 && contents[0].equals( groupObj.root ) ) { var divBlock = doc.createElement( 'div' ); contents[0].moveChildren && contents[0].moveChildren( divBlock ); contents[0].append( divBlock ); contents[0] = divBlock; } // Calculate the common parent node of all content blocks. var commonParent = groupObj.contents[0].getParent(); for ( var i = 0 ; i < contents.length ; i++ ) commonParent = commonParent.getCommonAncestor( contents[i].getParent() ); var useComputedState = editor.config.useComputedState, listDir, explicitDirection; useComputedState = useComputedState === undefined || useComputedState; // We want to insert things that are in the same tree level only, so calculate the contents again // by expanding the selected blocks to the same tree level. for ( i = 0 ; i < contents.length ; i++ ) { var contentNode = contents[i], parentNode; while ( ( parentNode = contentNode.getParent() ) ) { if ( parentNode.equals( commonParent ) ) { listContents.push( contentNode ); // Determine the lists's direction. if ( !explicitDirection && contentNode.getDirection() ) explicitDirection = 1; var itemDir = contentNode.getDirection( useComputedState ); if ( listDir !== null ) { // If at least one LI have a different direction than current listDir, we can't have listDir. if ( listDir && listDir != itemDir ) listDir = null; else listDir = itemDir; } break; } contentNode = parentNode; } } if ( listContents.length < 1 ) return; // Insert the list to the DOM tree. var insertAnchor = listContents[ listContents.length - 1 ].getNext(), listNode = doc.createElement( this.type ); listsCreated.push( listNode ); var contentBlock, listItem; while ( listContents.length ) { contentBlock = listContents.shift(); listItem = doc.createElement( 'li' ); // Preserve preformat block and heading structure when converting to list item. (#5335) (#5271) if ( contentBlock.is( 'pre' ) || headerTagRegex.test( contentBlock.getName() ) ) contentBlock.appendTo( listItem ); else { contentBlock.copyAttributes( listItem ); // Remove direction attribute after it was merged into list root. (#7657) if ( listDir && contentBlock.getDirection() ) { listItem.removeStyle( 'direction' ); listItem.removeAttribute( 'dir' ); } contentBlock.moveChildren( listItem ); contentBlock.remove(); } listItem.appendTo( listNode ); } // Apply list root dir only if it has been explicitly declared. if ( listDir && explicitDirection ) listNode.setAttribute( 'dir', listDir ); if ( insertAnchor ) listNode.insertBefore( insertAnchor ); else listNode.appendTo( commonParent ); } function removeList( editor, groupObj, database ) { // This is very much like the change list type operation. // Except that we're changing the selected items' indent to -1 in the list array. var listArray = CKEDITOR.plugins.list.listToArray( groupObj.root, database ), selectedListItems = []; for ( var i = 0 ; i < groupObj.contents.length ; i++ ) { var itemNode = groupObj.contents[i]; itemNode = itemNode.getAscendant( 'li', true ); if ( !itemNode || itemNode.getCustomData( 'list_item_processed' ) ) continue; selectedListItems.push( itemNode ); CKEDITOR.dom.element.setMarker( database, itemNode, 'list_item_processed', true ); } var lastListIndex = null; for ( i = 0 ; i < selectedListItems.length ; i++ ) { var listIndex = selectedListItems[i].getCustomData( 'listarray_index' ); listArray[listIndex].indent = -1; lastListIndex = listIndex; } // After cutting parts of the list out with indent=-1, we still have to maintain the array list // model's nextItem.indent <= currentItem.indent + 1 invariant. Otherwise the array model of the // list cannot be converted back to a real DOM list. for ( i = lastListIndex + 1 ; i < listArray.length ; i++ ) { if ( listArray[i].indent > listArray[i-1].indent + 1 ) { var indentOffset = listArray[i-1].indent + 1 - listArray[i].indent; var oldIndent = listArray[i].indent; while ( listArray[i] && listArray[i].indent >= oldIndent ) { listArray[i].indent += indentOffset; i++; } i--; } } var newList = CKEDITOR.plugins.list.arrayToList( listArray, database, null, editor.config.enterMode, groupObj.root.getAttribute( 'dir' ) ); // Compensate <br> before/after the list node if the surrounds are non-blocks.(#3836) var docFragment = newList.listNode, boundaryNode, siblingNode; function compensateBrs( isStart ) { if ( ( boundaryNode = docFragment[ isStart ? 'getFirst' : 'getLast' ]() ) && !( boundaryNode.is && boundaryNode.isBlockBoundary() ) && ( siblingNode = groupObj.root[ isStart ? 'getPrevious' : 'getNext' ] ( CKEDITOR.dom.walker.whitespaces( true ) ) ) && !( siblingNode.is && siblingNode.isBlockBoundary( { br : 1 } ) ) ) editor.document.createElement( 'br' )[ isStart ? 'insertBefore' : 'insertAfter' ]( boundaryNode ); } compensateBrs( true ); compensateBrs(); docFragment.replace( groupObj.root ); } function listCommand( name, type ) { this.name = name; this.type = type; } var elementType = CKEDITOR.dom.walker.nodeType( CKEDITOR.NODE_ELEMENT ); // Merge list items with direction preserved. (#7448) function mergeListItems( from, into, refNode, toHead ) { var child, itemDir; while ( ( child = from.getFirst( elementType ) ) ) { if ( ( itemDir = child.getDirection( 1 ) ) !== into.getDirection( 1 ) ) child.setAttribute( 'dir', itemDir ); child.remove(); refNode ? child[ toHead ? 'insertBefore' : 'insertAfter' ]( refNode ) : into.append( child, toHead ); } } listCommand.prototype = { exec : function( editor ) { var doc = editor.document, config = editor.config, selection = editor.getSelection(), ranges = selection && selection.getRanges( true ); // There should be at least one selected range. if ( !ranges || ranges.length < 1 ) return; // Midas lists rule #1 says we can create a list even in an empty document. // But DOM iterator wouldn't run if the document is really empty. // So create a paragraph if the document is empty and we're going to create a list. if ( this.state == CKEDITOR.TRISTATE_OFF ) { var body = doc.getBody(); if ( !body.getFirst( nonEmpty ) ) { config.enterMode == CKEDITOR.ENTER_BR ? body.appendBogus() : ranges[ 0 ].fixBlock( 1, config.enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ); selection.selectRanges( ranges ); } // Maybe a single range there enclosing the whole list, // turn on the list state manually(#4129). else { var range = ranges.length == 1 && ranges[ 0 ], enclosedNode = range && range.getEnclosedNode(); if ( enclosedNode && enclosedNode.is && this.type == enclosedNode.getName() ) this.setState( CKEDITOR.TRISTATE_ON ); } } var bookmarks = selection.createBookmarks( true ); // Group the blocks up because there are many cases where multiple lists have to be created, // or multiple lists have to be cancelled. var listGroups = [], database = {}, rangeIterator = ranges.createIterator(), index = 0; while ( ( range = rangeIterator.getNextRange() ) && ++index ) { var boundaryNodes = range.getBoundaryNodes(), startNode = boundaryNodes.startNode, endNode = boundaryNodes.endNode; if ( startNode.type == CKEDITOR.NODE_ELEMENT && startNode.getName() == 'td' ) range.setStartAt( boundaryNodes.startNode, CKEDITOR.POSITION_AFTER_START ); if ( endNode.type == CKEDITOR.NODE_ELEMENT && endNode.getName() == 'td' ) range.setEndAt( boundaryNodes.endNode, CKEDITOR.POSITION_BEFORE_END ); var iterator = range.createIterator(), block; iterator.forceBrBreak = ( this.state == CKEDITOR.TRISTATE_OFF ); while ( ( block = iterator.getNextParagraph() ) ) { // Avoid duplicate blocks get processed across ranges. if( block.getCustomData( 'list_block' ) ) continue; else CKEDITOR.dom.element.setMarker( database, block, 'list_block', 1 ); var path = new CKEDITOR.dom.elementPath( block ), pathElements = path.elements, pathElementsCount = pathElements.length, listNode = null, processedFlag = 0, blockLimit = path.blockLimit, element; // First, try to group by a list ancestor. for ( var i = pathElementsCount - 1; i >= 0 && ( element = pathElements[ i ] ); i-- ) { if ( listNodeNames[ element.getName() ] && blockLimit.contains( element ) ) // Don't leak outside block limit (#3940). { // If we've encountered a list inside a block limit // The last group object of the block limit element should // no longer be valid. Since paragraphs after the list // should belong to a different group of paragraphs before // the list. (Bug #1309) blockLimit.removeCustomData( 'list_group_object_' + index ); var groupObj = element.getCustomData( 'list_group_object' ); if ( groupObj ) groupObj.contents.push( block ); else { groupObj = { root : element, contents : [ block ] }; listGroups.push( groupObj ); CKEDITOR.dom.element.setMarker( database, element, 'list_group_object', groupObj ); } processedFlag = 1; break; } } if ( processedFlag ) continue; // No list ancestor? Group by block limit, but don't mix contents from different ranges. var root = blockLimit; if ( root.getCustomData( 'list_group_object_' + index ) ) root.getCustomData( 'list_group_object_' + index ).contents.push( block ); else { groupObj = { root : root, contents : [ block ] }; CKEDITOR.dom.element.setMarker( database, root, 'list_group_object_' + index, groupObj ); listGroups.push( groupObj ); } } } // Now we have two kinds of list groups, groups rooted at a list, and groups rooted at a block limit element. // We either have to build lists or remove lists, for removing a list does not makes sense when we are looking // at the group that's not rooted at lists. So we have three cases to handle. var listsCreated = []; while ( listGroups.length > 0 ) { groupObj = listGroups.shift(); if ( this.state == CKEDITOR.TRISTATE_OFF ) { if ( listNodeNames[ groupObj.root.getName() ] ) changeListType.call( this, editor, groupObj, database, listsCreated ); else createList.call( this, editor, groupObj, listsCreated ); } else if ( this.state == CKEDITOR.TRISTATE_ON && listNodeNames[ groupObj.root.getName() ] ) removeList.call( this, editor, groupObj, database ); } // For all new lists created, merge into adjacent, same type lists. for ( i = 0 ; i < listsCreated.length ; i++ ) { listNode = listsCreated[i]; var mergeSibling, listCommand = this; ( mergeSibling = function( rtl ) { var sibling = listNode[ rtl ? 'getPrevious' : 'getNext' ]( CKEDITOR.dom.walker.whitespaces( true ) ); if ( sibling && sibling.getName && sibling.getName() == listCommand.type ) { // Move children order by merge direction.(#3820) mergeListItems( listNode, sibling, null, !rtl ); listNode.remove(); listNode = sibling; } } )(); mergeSibling( 1 ); } // Clean up, restore selection and update toolbar button states. CKEDITOR.dom.element.clearAllMarkers( database ); selection.selectBookmarks( bookmarks ); editor.focus(); } }; var dtd = CKEDITOR.dtd; var tailNbspRegex = /[\t\r\n ]*(?:&nbsp;|\xa0)$/; function indexOfFirstChildElement( element, tagNameList ) { var child, children = element.children, length = children.length; for ( var i = 0 ; i < length ; i++ ) { child = children[ i ]; if ( child.name && ( child.name in tagNameList ) ) return i; } return length; } function getExtendNestedListFilter( isHtmlFilter ) { // An element filter function that corrects nested list start in an empty // list item for better displaying/outputting. (#3165) return function( listItem ) { var children = listItem.children, firstNestedListIndex = indexOfFirstChildElement( listItem, dtd.$list ), firstNestedList = children[ firstNestedListIndex ], nodeBefore = firstNestedList && firstNestedList.previous, tailNbspmatch; if ( nodeBefore && ( nodeBefore.name && nodeBefore.name == 'br' || nodeBefore.value && ( tailNbspmatch = nodeBefore.value.match( tailNbspRegex ) ) ) ) { var fillerNode = nodeBefore; // Always use 'nbsp' as filler node if we found a nested list appear // in front of a list item. if ( !( tailNbspmatch && tailNbspmatch.index ) && fillerNode == children[ 0 ] ) children[ 0 ] = ( isHtmlFilter || CKEDITOR.env.ie ) ? new CKEDITOR.htmlParser.text( '\xa0' ) : new CKEDITOR.htmlParser.element( 'br', {} ); // Otherwise the filler is not needed anymore. else if ( fillerNode.name == 'br' ) children.splice( firstNestedListIndex - 1, 1 ); else fillerNode.value = fillerNode.value.replace( tailNbspRegex, '' ); } }; } var defaultListDataFilterRules = { elements : {} }; for ( var i in dtd.$listItem ) defaultListDataFilterRules.elements[ i ] = getExtendNestedListFilter(); var defaultListHtmlFilterRules = { elements : {} }; for ( i in dtd.$listItem ) defaultListHtmlFilterRules.elements[ i ] = getExtendNestedListFilter( true ); // Check if node is block element that recieves text. function isTextBlock( node ) { return node.type == CKEDITOR.NODE_ELEMENT && ( node.getName() in CKEDITOR.dtd.$block || node.getName() in CKEDITOR.dtd.$listItem ) && CKEDITOR.dtd[ node.getName() ][ '#' ]; } // Merge the visual line content at the cursor range into the block. function joinNextLineToCursor( editor, cursor, nextCursor ) { editor.fire( 'saveSnapshot' ); // Merge with previous block's content. nextCursor.enlarge( CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ); var frag = nextCursor.extractContents(); cursor.trim( false, true ); // Kill original bogus; var currentPath = new CKEDITOR.dom.elementPath( cursor.startContainer ); var currentLi = currentPath.lastElement.getAscendant( 'li', 1 ); var bogus = currentPath.block.getBogus(); bogus && bogus.remove(); // Kill the tail br in extracted. var last = frag.getLast(); if ( last && last.type == CKEDITOR.NODE_ELEMENT && last.is( 'br' ) ) last.remove(); // Insert fragment at the range position. var nextNode = cursor.startContainer.getChild( cursor.startOffset ); if ( nextNode ) frag.insertBefore( nextNode ); else cursor.startContainer.append( frag ); var nextPath = new CKEDITOR.dom.elementPath( nextCursor.startContainer ); var nextLi = nextCursor.startContainer.getAscendant( 'li', 1 ); // Move the sub list nested in the next list item. if ( nextLi ) { var sublist = getSubList( nextLi ); if ( sublist ) { // If next line is in the sub list of the current list item. if ( currentLi.contains( nextLi ) ) { mergeListItems( sublist, nextLi.getParent(), nextLi ); sublist.remove(); } // Migrate the sub list to current list item. else currentLi.append( sublist ); } } if ( nextCursor.checkStartOfBlock() && nextCursor.checkEndOfBlock() ) { var nextBlock = nextPath.block, parentBlock = nextBlock.getParent(); nextBlock.remove(); // Remove if the path block container is now empty, e.g. li. if ( parentBlock && !parentBlock.getFirst( nonEmpty ) && !parentBlock.equals( nextPath.blockLimit ) ) { parentBlock.remove(); } } // Make fresh selection. cursor.select(); editor.fire( 'saveSnapshot' ); } function getSubList( li ) { var last = li.getLast( nonEmpty ); return last && last.type == CKEDITOR.NODE_ELEMENT && last.getName() in listNodeNames ? last : null; } CKEDITOR.plugins.add( 'list', { init : function( editor ) { // Register commands. var numberedListCommand = editor.addCommand( 'numberedlist', new listCommand( 'numberedlist', 'ol' ) ), bulletedListCommand = editor.addCommand( 'bulletedlist', new listCommand( 'bulletedlist', 'ul' ) ); // Register the toolbar button. editor.ui.addButton( 'NumberedList', { label : editor.lang.numberedlist, command : 'numberedlist' } ); editor.ui.addButton( 'BulletedList', { label : editor.lang.bulletedlist, command : 'bulletedlist' } ); // Register the state changing handlers. editor.on( 'selectionChange', CKEDITOR.tools.bind( onSelectionChange, numberedListCommand ) ); editor.on( 'selectionChange', CKEDITOR.tools.bind( onSelectionChange, bulletedListCommand ) ); // [IE8] Fix "backspace" after list and "del" at the end of list item. (#8248) if ( CKEDITOR.env.ie8Compat ) { editor.on( 'key', function( evt ) { var key = evt.data.keyCode; // DEl/BACKSPACE if ( editor.mode == 'wysiwyg' && key in { 8 : 1, 46 : 1 } ) { var sel = editor.getSelection(), range = sel.getRanges()[ 0 ]; if ( !range.collapsed ) return; var isBackspace = key == 8; var body = editor.document.getBody(); var walker = new CKEDITOR.dom.walker( range.clone() ); walker.evaluator = function( node ) { return nonEmpty( node ) && !blockBogus( node ); }; var cursor = range.clone(); if ( isBackspace ) { walker.range.setStartAt( body, CKEDITOR.POSITION_AFTER_START ); walker.range.setEnd( range.startContainer, range.startOffset ); var previous = walker.previous(); // Check if cursor collapsed right behind of a list. if ( previous && previous.type == CKEDITOR.NODE_ELEMENT && previous.getName() in listNodeNames ) { walker.range.selectNodeContents( previous ); walker.reset(); walker.evaluator = isTextBlock; // Place cursor at the end of previous block. cursor.moveToElementEditEnd( walker.lastForward() ); joinNextLineToCursor( editor, cursor, range ); evt.cancel(); } } else { var li = range.startContainer.getAscendant( 'li', 1 ); if ( li ) { walker.range.setEndAt( body, CKEDITOR.POSITION_BEFORE_END ); var last = li.getLast( nonEmpty ); var block = last && isTextBlock( last ) ? last : li; // Indicate cursor at the visual end of an list item. var isAtEnd = 0; var next = walker.next(); // When list item contains a sub list. if ( next && next.type == CKEDITOR.NODE_ELEMENT && next.getName() in listNodeNames && next.equals( last ) ) { isAtEnd = 1; // Move to the first item in sub list. next = walker.next(); } // Right at the end of list item. else if ( range.checkBoundaryOfElement( block, CKEDITOR.END ) ) isAtEnd = 1; if ( isAtEnd && next ) { // Put cursor range there. var nextLine = range.clone(); nextLine.moveToElementEditStart( next ); joinNextLineToCursor( editor, cursor, nextLine ); evt.cancel(); } } } } } ); } }, afterInit : function ( editor ) { var dataProcessor = editor.dataProcessor; if ( dataProcessor ) { dataProcessor.dataFilter.addRules( defaultListDataFilterRules ); dataProcessor.htmlFilter.addRules( defaultListHtmlFilterRules ); } }, requires : [ 'domiterator' ] } ); })();
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/list/plugin.js
JavaScript
gpl3
32,352
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @file AutoGrow plugin */ (function(){ // Actual content height, figured out by appending check the last element's document position. function contentHeight( scrollable ) { var overflowY = scrollable.getStyle( 'overflow-y' ); var doc = scrollable.getDocument(); // Create a temporary marker element. var marker = CKEDITOR.dom.element.createFromHtml( '<span style="margin:0;padding:0;border:0;clear:both;width:1px;height:1px;display:block;">' + ( CKEDITOR.env.webkit ? '&nbsp;' : '' ) + '</span>', doc ); doc[ CKEDITOR.env.ie? 'getBody' : 'getDocumentElement']().append( marker ); var height = marker.getDocumentPosition( doc ).y + marker.$.offsetHeight; marker.remove(); scrollable.setStyle( 'overflow-y', overflowY ); return height; } var resizeEditor = function( editor ) { if ( !editor.window ) return; var doc = editor.document, iframe = new CKEDITOR.dom.element( doc.getWindow().$.frameElement ), body = doc.getBody(), htmlElement = doc.getDocumentElement(), currentHeight = editor.window.getViewPaneSize().height, // Quirks mode overflows body, standards overflows document element scrollable = doc.$.compatMode == 'BackCompat' ? body : htmlElement, newHeight = contentHeight( scrollable ); // Additional space specified by user. newHeight += ( editor.config.autoGrow_bottomSpace || 0 ); var min = editor.config.autoGrow_minHeight != undefined ? editor.config.autoGrow_minHeight : 200, max = editor.config.autoGrow_maxHeight || Infinity; newHeight = Math.max( newHeight, min ); newHeight = Math.min( newHeight, max ); if ( newHeight != currentHeight ) { newHeight = editor.fire( 'autoGrow', { currentHeight : currentHeight, newHeight : newHeight } ).newHeight; editor.resize( editor.container.getStyle( 'width' ), newHeight, true ); } if ( scrollable.$.scrollHeight > scrollable.$.clientHeight && newHeight < max ) scrollable.setStyle( 'overflow-y', 'hidden' ); else scrollable.removeStyle( 'overflow-y' ); }; CKEDITOR.plugins.add( 'autogrow', { init : function( editor ) { editor.addCommand( 'autogrow', { exec : resizeEditor, modes : { wysiwyg:1 }, readOnly: 1, canUndo: false, editorFocus: false } ); var eventsList = { contentDom:1, key:1, selectionChange:1, insertElement:1, mode:1 }; editor.config.autoGrow_onStartup && ( eventsList[ 'instanceReady' ] = 1 ); for ( var eventName in eventsList ) { editor.on( eventName, function( evt ) { var maximize = editor.getCommand( 'maximize' ); // Some time is required for insertHtml, and it gives other events better performance as well. if ( evt.editor.mode == 'wysiwyg' && // Disable autogrow when the editor is maximized .(#6339) ( !maximize || maximize.state != CKEDITOR.TRISTATE_ON ) ) { setTimeout( function() { resizeEditor( evt.editor ); // Second pass to make correction upon // the first resize, e.g. scrollbar. resizeEditor( evt.editor ); }, 100 ); } }); } } }); })(); /** * The minimum height that the editor can reach using the AutoGrow feature. * @name CKEDITOR.config.autoGrow_minHeight * @type Number * @default <code>200</code> * @since 3.4 * @example * config.autoGrow_minHeight = 300; */ /** * The maximum height that the editor can reach using the AutoGrow feature. Zero means unlimited. * @name CKEDITOR.config.autoGrow_maxHeight * @type Number * @default <code>0</code> * @since 3.4 * @example * config.autoGrow_maxHeight = 400; */ /** * Whether to have the auto grow happen on editor creation. * @name CKEDITOR.config.autoGrow_onStartup * @type Boolean * @default false * @since 3.6.2 * @example * config.autoGrow_onStartup = true; */ /** * Fired when the AutoGrow plugin is about to change the size of the editor. * @name CKEDITOR.editor#autogrow * @event * @param {Number} data.currentHeight The current height of the editor (before resizing). * @param {Number} data.newHeight The new height of the editor (after resizing). It can be changed * to determine a different height value to be used instead. */ /** * Extra height in pixel to leave between the bottom boundary of content with document size when auto resizing. * @name CKEDITOR.config.autoGrow_bottomSpace * @type Number * @default 0 * @since 3.6.2 */
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/autogrow/plugin.js
JavaScript
gpl3
4,658
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview The "toolbar" plugin. Renders the default toolbar interface in * the editor. */ (function() { var toolbox = function() { this.toolbars = []; this.focusCommandExecuted = false; }; toolbox.prototype.focus = function() { for ( var t = 0, toolbar ; toolbar = this.toolbars[ t++ ] ; ) { for ( var i = 0, item ; item = toolbar.items[ i++ ] ; ) { if ( item.focus ) { item.focus(); return; } } } }; var commands = { toolbarFocus : { modes : { wysiwyg : 1, source : 1 }, readOnly : 1, exec : function( editor ) { if ( editor.toolbox ) { editor.toolbox.focusCommandExecuted = true; // Make the first button focus accessible for IE. (#3417) // Adobe AIR instead need while of delay. if ( CKEDITOR.env.ie || CKEDITOR.env.air ) setTimeout( function(){ editor.toolbox.focus(); }, 100 ); else editor.toolbox.focus(); } } } }; CKEDITOR.plugins.add( 'toolbar', { init : function( editor ) { var endFlag; var itemKeystroke = function( item, keystroke ) { var next, toolbar; var rtl = editor.lang.dir == 'rtl', toolbarGroupCycling = editor.config.toolbarGroupCycling; toolbarGroupCycling = toolbarGroupCycling === undefined || toolbarGroupCycling; switch ( keystroke ) { case 9 : // TAB case CKEDITOR.SHIFT + 9 : // SHIFT + TAB // Cycle through the toolbars, starting from the one // closest to the current item. while ( !toolbar || !toolbar.items.length ) { toolbar = keystroke == 9 ? ( ( toolbar ? toolbar.next : item.toolbar.next ) || editor.toolbox.toolbars[ 0 ] ) : ( ( toolbar ? toolbar.previous : item.toolbar.previous ) || editor.toolbox.toolbars[ editor.toolbox.toolbars.length - 1 ] ); // Look for the first item that accepts focus. if ( toolbar.items.length ) { item = toolbar.items[ endFlag ? ( toolbar.items.length - 1 ) : 0 ]; while ( item && !item.focus ) { item = endFlag ? item.previous : item.next; if ( !item ) toolbar = 0; } } } if ( item ) item.focus(); return false; case rtl ? 37 : 39 : // RIGHT-ARROW case 40 : // DOWN-ARROW next = item; do { // Look for the next item in the toolbar. next = next.next; // If it's the last item, cycle to the first one. if ( !next && toolbarGroupCycling ) next = item.toolbar.items[ 0 ]; } while ( next && !next.focus ) // If available, just focus it, otherwise focus the // first one. if ( next ) next.focus(); else // Send a TAB. itemKeystroke( item, 9 ); return false; case rtl ? 39 : 37 : // LEFT-ARROW case 38 : // UP-ARROW next = item; do { // Look for the previous item in the toolbar. next = next.previous; // If it's the first item, cycle to the last one. if ( !next && toolbarGroupCycling ) next = item.toolbar.items[ item.toolbar.items.length - 1 ]; } while ( next && !next.focus ) // If available, just focus it, otherwise focus the // last one. if ( next ) next.focus(); else { endFlag = 1; // Send a SHIFT + TAB. itemKeystroke( item, CKEDITOR.SHIFT + 9 ); endFlag = 0; } return false; case 27 : // ESC editor.focus(); return false; case 13 : // ENTER case 32 : // SPACE item.execute(); return false; } return true; }; editor.on( 'themeSpace', function( event ) { if ( event.data.space == editor.config.toolbarLocation ) { editor.toolbox = new toolbox(); var labelId = CKEDITOR.tools.getNextId(); var output = [ '<div class="cke_toolbox" role="group" aria-labelledby="', labelId, '" onmousedown="return false;"' ], expanded = editor.config.toolbarStartupExpanded !== false, groupStarted; output.push( expanded ? '>' : ' style="display:none">' ); // Sends the ARIA label. output.push( '<span id="', labelId, '" class="cke_voice_label">', editor.lang.toolbars, '</span>' ); var toolbars = editor.toolbox.toolbars, toolbar = ( editor.config.toolbar instanceof Array ) ? editor.config.toolbar : editor.config[ 'toolbar_' + editor.config.toolbar ]; for ( var r = 0 ; r < toolbar.length ; r++ ) { var toolbarId, toolbarObj = 0, toolbarName, row = toolbar[ r ], items; // It's better to check if the row object is really // available because it's a common mistake to leave // an extra comma in the toolbar definition // settings, which leads on the editor not loading // at all in IE. (#3983) if ( !row ) continue; if ( groupStarted ) { output.push( '</div>' ); groupStarted = 0; } if ( row === '/' ) { output.push( '<div class="cke_break"></div>' ); continue; } items = row.items || row; // Create all items defined for this toolbar. for ( var i = 0 ; i < items.length ; i++ ) { var item, itemName = items[ i ], canGroup; item = editor.ui.create( itemName ); if ( item ) { canGroup = item.canGroup !== false; // Initialize the toolbar first, if needed. if ( !toolbarObj ) { // Create the basic toolbar object. toolbarId = CKEDITOR.tools.getNextId(); toolbarObj = { id : toolbarId, items : [] }; toolbarName = row.name && ( editor.lang.toolbarGroups[ row.name ] || row.name ); // Output the toolbar opener. output.push( '<span id="', toolbarId, '" class="cke_toolbar"', ( toolbarName ? ' aria-labelledby="'+ toolbarId + '_label"' : '' ), ' role="toolbar">' ); // If a toolbar name is available, send the voice label. toolbarName && output.push( '<span id="', toolbarId, '_label" class="cke_voice_label">', toolbarName, '</span>' ); output.push( '<span class="cke_toolbar_start"></span>' ); // Add the toolbar to the "editor.toolbox.toolbars" // array. var index = toolbars.push( toolbarObj ) - 1; // Create the next/previous reference. if ( index > 0 ) { toolbarObj.previous = toolbars[ index - 1 ]; toolbarObj.previous.next = toolbarObj; } } if ( canGroup ) { if ( !groupStarted ) { output.push( '<span class="cke_toolgroup" role="presentation">' ); groupStarted = 1; } } else if ( groupStarted ) { output.push( '</span>' ); groupStarted = 0; } var itemObj = item.render( editor, output ); index = toolbarObj.items.push( itemObj ) - 1; if ( index > 0 ) { itemObj.previous = toolbarObj.items[ index - 1 ]; itemObj.previous.next = itemObj; } itemObj.toolbar = toolbarObj; itemObj.onkey = itemKeystroke; /* * Fix for #3052: * Prevent JAWS from focusing the toolbar after document load. */ itemObj.onfocus = function() { if ( !editor.toolbox.focusCommandExecuted ) editor.focus(); }; } } if ( groupStarted ) { output.push( '</span>' ); groupStarted = 0; } if ( toolbarObj ) output.push( '<span class="cke_toolbar_end"></span></span>' ); } output.push( '</div>' ); if ( editor.config.toolbarCanCollapse ) { var collapserFn = CKEDITOR.tools.addFunction( function() { editor.execCommand( 'toolbarCollapse' ); }); editor.on( 'destroy', function () { CKEDITOR.tools.removeFunction( collapserFn ); }); var collapserId = CKEDITOR.tools.getNextId(); editor.addCommand( 'toolbarCollapse', { readOnly : 1, exec : function( editor ) { var collapser = CKEDITOR.document.getById( collapserId ), toolbox = collapser.getPrevious(), contents = editor.getThemeSpace( 'contents' ), toolboxContainer = toolbox.getParent(), contentHeight = parseInt( contents.$.style.height, 10 ), previousHeight = toolboxContainer.$.offsetHeight, collapsed = !toolbox.isVisible(); if ( !collapsed ) { toolbox.hide(); collapser.addClass( 'cke_toolbox_collapser_min' ); collapser.setAttribute( 'title', editor.lang.toolbarExpand ); } else { toolbox.show(); collapser.removeClass( 'cke_toolbox_collapser_min' ); collapser.setAttribute( 'title', editor.lang.toolbarCollapse ); } // Update collapser symbol. collapser.getFirst().setText( collapsed ? '\u25B2' : // BLACK UP-POINTING TRIANGLE '\u25C0' ); // BLACK LEFT-POINTING TRIANGLE var dy = toolboxContainer.$.offsetHeight - previousHeight; contents.setStyle( 'height', ( contentHeight - dy ) + 'px' ); editor.fire( 'resize' ); }, modes : { wysiwyg : 1, source : 1 } } ); output.push( '<a title="' + ( expanded ? editor.lang.toolbarCollapse : editor.lang.toolbarExpand ) + '" id="' + collapserId + '" tabIndex="-1" class="cke_toolbox_collapser' ); if ( !expanded ) output.push( ' cke_toolbox_collapser_min' ); output.push( '" onclick="CKEDITOR.tools.callFunction(' + collapserFn + ')">', '<span>&#9650;</span>', // BLACK UP-POINTING TRIANGLE '</a>' ); } event.data.html += output.join( '' ); } }); editor.on( 'destroy', function() { var toolbars, index = 0, i, items, instance; toolbars = this.toolbox.toolbars; for ( ; index < toolbars.length; index++ ) { items = toolbars[ index ].items; for ( i = 0; i < items.length; i++ ) { instance = items[ i ]; if ( instance.clickFn ) CKEDITOR.tools.removeFunction( instance.clickFn ); if ( instance.keyDownFn ) CKEDITOR.tools.removeFunction( instance.keyDownFn ); } } }); editor.addCommand( 'toolbarFocus', commands.toolbarFocus ); editor.ui.add( '-', CKEDITOR.UI_SEPARATOR, {} ); editor.ui.addHandler( CKEDITOR.UI_SEPARATOR, { create: function() { return { render : function( editor, output ) { output.push( '<span class="cke_separator" role="separator"></span>' ); return {}; } }; } }); } }); })(); CKEDITOR.UI_SEPARATOR = 'separator'; /** * The "theme space" to which rendering the toolbar. For the default theme, * the recommended options are "top" and "bottom". * @type String * @default 'top' * @see CKEDITOR.config.theme * @example * config.toolbarLocation = 'bottom'; */ CKEDITOR.config.toolbarLocation = 'top'; /** * The toolbar definition. It is an array of toolbars (strips), * each one being also an array, containing a list of UI items. * Note that this setting is composed by "toolbar_" added by the toolbar name, * which in this case is called "Basic". This second part of the setting name * can be anything. You must use this name in the * {@link CKEDITOR.config.toolbar} setting, so you instruct the editor which * toolbar_(name) setting to you. * @type Array * @example * // Defines a toolbar with only one strip containing the "Source" button, a * // separator and the "Bold" and "Italic" buttons. * <b>config.toolbar_Basic = * [ * [ 'Source', '-', 'Bold', 'Italic' ] * ]</b>; * config.toolbar = 'Basic'; */ CKEDITOR.config.toolbar_Basic = [ ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink','-','About'] ]; /** * This is the default toolbar definition used by the editor. It contains all * editor features. * @type Array * @default (see example) * @example * // This is actually the default value. * config.toolbar_Full = * [ * { name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] }, * { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] }, * { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] }, * { name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] }, * '/', * { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] }, * { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] }, * { name: 'links', items : [ 'Link','Unlink','Anchor' ] }, * { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak' ] }, * '/', * { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] }, * { name: 'colors', items : [ 'TextColor','BGColor' ] }, * { name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] } * ]; */ CKEDITOR.config.toolbar_Full = [ { name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] }, { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] }, { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] }, { name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] }, '/', { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] }, { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] }, { name: 'links', items : [ 'Link','Unlink','Anchor' ] }, { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] }, '/', { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] }, { name: 'colors', items : [ 'TextColor','BGColor' ] }, { name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] } ]; /** * The toolbox (alias toolbar) definition. It is a toolbar name or an array of * toolbars (strips), each one being also an array, containing a list of UI items. * @type Array|String * @default 'Full' * @example * // Defines a toolbar with only one strip containing the "Source" button, a * // separator and the "Bold" and "Italic" buttons. * config.toolbar = * [ * [ 'Source', '-', 'Bold', 'Italic' ] * ]; * @example * // Load toolbar_Name where Name = Basic. * config.toolbar = 'Basic'; */ CKEDITOR.config.toolbar = 'Full'; /** * Whether the toolbar can be collapsed by the user. If disabled, the collapser * button will not be displayed. * @type Boolean * @default true * @example * config.toolbarCanCollapse = false; */ CKEDITOR.config.toolbarCanCollapse = true; /** * Whether the toolbar must start expanded when the editor is loaded. * @name CKEDITOR.config.toolbarStartupExpanded * @type Boolean * @default true * @example * config.toolbarStartupExpanded = false; */ /** * When enabled, makes the arrow keys navigation cycle within the current * toolbar group. Otherwise the arrows will move trought all items available in * the toolbar. The TAB key will still be used to quickly jump among the * toolbar groups. * @name CKEDITOR.config.toolbarGroupCycling * @since 3.6 * @type Boolean * @default true * @example * config.toolbarGroupCycling = false; */
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/toolbar/plugin.js
JavaScript
gpl3
17,132
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { // Regex to scan for &nbsp; at the end of blocks, which are actually placeholders. // Safari transforms the &nbsp; to \xa0. (#4172) var tailNbspRegex = /^[\t\r\n ]*(?:&nbsp;|\xa0)$/; var protectedSourceMarker = '{cke_protected}'; // Return the last non-space child node of the block (#4344). function lastNoneSpaceChild( block ) { var lastIndex = block.children.length, last = block.children[ lastIndex - 1 ]; while ( last && last.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.trim( last.value ) ) last = block.children[ --lastIndex ]; return last; } function trimFillers( block, fromSource ) { // If the current node is a block, and if we're converting from source or // we're not in IE then search for and remove any tailing BR node. // // Also, any &nbsp; at the end of blocks are fillers, remove them as well. // (#2886) var children = block.children, lastChild = lastNoneSpaceChild( block ); if ( lastChild ) { if ( ( fromSource || !CKEDITOR.env.ie ) && lastChild.type == CKEDITOR.NODE_ELEMENT && lastChild.name == 'br' ) children.pop(); if ( lastChild.type == CKEDITOR.NODE_TEXT && tailNbspRegex.test( lastChild.value ) ) children.pop(); } } function blockNeedsExtension( block, fromSource, extendEmptyBlock ) { if( !fromSource && ( !extendEmptyBlock || typeof extendEmptyBlock == 'function' && ( extendEmptyBlock( block ) === false ) ) ) return false; // 1. For IE version >=8, empty blocks are displayed correctly themself in wysiwiyg; // 2. For the rest, at least table cell and list item need no filler space. // (#6248) if ( fromSource && CKEDITOR.env.ie && ( document.documentMode > 7 || block.name in CKEDITOR.dtd.tr || block.name in CKEDITOR.dtd.$listItem ) ) return false; var lastChild = lastNoneSpaceChild( block ); return !lastChild || lastChild && ( lastChild.type == CKEDITOR.NODE_ELEMENT && lastChild.name == 'br' // Some of the controls in form needs extension too, // to move cursor at the end of the form. (#4791) || block.name == 'form' && lastChild.name == 'input' ); } function getBlockExtension( isOutput, emptyBlockFiller ) { return function( node ) { trimFillers( node, !isOutput ); if ( blockNeedsExtension( node, !isOutput, emptyBlockFiller ) ) { if ( isOutput || CKEDITOR.env.ie ) node.add( new CKEDITOR.htmlParser.text( '\xa0' ) ); else node.add( new CKEDITOR.htmlParser.element( 'br', {} ) ); } }; } var dtd = CKEDITOR.dtd; // Define orders of table elements. var tableOrder = [ 'caption', 'colgroup', 'col', 'thead', 'tfoot', 'tbody' ]; // Find out the list of block-like tags that can contain <br>. var blockLikeTags = CKEDITOR.tools.extend( {}, dtd.$block, dtd.$listItem, dtd.$tableContent ); for ( var i in blockLikeTags ) { if ( ! ( 'br' in dtd[i] ) ) delete blockLikeTags[i]; } // We just avoid filler in <pre> right now. // TODO: Support filler for <pre>, line break is also occupy line height. delete blockLikeTags.pre; var defaultDataFilterRules = { elements : {}, attributeNames : [ // Event attributes (onXYZ) must not be directly set. They can become // active in the editing area (IE|WebKit). [ ( /^on/ ), 'data-cke-pa-on' ] ] }; var defaultDataBlockFilterRules = { elements : {} }; for ( i in blockLikeTags ) defaultDataBlockFilterRules.elements[ i ] = getBlockExtension(); var defaultHtmlFilterRules = { elementNames : [ // Remove the "cke:" namespace prefix. [ ( /^cke:/ ), '' ], // Ignore <?xml:namespace> tags. [ ( /^\?xml:namespace$/ ), '' ] ], attributeNames : [ // Attributes saved for changes and protected attributes. [ ( /^data-cke-(saved|pa)-/ ), '' ], // All "data-cke-" attributes are to be ignored. [ ( /^data-cke-.*/ ), '' ], [ 'hidefocus', '' ] ], elements : { $ : function( element ) { var attribs = element.attributes; if ( attribs ) { // Elements marked as temporary are to be ignored. if ( attribs[ 'data-cke-temp' ] ) return false; // Remove duplicated attributes - #3789. var attributeNames = [ 'name', 'href', 'src' ], savedAttributeName; for ( var i = 0 ; i < attributeNames.length ; i++ ) { savedAttributeName = 'data-cke-saved-' + attributeNames[ i ]; savedAttributeName in attribs && ( delete attribs[ attributeNames[ i ] ] ); } } return element; }, // The contents of table should be in correct order (#4809). table : function( element ) { var children = element.children; children.sort( function ( node1, node2 ) { return node1.type == CKEDITOR.NODE_ELEMENT && node2.type == node1.type ? CKEDITOR.tools.indexOf( tableOrder, node1.name ) > CKEDITOR.tools.indexOf( tableOrder, node2.name ) ? 1 : -1 : 0; } ); }, embed : function( element ) { var parent = element.parent; // If the <embed> is child of a <object>, copy the width // and height attributes from it. if ( parent && parent.name == 'object' ) { var parentWidth = parent.attributes.width, parentHeight = parent.attributes.height; parentWidth && ( element.attributes.width = parentWidth ); parentHeight && ( element.attributes.height = parentHeight ); } }, // Restore param elements into self-closing. param : function( param ) { param.children = []; param.isEmpty = true; return param; }, // Remove empty link but not empty anchor.(#3829) a : function( element ) { if ( !( element.children.length || element.attributes.name || element.attributes[ 'data-cke-saved-name' ] ) ) { return false; } }, // Remove dummy span in webkit. span: function( element ) { if ( element.attributes[ 'class' ] == 'Apple-style-span' ) delete element.name; }, // Empty <pre> in IE is reported with filler node (&nbsp;). pre : function( element ) { CKEDITOR.env.ie && trimFillers( element ); }, html : function( element ) { delete element.attributes.contenteditable; delete element.attributes[ 'class' ]; }, body : function( element ) { delete element.attributes.spellcheck; delete element.attributes.contenteditable; }, style : function( element ) { var child = element.children[ 0 ]; child && child.value && ( child.value = CKEDITOR.tools.trim( child.value )); if ( !element.attributes.type ) element.attributes.type = 'text/css'; }, title : function( element ) { var titleText = element.children[ 0 ]; titleText && ( titleText.value = element.attributes[ 'data-cke-title' ] || '' ); } }, attributes : { 'class' : function( value, element ) { // Remove all class names starting with "cke_". return CKEDITOR.tools.ltrim( value.replace( /(?:^|\s+)cke_[^\s]*/g, '' ) ) || false; } } }; if ( CKEDITOR.env.ie ) { // IE outputs style attribute in capital letters. We should convert // them back to lower case, while not hurting the values (#5930) defaultHtmlFilterRules.attributes.style = function( value, element ) { return value.replace( /(^|;)([^\:]+)/g, function( match ) { return match.toLowerCase(); }); }; } function protectReadOnly( element ) { var attrs = element.attributes; // We should flag that the element was locked by our code so // it'll be editable by the editor functions (#6046). if ( attrs.contenteditable != "false" ) attrs[ 'data-cke-editable' ] = attrs.contenteditable ? 'true' : 1; attrs.contenteditable = "false"; } function unprotectReadyOnly( element ) { var attrs = element.attributes; switch( attrs[ 'data-cke-editable' ] ) { case 'true': attrs.contenteditable = 'true'; break; case '1': delete attrs.contenteditable; break; } } // Disable form elements editing mode provided by some browers. (#5746) for ( i in { input : 1, textarea : 1 } ) { defaultDataFilterRules.elements[ i ] = protectReadOnly; defaultHtmlFilterRules.elements[ i ] = unprotectReadyOnly; } var protectElementRegex = /<(a|area|img|input)\b([^>]*)>/gi, protectAttributeRegex = /\b(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi; var protectElementsRegex = /(?:<style(?=[ >])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi, encodedElementsRegex = /<cke:encoded>([^<]*)<\/cke:encoded>/gi; var protectElementNamesRegex = /(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi, unprotectElementNamesRegex = /(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi; var protectSelfClosingRegex = /<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi; function protectAttributes( html ) { return html.replace( protectElementRegex, function( element, tag, attributes ) { return '<' + tag + attributes.replace( protectAttributeRegex, function( fullAttr, attrName ) { // Avoid corrupting the inline event attributes (#7243). // We should not rewrite the existed protected attributes, e.g. clipboard content from editor. (#5218) if ( !( /^on/ ).test( attrName ) && attributes.indexOf( 'data-cke-saved-' + attrName ) == -1 ) return ' data-cke-saved-' + fullAttr + ' data-cke-' + CKEDITOR.rnd + '-' + fullAttr; return fullAttr; }) + '>'; }); } function protectElements( html ) { return html.replace( protectElementsRegex, function( match ) { return '<cke:encoded>' + encodeURIComponent( match ) + '</cke:encoded>'; }); } function unprotectElements( html ) { return html.replace( encodedElementsRegex, function( match, encoded ) { return decodeURIComponent( encoded ); }); } function protectElementsNames( html ) { return html.replace( protectElementNamesRegex, '$1cke:$2'); } function unprotectElementNames( html ) { return html.replace( unprotectElementNamesRegex, '$1$2' ); } function protectSelfClosingElements( html ) { return html.replace( protectSelfClosingRegex, '<cke:$1$2></cke:$1>' ); } function protectPreFormatted( html ) { return html.replace( /(<pre\b[^>]*>)(\r\n|\n)/g, '$1$2$2' ); } function protectRealComments( html ) { return html.replace( /<!--(?!{cke_protected})[\s\S]+?-->/g, function( match ) { return '<!--' + protectedSourceMarker + '{C}' + encodeURIComponent( match ).replace( /--/g, '%2D%2D' ) + '-->'; }); } function unprotectRealComments( html ) { return html.replace( /<!--\{cke_protected\}\{C\}([\s\S]+?)-->/g, function( match, data ) { return decodeURIComponent( data ); }); } function unprotectSource( html, editor ) { var store = editor._.dataStore; return html.replace( /<!--\{cke_protected\}([\s\S]+?)-->/g, function( match, data ) { return decodeURIComponent( data ); }).replace( /\{cke_protected_(\d+)\}/g, function( match, id ) { return store && store[ id ] || ''; }); } function protectSource( data, editor ) { var protectedHtml = [], protectRegexes = editor.config.protectedSource, store = editor._.dataStore || ( editor._.dataStore = { id : 1 } ), tempRegex = /<\!--\{cke_temp(comment)?\}(\d*?)-->/g; var regexes = [ // Script tags will also be forced to be protected, otherwise // IE will execute them. ( /<script[\s\S]*?<\/script>/gi ), // <noscript> tags (get lost in IE and messed up in FF). /<noscript[\s\S]*?<\/noscript>/gi ] .concat( protectRegexes ); // First of any other protection, we must protect all comments // to avoid loosing them (of course, IE related). // Note that we use a different tag for comments, as we need to // transform them when applying filters. data = data.replace( (/<!--[\s\S]*?-->/g), function( match ) { return '<!--{cke_tempcomment}' + ( protectedHtml.push( match ) - 1 ) + '-->'; }); for ( var i = 0 ; i < regexes.length ; i++ ) { data = data.replace( regexes[i], function( match ) { match = match.replace( tempRegex, // There could be protected source inside another one. (#3869). function( $, isComment, id ) { return protectedHtml[ id ]; } ); // Avoid protecting over protected, e.g. /\{.*?\}/ return ( /cke_temp(comment)?/ ).test( match ) ? match : '<!--{cke_temp}' + ( protectedHtml.push( match ) - 1 ) + '-->'; }); } data = data.replace( tempRegex, function( $, isComment, id ) { return '<!--' + protectedSourceMarker + ( isComment ? '{C}' : '' ) + encodeURIComponent( protectedHtml[ id ] ).replace( /--/g, '%2D%2D' ) + '-->'; } ); // Different protection pattern is used for those that // live in attributes to avoid from being HTML encoded. return data.replace( /(['"]).*?\1/g, function ( match ) { return match.replace( /<!--\{cke_protected\}([\s\S]+?)-->/g, function( match, data ) { store[ store.id ] = decodeURIComponent( data ); return '{cke_protected_'+ ( store.id++ ) + '}'; }); }); } CKEDITOR.plugins.add( 'htmldataprocessor', { requires : [ 'htmlwriter' ], init : function( editor ) { var dataProcessor = editor.dataProcessor = new CKEDITOR.htmlDataProcessor( editor ); dataProcessor.writer.forceSimpleAmpersand = editor.config.forceSimpleAmpersand; dataProcessor.dataFilter.addRules( defaultDataFilterRules ); dataProcessor.dataFilter.addRules( defaultDataBlockFilterRules ); dataProcessor.htmlFilter.addRules( defaultHtmlFilterRules ); var defaultHtmlBlockFilterRules = { elements : {} }; for ( i in blockLikeTags ) defaultHtmlBlockFilterRules.elements[ i ] = getBlockExtension( true, editor.config.fillEmptyBlocks ); dataProcessor.htmlFilter.addRules( defaultHtmlBlockFilterRules ); }, onLoad : function() { ! ( 'fillEmptyBlocks' in CKEDITOR.config ) && ( CKEDITOR.config.fillEmptyBlocks = 1 ); } }); CKEDITOR.htmlDataProcessor = function( editor ) { this.editor = editor; this.writer = new CKEDITOR.htmlWriter(); this.dataFilter = new CKEDITOR.htmlParser.filter(); this.htmlFilter = new CKEDITOR.htmlParser.filter(); }; CKEDITOR.htmlDataProcessor.prototype = { toHtml : function( data, fixForBody ) { // The source data is already HTML, but we need to clean // it up and apply the filter. data = protectSource( data, this.editor ); // Before anything, we must protect the URL attributes as the // browser may changing them when setting the innerHTML later in // the code. data = protectAttributes( data ); // Protect elements than can't be set inside a DIV. E.g. IE removes // style tags from innerHTML. (#3710) data = protectElements( data ); // Certain elements has problem to go through DOM operation, protect // them by prefixing 'cke' namespace. (#3591) data = protectElementsNames( data ); // All none-IE browsers ignore self-closed custom elements, // protecting them into open-close. (#3591) data = protectSelfClosingElements( data ); // Compensate one leading line break after <pre> open as browsers // eat it up. (#5789) data = protectPreFormatted( data ); // Call the browser to help us fixing a possibly invalid HTML // structure. var div = new CKEDITOR.dom.element( 'div' ); // Add fake character to workaround IE comments bug. (#3801) div.setHtml( 'a' + data ); data = div.getHtml().substr( 1 ); // Restore shortly protected attribute names. data = data.replace( new RegExp( ' data-cke-' + CKEDITOR.rnd + '-', 'ig' ), ' ' ); // Unprotect "some" of the protected elements at this point. data = unprotectElementNames( data ); data = unprotectElements( data ); // Restore the comments that have been protected, in this way they // can be properly filtered. data = unprotectRealComments( data ); // Now use our parser to make further fixes to the structure, as // well as apply the filter. var fragment = CKEDITOR.htmlParser.fragment.fromHtml( data, fixForBody ), writer = new CKEDITOR.htmlParser.basicWriter(); fragment.writeHtml( writer, this.dataFilter ); data = writer.getHtml( true ); // Protect the real comments again. data = protectRealComments( data ); return data; }, toDataFormat : function( html, fixForBody ) { var writer = this.writer, fragment = CKEDITOR.htmlParser.fragment.fromHtml( html, fixForBody ); writer.reset(); fragment.writeHtml( writer, this.htmlFilter ); var data = writer.getHtml( true ); // Restore those non-HTML protected source. (#4475,#4880) data = unprotectRealComments( data ); data = unprotectSource( data, this.editor ); return data; } }; })(); /** * Whether to force using "&" instead of "&amp;amp;" in elements attributes * values, it's not recommended to change this setting for compliance with the * W3C XHTML 1.0 standards (<a href="http://www.w3.org/TR/xhtml1/#C_12">C.12, XHTML 1.0</a>). * @name CKEDITOR.config.forceSimpleAmpersand * @name CKEDITOR.config.forceSimpleAmpersand * @type Boolean * @default false * @example * config.forceSimpleAmpersand = false; */ /** * Whether a filler text (non-breaking space entity - &nbsp;) will be inserted into empty block elements in HTML output, * this is used to render block elements properly with line-height; When a function is instead specified, * it'll be passed a {@link CKEDITOR.htmlParser.element} to decide whether adding the filler text * by expecting a boolean return value. * @name CKEDITOR.config.fillEmptyBlocks * @since 3.5 * @type Boolean * @default true * @example * config.fillEmptyBlocks = false; // Prevent filler nodes in all empty blocks. * * // Prevent filler node only in float cleaners. * config.fillEmptyBlocks = function( element ) * { * if ( element.attributes[ 'class' ].indexOf ( 'clear-both' ) != -1 ) * return false; * } */
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/htmldataprocessor/plugin.js
JavaScript
gpl3
18,781
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { var eventNameList = [ 'click', 'keydown', 'mousedown', 'keypress', 'mouseover', 'mouseout' ]; // Inline event callbacks assigned via innerHTML/outerHTML, such as // onclick/onmouseover, are ignored in AIR. // Use DOM2 event listeners to substitue inline handlers instead. function convertInlineHandlers( container ) { // TODO: document.querySelectorAll is not supported in AIR. var children = container.getElementsByTag( '*' ), count = children.count(), child; for ( var i = 0; i < count; i++ ) { child = children.getItem( i ); (function( node ) { for ( var j = 0; j < eventNameList.length; j++ ) { (function( eventName ) { var inlineEventHandler = node.getAttribute( 'on' + eventName ); if ( node.hasAttribute( 'on' + eventName ) ) { node.removeAttribute( 'on' + eventName ); node.on( eventName, function( evt ) { var callFunc = /(return\s*)?CKEDITOR\.tools\.callFunction\(([^)]+)\)/.exec( inlineEventHandler ), hasReturn = callFunc && callFunc[ 1 ], callFuncArgs = callFunc && callFunc[ 2 ].split( ',' ), preventDefault = /return false;/.test( inlineEventHandler ); if ( callFuncArgs ) { var nums = callFuncArgs.length, argName; for ( var i = 0; i < nums; i++ ) { // Trim spaces around param. callFuncArgs[ i ] = argName = CKEDITOR.tools.trim( callFuncArgs[ i ] ); // String form param. var strPattern = argName.match( /^(["'])([^"']*?)\1$/ ); if ( strPattern ) { callFuncArgs[ i ] = strPattern[ 2 ]; continue; } // Integer form param. if ( argName.match( /\d+/ ) ) { callFuncArgs[ i ] = parseInt( argName, 10 ); continue; } // Speical variables. switch( argName ) { case 'this' : callFuncArgs[ i ] = node.$; break; case 'event' : callFuncArgs[ i ] = evt.data.$; break; case 'null' : callFuncArgs [ i ] = null; break; } } var retval = CKEDITOR.tools.callFunction.apply( window, callFuncArgs ); if ( hasReturn && retval === false ) preventDefault = 1; } if ( preventDefault ) evt.data.preventDefault(); }); } })( eventNameList[ j ] ); } })( child ); } } CKEDITOR.plugins.add( 'adobeair', { init : function( editor ) { if ( !CKEDITOR.env.air ) return; // Body doesn't get default margin on AIR. editor.addCss( 'body { padding: 8px }' ); editor.on( 'uiReady', function() { convertInlineHandlers( editor.container ); if ( editor.sharedSpaces ) { for ( var space in editor.sharedSpaces ) convertInlineHandlers( editor.sharedSpaces[ space ] ); } editor.on( 'elementsPathUpdate', function( evt ) { convertInlineHandlers( evt.data.space ); } ); }); editor.on( 'contentDom', function() { // Hyperlinks are enabled in editable documents in Adobe // AIR. Prevent their click behavior. editor.document.on( 'click', function( ev ) { ev.data.preventDefault( true ); }); }); } }); CKEDITOR.ui.on( 'ready', function( evt ) { var ui = evt.data; // richcombo, panelbutton and menu if ( ui._.panel ) { var panel = ui._.panel._.panel, holder; ( function() { // Adding dom event listeners off-line are not supported in AIR, // waiting for panel iframe loaded. if ( !panel.isLoaded ) { setTimeout( arguments.callee, 30 ); return; } holder = panel._.holder; convertInlineHandlers( holder ); })(); } else if ( ui instanceof CKEDITOR.dialog ) convertInlineHandlers( ui._.element ); }); })(); CKEDITOR.dom.document.prototype.write = CKEDITOR.tools.override( CKEDITOR.dom.document.prototype.write, function( original_write ) { function appendElement( parent, tagName, fullTag, text ) { var node = parent.append( tagName ), attrs = CKEDITOR.htmlParser.fragment.fromHtml( fullTag ).children[ 0 ].attributes; attrs && node.setAttributes( attrs ); text && node.append( parent.getDocument().createText( text ) ); } return function( html, mode ) { // document.write() or document.writeln() fail silently after // the page load event in Adobe AIR. // DOM manipulation could be used instead. if ( this.getBody() ) { // We're taking the below extra work only because innerHTML // on <html> element doesn't work as expected. var doc = this, head = this.getHead(); // Create style nodes for inline css. ( <style> content doesn't applied when setting via innerHTML ) html = html.replace( /(<style[^>]*>)([\s\S]*?)<\/style>/gi, function ( match, startTag, styleText ) { appendElement( head, 'style', startTag, styleText ); return ''; }); html = html.replace( /<base\b[^>]*\/>/i, function( match ) { appendElement( head, 'base', match ); return ''; }); html = html.replace( /<title>([\s\S]*)<\/title>/i, function( match, title ) { doc.$.title = title; return ''; }); // Move the rest of head stuff. html = html.replace( /<head>([\s\S]*)<\/head>/i, function( headHtml ) { // Inject the <head> HTML inside a <div>. // Do that before getDocumentHead because WebKit moves // <link css> elements to the <head> at this point. var div = new CKEDITOR.dom.element( 'div', doc ); div.setHtml( headHtml ); // Move the <div> nodes to <head>. div.moveChildren( head ); return ''; }); html.replace( /(<body[^>]*>)([\s\S]*)(?=$|<\/body>)/i, function( match, startTag, innerHTML ) { doc.getBody().setHtml( innerHTML ); var attrs = CKEDITOR.htmlParser.fragment.fromHtml( startTag ).children[ 0 ].attributes; attrs && doc.getBody().setAttributes( attrs ); }); } else original_write.apply( this, arguments ); }; });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/adobeair/plugin.js
JavaScript
gpl3
6,679
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { CKEDITOR.plugins.add( 'stylescombo', { requires : [ 'richcombo', 'styles' ], init : function( editor ) { var config = editor.config, lang = editor.lang.stylesCombo, styles = {}, stylesList = [], combo; function loadStylesSet( callback ) { editor.getStylesSet( function( stylesDefinitions ) { if ( !stylesList.length ) { var style, styleName; // Put all styles into an Array. for ( var i = 0, count = stylesDefinitions.length ; i < count ; i++ ) { var styleDefinition = stylesDefinitions[ i ]; styleName = styleDefinition.name; style = styles[ styleName ] = new CKEDITOR.style( styleDefinition ); style._name = styleName; style._.enterMode = config.enterMode; stylesList.push( style ); } // Sorts the Array, so the styles get grouped by type. stylesList.sort( sortStyles ); } callback && callback(); }); } editor.ui.addRichCombo( 'Styles', { label : lang.label, title : lang.panelTitle, className : 'cke_styles', panel : { css : editor.skin.editor.css.concat( config.contentsCss ), multiSelect : true, attributes : { 'aria-label' : lang.panelTitle } }, init : function() { combo = this; loadStylesSet( function() { var style, styleName, lastType, type, i, count; // Loop over the Array, adding all items to the // combo. for ( i = 0, count = stylesList.length ; i < count ; i++ ) { style = stylesList[ i ]; styleName = style._name; type = style.type; if ( type != lastType ) { combo.startGroup( lang[ 'panelTitle' + String( type ) ] ); lastType = type; } combo.add( styleName, style.type == CKEDITOR.STYLE_OBJECT ? styleName : style.buildPreview(), styleName ); } combo.commit(); }); }, onClick : function( value ) { editor.focus(); editor.fire( 'saveSnapshot' ); var style = styles[ value ], selection = editor.getSelection(), elementPath = new CKEDITOR.dom.elementPath( selection.getStartElement() ); style[ style.checkActive( elementPath ) ? 'remove' : 'apply' ]( editor.document ); editor.fire( 'saveSnapshot' ); }, onRender : function() { editor.on( 'selectionChange', function( ev ) { var currentValue = this.getValue(), elementPath = ev.data.path, elements = elementPath.elements; // For each element into the elements path. for ( var i = 0, count = elements.length, element ; i < count ; i++ ) { element = elements[i]; // Check if the element is removable by any of // the styles. for ( var value in styles ) { if ( styles[ value ].checkElementRemovable( element, true ) ) { if ( value != currentValue ) this.setValue( value ); return; } } } // If no styles match, just empty it. this.setValue( '' ); }, this); }, onOpen : function() { if ( CKEDITOR.env.ie || CKEDITOR.env.webkit ) editor.focus(); var selection = editor.getSelection(), element = selection.getSelectedElement(), elementPath = new CKEDITOR.dom.elementPath( element || selection.getStartElement() ), counter = [ 0, 0, 0, 0 ]; this.showAll(); this.unmarkAll(); for ( var name in styles ) { var style = styles[ name ], type = style.type; if ( style.checkActive( elementPath ) ) this.mark( name ); else if ( type == CKEDITOR.STYLE_OBJECT && !style.checkApplicable( elementPath ) ) { this.hideItem( name ); counter[ type ]--; } counter[ type ]++; } if ( !counter[ CKEDITOR.STYLE_BLOCK ] ) this.hideGroup( lang[ 'panelTitle' + String( CKEDITOR.STYLE_BLOCK ) ] ); if ( !counter[ CKEDITOR.STYLE_INLINE ] ) this.hideGroup( lang[ 'panelTitle' + String( CKEDITOR.STYLE_INLINE ) ] ); if ( !counter[ CKEDITOR.STYLE_OBJECT ] ) this.hideGroup( lang[ 'panelTitle' + String( CKEDITOR.STYLE_OBJECT ) ] ); }, // Force a reload of the data reset: function() { if ( combo ) { delete combo._.panel; delete combo._.list; combo._.committed = 0; combo._.items = {}; combo._.state = CKEDITOR.TRISTATE_OFF; } styles = {}; stylesList = []; loadStylesSet(); } }); editor.on( 'instanceReady', function() { loadStylesSet(); } ); } }); function sortStyles( styleA, styleB ) { var typeA = styleA.type, typeB = styleB.type; return typeA == typeB ? 0 : typeA == CKEDITOR.STYLE_OBJECT ? -1 : typeB == CKEDITOR.STYLE_OBJECT ? 1 : typeB == CKEDITOR.STYLE_BLOCK ? 1 : -1; } })();
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/stylescombo/plugin.js
JavaScript
gpl3
5,515
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { var cellNodeRegex = /^(?:td|th)$/; function getSelectedCells( selection ) { var ranges = selection.getRanges(); var retval = []; var database = {}; function moveOutOfCellGuard( node ) { // Apply to the first cell only. if ( retval.length > 0 ) return; // If we are exiting from the first </td>, then the td should definitely be // included. if ( node.type == CKEDITOR.NODE_ELEMENT && cellNodeRegex.test( node.getName() ) && !node.getCustomData( 'selected_cell' ) ) { CKEDITOR.dom.element.setMarker( database, node, 'selected_cell', true ); retval.push( node ); } } for ( var i = 0 ; i < ranges.length ; i++ ) { var range = ranges[ i ]; if ( range.collapsed ) { // Walker does not handle collapsed ranges yet - fall back to old API. var startNode = range.getCommonAncestor(); var nearestCell = startNode.getAscendant( 'td', true ) || startNode.getAscendant( 'th', true ); if ( nearestCell ) retval.push( nearestCell ); } else { var walker = new CKEDITOR.dom.walker( range ); var node; walker.guard = moveOutOfCellGuard; while ( ( node = walker.next() ) ) { // If may be possible for us to have a range like this: // <td>^1</td><td>^2</td> // The 2nd td shouldn't be included. // // So we have to take care to include a td we've entered only when we've // walked into its children. var parent = node.getAscendant( 'td' ) || node.getAscendant( 'th' ); if ( parent && !parent.getCustomData( 'selected_cell' ) ) { CKEDITOR.dom.element.setMarker( database, parent, 'selected_cell', true ); retval.push( parent ); } } } } CKEDITOR.dom.element.clearAllMarkers( database ); return retval; } function getFocusElementAfterDelCells( cellsToDelete ) { var i = 0, last = cellsToDelete.length - 1, database = {}, cell,focusedCell, tr; while ( ( cell = cellsToDelete[ i++ ] ) ) CKEDITOR.dom.element.setMarker( database, cell, 'delete_cell', true ); // 1.first we check left or right side focusable cell row by row; i = 0; while ( ( cell = cellsToDelete[ i++ ] ) ) { if ( ( focusedCell = cell.getPrevious() ) && !focusedCell.getCustomData( 'delete_cell' ) || ( focusedCell = cell.getNext() ) && !focusedCell.getCustomData( 'delete_cell' ) ) { CKEDITOR.dom.element.clearAllMarkers( database ); return focusedCell; } } CKEDITOR.dom.element.clearAllMarkers( database ); // 2. then we check the toppest row (outside the selection area square) focusable cell tr = cellsToDelete[ 0 ].getParent(); if ( ( tr = tr.getPrevious() ) ) return tr.getLast(); // 3. last we check the lowerest row focusable cell tr = cellsToDelete[ last ].getParent(); if ( ( tr = tr.getNext() ) ) return tr.getChild( 0 ); return null; } function insertRow( selection, insertBefore ) { var cells = getSelectedCells( selection ), firstCell = cells[ 0 ], table = firstCell.getAscendant( 'table' ), doc = firstCell.getDocument(), startRow = cells[ 0 ].getParent(), startRowIndex = startRow.$.rowIndex, lastCell = cells[ cells.length - 1 ], endRowIndex = lastCell.getParent().$.rowIndex + lastCell.$.rowSpan - 1, endRow = new CKEDITOR.dom.element( table.$.rows[ endRowIndex ] ), rowIndex = insertBefore ? startRowIndex : endRowIndex, row = insertBefore ? startRow : endRow; var map = CKEDITOR.tools.buildTableMap( table ), cloneRow = map[ rowIndex ], nextRow = insertBefore ? map[ rowIndex - 1 ] : map[ rowIndex + 1 ], width = map[0].length; var newRow = doc.createElement( 'tr' ); for ( var i = 0; cloneRow[ i ] && i < width; i++ ) { var cell; // Check whether there's a spanning row here, do not break it. if ( cloneRow[ i ].rowSpan > 1 && nextRow && cloneRow[ i ] == nextRow[ i ] ) { cell = cloneRow[ i ]; cell.rowSpan += 1; } else { cell = new CKEDITOR.dom.element( cloneRow[ i ] ).clone(); cell.removeAttribute( 'rowSpan' ); !CKEDITOR.env.ie && cell.appendBogus(); newRow.append( cell ); cell = cell.$; } i += cell.colSpan - 1; } insertBefore ? newRow.insertBefore( row ) : newRow.insertAfter( row ); } function deleteRows( selectionOrRow ) { if ( selectionOrRow instanceof CKEDITOR.dom.selection ) { var cells = getSelectedCells( selectionOrRow ), firstCell = cells[ 0 ], table = firstCell.getAscendant( 'table' ), map = CKEDITOR.tools.buildTableMap( table ), startRow = cells[ 0 ].getParent(), startRowIndex = startRow.$.rowIndex, lastCell = cells[ cells.length - 1 ], endRowIndex = lastCell.getParent().$.rowIndex + lastCell.$.rowSpan - 1, rowsToDelete = []; // Delete cell or reduce cell spans by checking through the table map. for ( var i = startRowIndex; i <= endRowIndex; i++ ) { var mapRow = map[ i ], row = new CKEDITOR.dom.element( table.$.rows[ i ] ); for ( var j = 0; j < mapRow.length; j++ ) { var cell = new CKEDITOR.dom.element( mapRow[ j ] ), cellRowIndex = cell.getParent().$.rowIndex; if ( cell.$.rowSpan == 1 ) cell.remove(); // Row spanned cell. else { // Span row of the cell, reduce spanning. cell.$.rowSpan -= 1; // Root row of the cell, root cell to next row. if ( cellRowIndex == i ) { var nextMapRow = map[ i + 1 ]; nextMapRow[ j - 1 ] ? cell.insertAfter( new CKEDITOR.dom.element( nextMapRow[ j - 1 ] ) ) : new CKEDITOR.dom.element( table.$.rows[ i + 1 ] ).append( cell, 1 ); } } j += cell.$.colSpan - 1; } rowsToDelete.push( row ); } var rows = table.$.rows; // Where to put the cursor after rows been deleted? // 1. Into next sibling row if any; // 2. Into previous sibling row if any; // 3. Into table's parent element if it's the very last row. var cursorPosition = new CKEDITOR.dom.element( rows[ endRowIndex + 1 ] || ( startRowIndex > 0 ? rows[ startRowIndex - 1 ] : null ) || table.$.parentNode ); for ( i = rowsToDelete.length ; i >= 0 ; i-- ) deleteRows( rowsToDelete[ i ] ); return cursorPosition; } else if ( selectionOrRow instanceof CKEDITOR.dom.element ) { table = selectionOrRow.getAscendant( 'table' ); if ( table.$.rows.length == 1 ) table.remove(); else selectionOrRow.remove(); } return null; } function getCellColIndex( cell, isStart ) { var row = cell.getParent(), rowCells = row.$.cells; var colIndex = 0; for ( var i = 0; i < rowCells.length; i++ ) { var mapCell = rowCells[ i ]; colIndex += isStart ? 1 : mapCell.colSpan; if ( mapCell == cell.$ ) break; } return colIndex -1; } function getColumnsIndices( cells, isStart ) { var retval = isStart ? Infinity : 0; for ( var i = 0; i < cells.length; i++ ) { var colIndex = getCellColIndex( cells[ i ], isStart ); if ( isStart ? colIndex < retval : colIndex > retval ) retval = colIndex; } return retval; } function insertColumn( selection, insertBefore ) { var cells = getSelectedCells( selection ), firstCell = cells[ 0 ], table = firstCell.getAscendant( 'table' ), startCol = getColumnsIndices( cells, 1 ), lastCol = getColumnsIndices( cells ), colIndex = insertBefore? startCol : lastCol; var map = CKEDITOR.tools.buildTableMap( table ), cloneCol = [], nextCol = [], height = map.length; for ( var i = 0; i < height; i++ ) { cloneCol.push( map[ i ][ colIndex ] ); var nextCell = insertBefore ? map[ i ][ colIndex - 1 ] : map[ i ][ colIndex + 1 ]; nextCell && nextCol.push( nextCell ); } for ( i = 0; i < height; i++ ) { var cell; // Check whether there's a spanning column here, do not break it. if ( cloneCol[ i ].colSpan > 1 && nextCol.length && nextCol[ i ] == cloneCol[ i ] ) { cell = cloneCol[ i ]; cell.colSpan += 1; } else { cell = new CKEDITOR.dom.element( cloneCol[ i ] ).clone(); cell.removeAttribute( 'colSpan' ); !CKEDITOR.env.ie && cell.appendBogus(); cell[ insertBefore? 'insertBefore' : 'insertAfter' ].call( cell, new CKEDITOR.dom.element ( cloneCol[ i ] ) ); cell = cell.$; } i += cell.rowSpan - 1; } } function deleteColumns( selectionOrCell ) { var cells = getSelectedCells( selectionOrCell ), firstCell = cells[ 0 ], lastCell = cells[ cells.length - 1 ], table = firstCell.getAscendant( 'table' ), map = CKEDITOR.tools.buildTableMap( table ), startColIndex, endColIndex, rowsToDelete = []; // Figure out selected cells' column indices. for ( var i = 0, rows = map.length; i < rows; i++ ) { for ( var j = 0, cols = map[ i ].length; j < cols; j++ ) { if ( map[ i ][ j ] == firstCell.$ ) startColIndex = j; if ( map[ i ][ j ] == lastCell.$ ) endColIndex = j; } } // Delete cell or reduce cell spans by checking through the table map. for ( i = startColIndex; i <= endColIndex; i++ ) { for ( j = 0; j < map.length; j++ ) { var mapRow = map[ j ], row = new CKEDITOR.dom.element( table.$.rows[ j ] ), cell = new CKEDITOR.dom.element( mapRow[ i ] ); if ( cell.$ ) { if ( cell.$.colSpan == 1 ) cell.remove(); // Reduce the col spans. else cell.$.colSpan -= 1; j += cell.$.rowSpan - 1; if ( !row.$.cells.length ) rowsToDelete.push( row ); } } } var firstRowCells = table.$.rows[ 0 ] && table.$.rows[ 0 ].cells; // Where to put the cursor after columns been deleted? // 1. Into next cell of the first row if any; // 2. Into previous cell of the first row if any; // 3. Into table's parent element; var cursorPosition = new CKEDITOR.dom.element( firstRowCells[ startColIndex ] || ( startColIndex ? firstRowCells[ startColIndex - 1 ] : table.$.parentNode ) ); // Delete table rows only if all columns are gone (do not remove empty row). if ( rowsToDelete.length == rows ) table.remove(); return cursorPosition; } function getFocusElementAfterDelCols( cells ) { var cellIndexList = [], table = cells[ 0 ] && cells[ 0 ].getAscendant( 'table' ), i, length, targetIndex, targetCell; // get the cellIndex list of delete cells for ( i = 0, length = cells.length; i < length; i++ ) cellIndexList.push( cells[i].$.cellIndex ); // get the focusable column index cellIndexList.sort(); for ( i = 1, length = cellIndexList.length; i < length; i++ ) { if ( cellIndexList[ i ] - cellIndexList[ i - 1 ] > 1 ) { targetIndex = cellIndexList[ i - 1 ] + 1; break; } } if ( !targetIndex ) targetIndex = cellIndexList[ 0 ] > 0 ? ( cellIndexList[ 0 ] - 1 ) : ( cellIndexList[ cellIndexList.length - 1 ] + 1 ); // scan row by row to get the target cell var rows = table.$.rows; for ( i = 0, length = rows.length; i < length ; i++ ) { targetCell = rows[ i ].cells[ targetIndex ]; if ( targetCell ) break; } return targetCell ? new CKEDITOR.dom.element( targetCell ) : table.getPrevious(); } function insertCell( selection, insertBefore ) { var startElement = selection.getStartElement(); var cell = startElement.getAscendant( 'td', 1 ) || startElement.getAscendant( 'th', 1 ); if ( !cell ) return; // Create the new cell element to be added. var newCell = cell.clone(); if ( !CKEDITOR.env.ie ) newCell.appendBogus(); if ( insertBefore ) newCell.insertBefore( cell ); else newCell.insertAfter( cell ); } function deleteCells( selectionOrCell ) { if ( selectionOrCell instanceof CKEDITOR.dom.selection ) { var cellsToDelete = getSelectedCells( selectionOrCell ); var table = cellsToDelete[ 0 ] && cellsToDelete[ 0 ].getAscendant( 'table' ); var cellToFocus = getFocusElementAfterDelCells( cellsToDelete ); for ( var i = cellsToDelete.length - 1 ; i >= 0 ; i-- ) deleteCells( cellsToDelete[ i ] ); if ( cellToFocus ) placeCursorInCell( cellToFocus, true ); else if ( table ) table.remove(); } else if ( selectionOrCell instanceof CKEDITOR.dom.element ) { var tr = selectionOrCell.getParent(); if ( tr.getChildCount() == 1 ) tr.remove(); else selectionOrCell.remove(); } } // Remove filler at end and empty spaces around the cell content. function trimCell( cell ) { var bogus = cell.getBogus(); bogus && bogus.remove(); cell.trim(); } function placeCursorInCell( cell, placeAtEnd ) { var range = new CKEDITOR.dom.range( cell.getDocument() ); if ( !range[ 'moveToElementEdit' + ( placeAtEnd ? 'End' : 'Start' ) ]( cell ) ) { range.selectNodeContents( cell ); range.collapse( placeAtEnd ? false : true ); } range.select( true ); } function cellInRow( tableMap, rowIndex, cell ) { var oRow = tableMap[ rowIndex ]; if ( typeof cell == 'undefined' ) return oRow; for ( var c = 0 ; oRow && c < oRow.length ; c++ ) { if ( cell.is && oRow[c] == cell.$ ) return c; else if ( c == cell ) return new CKEDITOR.dom.element( oRow[ c ] ); } return cell.is ? -1 : null; } function cellInCol( tableMap, colIndex ) { var oCol = []; for ( var r = 0; r < tableMap.length; r++ ) { var row = tableMap[ r ]; oCol.push( row[ colIndex ] ); // Avoid adding duplicate cells. if ( row[ colIndex ].rowSpan > 1 ) r += row[ colIndex ].rowSpan - 1; } return oCol; } function mergeCells( selection, mergeDirection, isDetect ) { var cells = getSelectedCells( selection ); // Invalid merge request if: // 1. In batch mode despite that less than two selected. // 2. In solo mode while not exactly only one selected. // 3. Cells distributed in different table groups (e.g. from both thead and tbody). var commonAncestor; if ( ( mergeDirection ? cells.length != 1 : cells.length < 2 ) || ( commonAncestor = selection.getCommonAncestor() ) && commonAncestor.type == CKEDITOR.NODE_ELEMENT && commonAncestor.is( 'table' ) ) { return false; } var cell, firstCell = cells[ 0 ], table = firstCell.getAscendant( 'table' ), map = CKEDITOR.tools.buildTableMap( table ), mapHeight = map.length, mapWidth = map[ 0 ].length, startRow = firstCell.getParent().$.rowIndex, startColumn = cellInRow( map, startRow, firstCell ); if ( mergeDirection ) { var targetCell; try { var rowspan = parseInt( firstCell.getAttribute( 'rowspan' ), 10 ) || 1; var colspan = parseInt( firstCell.getAttribute( 'colspan' ), 10 ) || 1; targetCell = map[ mergeDirection == 'up' ? ( startRow - rowspan ): mergeDirection == 'down' ? ( startRow + rowspan ) : startRow ] [ mergeDirection == 'left' ? ( startColumn - colspan ): mergeDirection == 'right' ? ( startColumn + colspan ) : startColumn ]; } catch( er ) { return false; } // 1. No cell could be merged. // 2. Same cell actually. if ( !targetCell || firstCell.$ == targetCell ) return false; // Sort in map order regardless of the DOM sequence. cells[ ( mergeDirection == 'up' || mergeDirection == 'left' ) ? 'unshift' : 'push' ]( new CKEDITOR.dom.element( targetCell ) ); } // Start from here are merging way ignorance (merge up/right, batch merge). var doc = firstCell.getDocument(), lastRowIndex = startRow, totalRowSpan = 0, totalColSpan = 0, // Use a documentFragment as buffer when appending cell contents. frag = !isDetect && new CKEDITOR.dom.documentFragment( doc ), dimension = 0; for ( var i = 0; i < cells.length; i++ ) { cell = cells[ i ]; var tr = cell.getParent(), cellFirstChild = cell.getFirst(), colSpan = cell.$.colSpan, rowSpan = cell.$.rowSpan, rowIndex = tr.$.rowIndex, colIndex = cellInRow( map, rowIndex, cell ); // Accumulated the actual places taken by all selected cells. dimension += colSpan * rowSpan; // Accumulated the maximum virtual spans from column and row. totalColSpan = Math.max( totalColSpan, colIndex - startColumn + colSpan ) ; totalRowSpan = Math.max( totalRowSpan, rowIndex - startRow + rowSpan ); if ( !isDetect ) { // Trim all cell fillers and check to remove empty cells. if ( trimCell( cell ), cell.getChildren().count() ) { // Merge vertically cells as two separated paragraphs. if ( rowIndex != lastRowIndex && cellFirstChild && !( cellFirstChild.isBlockBoundary && cellFirstChild.isBlockBoundary( { br : 1 } ) ) ) { var last = frag.getLast( CKEDITOR.dom.walker.whitespaces( true ) ); if ( last && !( last.is && last.is( 'br' ) ) ) frag.append( 'br' ); } cell.moveChildren( frag ); } i ? cell.remove() : cell.setHtml( '' ); } lastRowIndex = rowIndex; } if ( !isDetect ) { frag.moveChildren( firstCell ); if ( !CKEDITOR.env.ie ) firstCell.appendBogus(); if ( totalColSpan >= mapWidth ) firstCell.removeAttribute( 'rowSpan' ); else firstCell.$.rowSpan = totalRowSpan; if ( totalRowSpan >= mapHeight ) firstCell.removeAttribute( 'colSpan' ); else firstCell.$.colSpan = totalColSpan; // Swip empty <tr> left at the end of table due to the merging. var trs = new CKEDITOR.dom.nodeList( table.$.rows ), count = trs.count(); for ( i = count - 1; i >= 0; i-- ) { var tailTr = trs.getItem( i ); if ( !tailTr.$.cells.length ) { tailTr.remove(); count++; continue; } } return firstCell; } // Be able to merge cells only if actual dimension of selected // cells equals to the caculated rectangle. else return ( totalRowSpan * totalColSpan ) == dimension; } function verticalSplitCell ( selection, isDetect ) { var cells = getSelectedCells( selection ); if ( cells.length > 1 ) return false; else if ( isDetect ) return true; var cell = cells[ 0 ], tr = cell.getParent(), table = tr.getAscendant( 'table' ), map = CKEDITOR.tools.buildTableMap( table ), rowIndex = tr.$.rowIndex, colIndex = cellInRow( map, rowIndex, cell ), rowSpan = cell.$.rowSpan, newCell, newRowSpan, newCellRowSpan, newRowIndex; if ( rowSpan > 1 ) { newRowSpan = Math.ceil( rowSpan / 2 ); newCellRowSpan = Math.floor( rowSpan / 2 ); newRowIndex = rowIndex + newRowSpan; var newCellTr = new CKEDITOR.dom.element( table.$.rows[ newRowIndex ] ), newCellRow = cellInRow( map, newRowIndex ), candidateCell; newCell = cell.clone(); // Figure out where to insert the new cell by checking the vitual row. for ( var c = 0; c < newCellRow.length; c++ ) { candidateCell = newCellRow[ c ]; // Catch first cell actually following the column. if ( candidateCell.parentNode == newCellTr.$ && c > colIndex ) { newCell.insertBefore( new CKEDITOR.dom.element( candidateCell ) ); break; } else candidateCell = null; } // The destination row is empty, append at will. if ( !candidateCell ) newCellTr.append( newCell, true ); } else { newCellRowSpan = newRowSpan = 1; newCellTr = tr.clone(); newCellTr.insertAfter( tr ); newCellTr.append( newCell = cell.clone() ); var cellsInSameRow = cellInRow( map, rowIndex ); for ( var i = 0; i < cellsInSameRow.length; i++ ) cellsInSameRow[ i ].rowSpan++; } if ( !CKEDITOR.env.ie ) newCell.appendBogus(); cell.$.rowSpan = newRowSpan; newCell.$.rowSpan = newCellRowSpan; if ( newRowSpan == 1 ) cell.removeAttribute( 'rowSpan' ); if ( newCellRowSpan == 1 ) newCell.removeAttribute( 'rowSpan' ); return newCell; } function horizontalSplitCell( selection, isDetect ) { var cells = getSelectedCells( selection ); if ( cells.length > 1 ) return false; else if ( isDetect ) return true; var cell = cells[ 0 ], tr = cell.getParent(), table = tr.getAscendant( 'table' ), map = CKEDITOR.tools.buildTableMap( table ), rowIndex = tr.$.rowIndex, colIndex = cellInRow( map, rowIndex, cell ), colSpan = cell.$.colSpan, newCell, newColSpan, newCellColSpan; if ( colSpan > 1 ) { newColSpan = Math.ceil( colSpan / 2 ); newCellColSpan = Math.floor( colSpan / 2 ); } else { newCellColSpan = newColSpan = 1; var cellsInSameCol = cellInCol( map, colIndex ); for ( var i = 0; i < cellsInSameCol.length; i++ ) cellsInSameCol[ i ].colSpan++; } newCell = cell.clone(); newCell.insertAfter( cell ); if ( !CKEDITOR.env.ie ) newCell.appendBogus(); cell.$.colSpan = newColSpan; newCell.$.colSpan = newCellColSpan; if ( newColSpan == 1 ) cell.removeAttribute( 'colSpan' ); if ( newCellColSpan == 1 ) newCell.removeAttribute( 'colSpan' ); return newCell; } // Context menu on table caption incorrect (#3834) var contextMenuTags = { thead : 1, tbody : 1, tfoot : 1, td : 1, tr : 1, th : 1 }; CKEDITOR.plugins.tabletools = { init : function( editor ) { var lang = editor.lang.table; editor.addCommand( 'cellProperties', new CKEDITOR.dialogCommand( 'cellProperties' ) ); CKEDITOR.dialog.add( 'cellProperties', this.path + 'dialogs/tableCell.js' ); editor.addCommand( 'tableDelete', { exec : function( editor ) { var selection = editor.getSelection(), startElement = selection && selection.getStartElement(), table = startElement && startElement.getAscendant( 'table', 1 ); if ( !table ) return; // If the table's parent has only one child remove it as well (unless it's the body or a table cell) (#5416, #6289) var parent = table.getParent(); if ( parent.getChildCount() == 1 && !parent.is( 'body', 'td', 'th' ) ) table = parent; var range = new CKEDITOR.dom.range( editor.document ); range.moveToPosition( table, CKEDITOR.POSITION_BEFORE_START ); table.remove(); range.select(); } } ); editor.addCommand( 'rowDelete', { exec : function( editor ) { var selection = editor.getSelection(); placeCursorInCell( deleteRows( selection ) ); } } ); editor.addCommand( 'rowInsertBefore', { exec : function( editor ) { var selection = editor.getSelection(); insertRow( selection, true ); } } ); editor.addCommand( 'rowInsertAfter', { exec : function( editor ) { var selection = editor.getSelection(); insertRow( selection ); } } ); editor.addCommand( 'columnDelete', { exec : function( editor ) { var selection = editor.getSelection(); var element = deleteColumns( selection ); element && placeCursorInCell( element, true ); } } ); editor.addCommand( 'columnInsertBefore', { exec : function( editor ) { var selection = editor.getSelection(); insertColumn( selection, true ); } } ); editor.addCommand( 'columnInsertAfter', { exec : function( editor ) { var selection = editor.getSelection(); insertColumn( selection ); } } ); editor.addCommand( 'cellDelete', { exec : function( editor ) { var selection = editor.getSelection(); deleteCells( selection ); } } ); editor.addCommand( 'cellMerge', { exec : function( editor ) { placeCursorInCell( mergeCells( editor.getSelection() ), true ); } } ); editor.addCommand( 'cellMergeRight', { exec : function( editor ) { placeCursorInCell( mergeCells( editor.getSelection(), 'right' ), true ); } } ); editor.addCommand( 'cellMergeDown', { exec : function( editor ) { placeCursorInCell( mergeCells( editor.getSelection(), 'down' ), true ); } } ); editor.addCommand( 'cellVerticalSplit', { exec : function( editor ) { placeCursorInCell( verticalSplitCell( editor.getSelection() ) ); } } ); editor.addCommand( 'cellHorizontalSplit', { exec : function( editor ) { placeCursorInCell( horizontalSplitCell( editor.getSelection() ) ); } } ); editor.addCommand( 'cellInsertBefore', { exec : function( editor ) { var selection = editor.getSelection(); insertCell( selection, true ); } } ); editor.addCommand( 'cellInsertAfter', { exec : function( editor ) { var selection = editor.getSelection(); insertCell( selection ); } } ); // If the "menu" plugin is loaded, register the menu items. if ( editor.addMenuItems ) { editor.addMenuItems( { tablecell : { label : lang.cell.menu, group : 'tablecell', order : 1, getItems : function() { var selection = editor.getSelection(), cells = getSelectedCells( selection ); return { tablecell_insertBefore : CKEDITOR.TRISTATE_OFF, tablecell_insertAfter : CKEDITOR.TRISTATE_OFF, tablecell_delete : CKEDITOR.TRISTATE_OFF, tablecell_merge : mergeCells( selection, null, true ) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, tablecell_merge_right : mergeCells( selection, 'right', true ) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, tablecell_merge_down : mergeCells( selection, 'down', true ) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, tablecell_split_vertical : verticalSplitCell( selection, true ) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, tablecell_split_horizontal : horizontalSplitCell( selection, true ) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, tablecell_properties : cells.length > 0 ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED }; } }, tablecell_insertBefore : { label : lang.cell.insertBefore, group : 'tablecell', command : 'cellInsertBefore', order : 5 }, tablecell_insertAfter : { label : lang.cell.insertAfter, group : 'tablecell', command : 'cellInsertAfter', order : 10 }, tablecell_delete : { label : lang.cell.deleteCell, group : 'tablecell', command : 'cellDelete', order : 15 }, tablecell_merge : { label : lang.cell.merge, group : 'tablecell', command : 'cellMerge', order : 16 }, tablecell_merge_right : { label : lang.cell.mergeRight, group : 'tablecell', command : 'cellMergeRight', order : 17 }, tablecell_merge_down : { label : lang.cell.mergeDown, group : 'tablecell', command : 'cellMergeDown', order : 18 }, tablecell_split_horizontal : { label : lang.cell.splitHorizontal, group : 'tablecell', command : 'cellHorizontalSplit', order : 19 }, tablecell_split_vertical : { label : lang.cell.splitVertical, group : 'tablecell', command : 'cellVerticalSplit', order : 20 }, tablecell_properties : { label : lang.cell.title, group : 'tablecellproperties', command : 'cellProperties', order : 21 }, tablerow : { label : lang.row.menu, group : 'tablerow', order : 1, getItems : function() { return { tablerow_insertBefore : CKEDITOR.TRISTATE_OFF, tablerow_insertAfter : CKEDITOR.TRISTATE_OFF, tablerow_delete : CKEDITOR.TRISTATE_OFF }; } }, tablerow_insertBefore : { label : lang.row.insertBefore, group : 'tablerow', command : 'rowInsertBefore', order : 5 }, tablerow_insertAfter : { label : lang.row.insertAfter, group : 'tablerow', command : 'rowInsertAfter', order : 10 }, tablerow_delete : { label : lang.row.deleteRow, group : 'tablerow', command : 'rowDelete', order : 15 }, tablecolumn : { label : lang.column.menu, group : 'tablecolumn', order : 1, getItems : function() { return { tablecolumn_insertBefore : CKEDITOR.TRISTATE_OFF, tablecolumn_insertAfter : CKEDITOR.TRISTATE_OFF, tablecolumn_delete : CKEDITOR.TRISTATE_OFF }; } }, tablecolumn_insertBefore : { label : lang.column.insertBefore, group : 'tablecolumn', command : 'columnInsertBefore', order : 5 }, tablecolumn_insertAfter : { label : lang.column.insertAfter, group : 'tablecolumn', command : 'columnInsertAfter', order : 10 }, tablecolumn_delete : { label : lang.column.deleteColumn, group : 'tablecolumn', command : 'columnDelete', order : 15 } }); } // If the "contextmenu" plugin is laoded, register the listeners. if ( editor.contextMenu ) { editor.contextMenu.addListener( function( element, selection ) { if ( !element || element.isReadOnly() ) return null; while ( element ) { if ( element.getName() in contextMenuTags ) { return { tablecell : CKEDITOR.TRISTATE_OFF, tablerow : CKEDITOR.TRISTATE_OFF, tablecolumn : CKEDITOR.TRISTATE_OFF }; } element = element.getParent(); } return null; } ); } }, getSelectedCells : getSelectedCells }; CKEDITOR.plugins.add( 'tabletools', CKEDITOR.plugins.tabletools ); })(); /** * Create a two-dimension array that reflects the actual layout of table cells, * with cell spans, with mappings to the original td elements. * @param table {CKEDITOR.dom.element} */ CKEDITOR.tools.buildTableMap = function ( table ) { var aRows = table.$.rows ; // Row and Column counters. var r = -1 ; var aMap = []; for ( var i = 0 ; i < aRows.length ; i++ ) { r++ ; !aMap[r] && ( aMap[r] = [] ); var c = -1 ; for ( var j = 0 ; j < aRows[i].cells.length ; j++ ) { var oCell = aRows[i].cells[j] ; c++ ; while ( aMap[r][c] ) c++ ; var iColSpan = isNaN( oCell.colSpan ) ? 1 : oCell.colSpan ; var iRowSpan = isNaN( oCell.rowSpan ) ? 1 : oCell.rowSpan ; for ( var rs = 0 ; rs < iRowSpan ; rs++ ) { if ( !aMap[r + rs] ) aMap[r + rs] = []; for ( var cs = 0 ; cs < iColSpan ; cs++ ) { aMap[r + rs][c + cs] = aRows[i].cells[j] ; } } c += iColSpan - 1 ; } } return aMap ; };
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/tabletools/plugin.js
JavaScript
gpl3
32,174
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'cellProperties', function( editor ) { var langTable = editor.lang.table, langCell = langTable.cell, langCommon = editor.lang.common, validate = CKEDITOR.dialog.validate, widthPattern = /^(\d+(?:\.\d+)?)(px|%)$/, heightPattern = /^(\d+(?:\.\d+)?)px$/, bind = CKEDITOR.tools.bind, spacer = { type : 'html', html : '&nbsp;' }, rtl = editor.lang.dir == 'rtl'; /** * * @param dialogName * @param callback [ childDialog ] */ function getDialogValue( dialogName, callback ) { var onOk = function() { releaseHandlers( this ); callback( this, this._.parentDialog ); this._.parentDialog.changeFocus(); }; var onCancel = function() { releaseHandlers( this ); this._.parentDialog.changeFocus(); }; var releaseHandlers = function( dialog ) { dialog.removeListener( 'ok', onOk ); dialog.removeListener( 'cancel', onCancel ); }; var bindToDialog = function( dialog ) { dialog.on( 'ok', onOk ); dialog.on( 'cancel', onCancel ); }; editor.execCommand( dialogName ); if ( editor._.storedDialogs.colordialog ) bindToDialog( editor._.storedDialogs.colordialog ); else { CKEDITOR.on( 'dialogDefinition', function( e ) { if ( e.data.name != dialogName ) return; var definition = e.data.definition; e.removeListener(); definition.onLoad = CKEDITOR.tools.override( definition.onLoad, function( orginal ) { return function() { bindToDialog( this ); definition.onLoad = orginal; if ( typeof orginal == 'function' ) orginal.call( this ); }; } ); }); } } return { title : langCell.title, minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks? 450 : 410, minHeight : CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks )? 230 : 200, contents : [ { id : 'info', label : langCell.title, accessKey : 'I', elements : [ { type : 'hbox', widths : [ '40%', '5%', '40%' ], children : [ { type : 'vbox', padding : 0, children : [ { type : 'hbox', widths : [ '70%', '30%' ], children : [ { type : 'text', id : 'width', width: '100px', label : langCommon.width, validate : validate[ 'number' ]( langCell.invalidWidth ), // Extra labelling of width unit type. onLoad : function() { var widthType = this.getDialog().getContentElement( 'info', 'widthType' ), labelElement = widthType.getElement(), inputElement = this.getInputElement(), ariaLabelledByAttr = inputElement.getAttribute( 'aria-labelledby' ); inputElement.setAttribute( 'aria-labelledby', [ ariaLabelledByAttr, labelElement.$.id ].join( ' ' ) ); }, setup : function( element ) { var widthAttr = parseInt( element.getAttribute( 'width' ), 10 ), widthStyle = parseInt( element.getStyle( 'width' ), 10 ); !isNaN( widthAttr ) && this.setValue( widthAttr ); !isNaN( widthStyle ) && this.setValue( widthStyle ); }, commit : function( element ) { var value = parseInt( this.getValue(), 10 ), unit = this.getDialog().getValueOf( 'info', 'widthType' ); if ( !isNaN( value ) ) element.setStyle( 'width', value + unit ); else element.removeStyle( 'width' ); element.removeAttribute( 'width' ); }, 'default' : '' }, { type : 'select', id : 'widthType', label : editor.lang.table.widthUnit, labelStyle: 'visibility:hidden', 'default' : 'px', items : [ [ langTable.widthPx, 'px' ], [ langTable.widthPc, '%' ] ], setup : function( selectedCell ) { var widthMatch = widthPattern.exec( selectedCell.getStyle( 'width' ) || selectedCell.getAttribute( 'width' ) ); if ( widthMatch ) this.setValue( widthMatch[2] ); } } ] }, { type : 'hbox', widths : [ '70%', '30%' ], children : [ { type : 'text', id : 'height', label : langCommon.height, width: '100px', 'default' : '', validate : validate[ 'number' ]( langCell.invalidHeight ), // Extra labelling of height unit type. onLoad : function() { var heightType = this.getDialog().getContentElement( 'info', 'htmlHeightType' ), labelElement = heightType.getElement(), inputElement = this.getInputElement(), ariaLabelledByAttr = inputElement.getAttribute( 'aria-labelledby' ); inputElement.setAttribute( 'aria-labelledby', [ ariaLabelledByAttr, labelElement.$.id ].join( ' ' ) ); }, setup : function( element ) { var heightAttr = parseInt( element.getAttribute( 'height' ), 10 ), heightStyle = parseInt( element.getStyle( 'height' ), 10 ); !isNaN( heightAttr ) && this.setValue( heightAttr ); !isNaN( heightStyle ) && this.setValue( heightStyle ); }, commit : function( element ) { var value = parseInt( this.getValue(), 10 ); if ( !isNaN( value ) ) element.setStyle( 'height', CKEDITOR.tools.cssLength( value ) ); else element.removeStyle( 'height' ); element.removeAttribute( 'height' ); } }, { id : 'htmlHeightType', type : 'html', html : '<br />'+ langTable.widthPx } ] }, spacer, { type : 'select', id : 'wordWrap', label : langCell.wordWrap, 'default' : 'yes', items : [ [ langCell.yes, 'yes' ], [ langCell.no, 'no' ] ], setup : function( element ) { var wordWrapAttr = element.getAttribute( 'noWrap' ), wordWrapStyle = element.getStyle( 'white-space' ); if ( wordWrapStyle == 'nowrap' || wordWrapAttr ) this.setValue( 'no' ); }, commit : function( element ) { if ( this.getValue() == 'no' ) element.setStyle( 'white-space', 'nowrap' ); else element.removeStyle( 'white-space' ); element.removeAttribute( 'noWrap' ); } }, spacer, { type : 'select', id : 'hAlign', label : langCell.hAlign, 'default' : '', items : [ [ langCommon.notSet, '' ], [ langCommon.alignLeft, 'left' ], [ langCommon.alignCenter, 'center' ], [ langCommon.alignRight, 'right' ] ], setup : function( element ) { var alignAttr = element.getAttribute( 'align' ), textAlignStyle = element.getStyle( 'text-align'); this.setValue( textAlignStyle || alignAttr || '' ); }, commit : function( selectedCell ) { var value = this.getValue(); if ( value ) selectedCell.setStyle( 'text-align', value ); else selectedCell.removeStyle( 'text-align' ); selectedCell.removeAttribute( 'align' ); } }, { type : 'select', id : 'vAlign', label : langCell.vAlign, 'default' : '', items : [ [ langCommon.notSet, '' ], [ langCommon.alignTop, 'top' ], [ langCommon.alignMiddle, 'middle' ], [ langCommon.alignBottom, 'bottom' ], [ langCell.alignBaseline, 'baseline' ] ], setup : function( element ) { var vAlignAttr = element.getAttribute( 'vAlign' ), vAlignStyle = element.getStyle( 'vertical-align' ); switch( vAlignStyle ) { // Ignore all other unrelated style values.. case 'top': case 'middle': case 'bottom': case 'baseline': break; default: vAlignStyle = ''; } this.setValue( vAlignStyle || vAlignAttr || '' ); }, commit : function( element ) { var value = this.getValue(); if ( value ) element.setStyle( 'vertical-align', value ); else element.removeStyle( 'vertical-align' ); element.removeAttribute( 'vAlign' ); } } ] }, spacer, { type : 'vbox', padding : 0, children : [ { type : 'select', id : 'cellType', label : langCell.cellType, 'default' : 'td', items : [ [ langCell.data, 'td' ], [ langCell.header, 'th' ] ], setup : function( selectedCell ) { this.setValue( selectedCell.getName() ); }, commit : function( selectedCell ) { selectedCell.renameNode( this.getValue() ); } }, spacer, { type : 'text', id : 'rowSpan', label : langCell.rowSpan, 'default' : '', validate : validate.integer( langCell.invalidRowSpan ), setup : function( selectedCell ) { var attrVal = parseInt( selectedCell.getAttribute( 'rowSpan' ), 10 ); if ( attrVal && attrVal != 1 ) this.setValue( attrVal ); }, commit : function( selectedCell ) { var value = parseInt( this.getValue(), 10 ); if ( value && value != 1 ) selectedCell.setAttribute( 'rowSpan', this.getValue() ); else selectedCell.removeAttribute( 'rowSpan' ); } }, { type : 'text', id : 'colSpan', label : langCell.colSpan, 'default' : '', validate : validate.integer( langCell.invalidColSpan ), setup : function( element ) { var attrVal = parseInt( element.getAttribute( 'colSpan' ), 10 ); if ( attrVal && attrVal != 1 ) this.setValue( attrVal ); }, commit : function( selectedCell ) { var value = parseInt( this.getValue(), 10 ); if ( value && value != 1 ) selectedCell.setAttribute( 'colSpan', this.getValue() ); else selectedCell.removeAttribute( 'colSpan' ); } }, spacer, { type : 'hbox', padding : 0, widths : [ '60%', '40%' ], children : [ { type : 'text', id : 'bgColor', label : langCell.bgColor, 'default' : '', setup : function( element ) { var bgColorAttr = element.getAttribute( 'bgColor' ), bgColorStyle = element.getStyle( 'background-color' ); this.setValue( bgColorStyle || bgColorAttr ); }, commit : function( selectedCell ) { var value = this.getValue(); if ( value ) selectedCell.setStyle( 'background-color', this.getValue() ); else selectedCell.removeStyle( 'background-color' ); selectedCell.removeAttribute( 'bgColor'); } }, { type : 'button', id : 'bgColorChoose', "class" : 'colorChooser', label : langCell.chooseColor, onLoad : function() { // Stick the element to the bottom (#5587) this.getElement().getParent().setStyle( 'vertical-align', 'bottom' ); }, onClick : function() { var self = this; getDialogValue( 'colordialog', function( colorDialog ) { self.getDialog().getContentElement( 'info', 'bgColor' ).setValue( colorDialog.getContentElement( 'picker', 'selectedColor' ).getValue() ); } ); } } ] }, spacer, { type : 'hbox', padding : 0, widths : [ '60%', '40%' ], children : [ { type : 'text', id : 'borderColor', label : langCell.borderColor, 'default' : '', setup : function( element ) { var borderColorAttr = element.getAttribute( 'borderColor' ), borderColorStyle = element.getStyle( 'border-color' ); this.setValue( borderColorStyle || borderColorAttr ); }, commit : function( selectedCell ) { var value = this.getValue(); if ( value ) selectedCell.setStyle( 'border-color', this.getValue() ); else selectedCell.removeStyle( 'border-color' ); selectedCell.removeAttribute( 'borderColor'); } }, { type : 'button', id : 'borderColorChoose', "class" : 'colorChooser', label : langCell.chooseColor, style : ( rtl ? 'margin-right' : 'margin-left' ) + ': 10px', onLoad : function() { // Stick the element to the bottom (#5587) this.getElement().getParent().setStyle( 'vertical-align', 'bottom' ); }, onClick : function() { var self = this; getDialogValue( 'colordialog', function( colorDialog ) { self.getDialog().getContentElement( 'info', 'borderColor' ).setValue( colorDialog.getContentElement( 'picker', 'selectedColor' ).getValue() ); } ); } } ] } ] } ] } ] } ], onShow : function() { this.cells = CKEDITOR.plugins.tabletools.getSelectedCells( this._.editor.getSelection() ); this.setupContent( this.cells[ 0 ] ); }, onOk : function() { var selection = this._.editor.getSelection(), bookmarks = selection.createBookmarks(); var cells = this.cells; for ( var i = 0 ; i < cells.length ; i++ ) this.commitContent( cells[ i ] ); this._.editor.forceNextSelectionCheck(); selection.selectBookmarks( bookmarks ); this._.editor.selectionChange(); } }; } );
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/tabletools/dialogs/tableCell.js
JavaScript
gpl3
16,433
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @file Forms Plugin */ CKEDITOR.plugins.add( 'forms', { init : function( editor ) { var lang = editor.lang; editor.addCss( 'form' + '{' + 'border: 1px dotted #FF0000;' + 'padding: 2px;' + '}\n' ); editor.addCss( 'img.cke_hidden' + '{' + 'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/hiddenfield.gif' ) + ');' + 'background-position: center center;' + 'background-repeat: no-repeat;' + 'border: 1px solid #a9a9a9;' + 'width: 16px !important;' + 'height: 16px !important;' + '}' ); // All buttons use the same code to register. So, to avoid // duplications, let's use this tool function. var addButtonCommand = function( buttonName, commandName, dialogFile ) { editor.addCommand( commandName, new CKEDITOR.dialogCommand( commandName ) ); editor.ui.addButton( buttonName, { label : lang.common[ buttonName.charAt(0).toLowerCase() + buttonName.slice(1) ], command : commandName }); CKEDITOR.dialog.add( commandName, dialogFile ); }; var dialogPath = this.path + 'dialogs/'; addButtonCommand( 'Form', 'form', dialogPath + 'form.js' ); addButtonCommand( 'Checkbox', 'checkbox', dialogPath + 'checkbox.js' ); addButtonCommand( 'Radio', 'radio', dialogPath + 'radio.js' ); addButtonCommand( 'TextField', 'textfield', dialogPath + 'textfield.js' ); addButtonCommand( 'Textarea', 'textarea', dialogPath + 'textarea.js' ); addButtonCommand( 'Select', 'select', dialogPath + 'select.js' ); addButtonCommand( 'Button', 'button', dialogPath + 'button.js' ); addButtonCommand( 'ImageButton', 'imagebutton', CKEDITOR.plugins.getPath('image') + 'dialogs/image.js' ); addButtonCommand( 'HiddenField', 'hiddenfield', dialogPath + 'hiddenfield.js' ); // If the "menu" plugin is loaded, register the menu items. if ( editor.addMenuItems ) { editor.addMenuItems( { form : { label : lang.form.menu, command : 'form', group : 'form' }, checkbox : { label : lang.checkboxAndRadio.checkboxTitle, command : 'checkbox', group : 'checkbox' }, radio : { label : lang.checkboxAndRadio.radioTitle, command : 'radio', group : 'radio' }, textfield : { label : lang.textfield.title, command : 'textfield', group : 'textfield' }, hiddenfield : { label : lang.hidden.title, command : 'hiddenfield', group : 'hiddenfield' }, imagebutton : { label : lang.image.titleButton, command : 'imagebutton', group : 'imagebutton' }, button : { label : lang.button.title, command : 'button', group : 'button' }, select : { label : lang.select.title, command : 'select', group : 'select' }, textarea : { label : lang.textarea.title, command : 'textarea', group : 'textarea' } }); } // If the "contextmenu" plugin is loaded, register the listeners. if ( editor.contextMenu ) { editor.contextMenu.addListener( function( element ) { if ( element && element.hasAscendant( 'form', true ) && !element.isReadOnly() ) return { form : CKEDITOR.TRISTATE_OFF }; }); editor.contextMenu.addListener( function( element ) { if ( element && !element.isReadOnly() ) { var name = element.getName(); if ( name == 'select' ) return { select : CKEDITOR.TRISTATE_OFF }; if ( name == 'textarea' ) return { textarea : CKEDITOR.TRISTATE_OFF }; if ( name == 'input' ) { switch( element.getAttribute( 'type' ) ) { case 'button' : case 'submit' : case 'reset' : return { button : CKEDITOR.TRISTATE_OFF }; case 'checkbox' : return { checkbox : CKEDITOR.TRISTATE_OFF }; case 'radio' : return { radio : CKEDITOR.TRISTATE_OFF }; case 'image' : return { imagebutton : CKEDITOR.TRISTATE_OFF }; default : return { textfield : CKEDITOR.TRISTATE_OFF }; } } if ( name == 'img' && element.data( 'cke-real-element-type' ) == 'hiddenfield' ) return { hiddenfield : CKEDITOR.TRISTATE_OFF }; } }); } editor.on( 'doubleclick', function( evt ) { var element = evt.data.element; if ( element.is( 'form' ) ) evt.data.dialog = 'form'; else if ( element.is( 'select' ) ) evt.data.dialog = 'select'; else if ( element.is( 'textarea' ) ) evt.data.dialog = 'textarea'; else if ( element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'hiddenfield' ) evt.data.dialog = 'hiddenfield'; else if ( element.is( 'input' ) ) { switch ( element.getAttribute( 'type' ) ) { case 'button' : case 'submit' : case 'reset' : evt.data.dialog = 'button'; break; case 'checkbox' : evt.data.dialog = 'checkbox'; break; case 'radio' : evt.data.dialog = 'radio'; break; case 'image' : evt.data.dialog = 'imagebutton'; break; default : evt.data.dialog = 'textfield'; break; } } }); }, afterInit : function( editor ) { var dataProcessor = editor.dataProcessor, htmlFilter = dataProcessor && dataProcessor.htmlFilter, dataFilter = dataProcessor && dataProcessor.dataFilter; // Cleanup certain IE form elements default values. if ( CKEDITOR.env.ie ) { htmlFilter && htmlFilter.addRules( { elements : { input : function( input ) { var attrs = input.attributes, type = attrs.type; // Old IEs don't provide type for Text inputs #5522 if ( !type ) attrs.type = 'text'; if ( type == 'checkbox' || type == 'radio' ) attrs.value == 'on' && delete attrs.value; } } } ); } if ( dataFilter ) { dataFilter.addRules( { elements : { input : function( element ) { if ( element.attributes.type == 'hidden' ) return editor.createFakeParserElement( element, 'cke_hidden', 'hiddenfield' ); } } } ); } }, requires : [ 'image', 'fakeobjects' ] } ); if ( CKEDITOR.env.ie ) { CKEDITOR.dom.element.prototype.hasAttribute = CKEDITOR.tools.override( CKEDITOR.dom.element.prototype.hasAttribute, function( original ) { return function( name ) { var $attr = this.$.attributes.getNamedItem( name ); if ( this.getName() == 'input' ) { switch ( name ) { case 'class' : return this.$.className.length > 0; case 'checked' : return !!this.$.checked; case 'value' : var type = this.getAttribute( 'type' ); return type == 'checkbox' || type == 'radio' ? this.$.value != 'on' : this.$.value; } } return original.apply( this, arguments ); }; }); }
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/forms/plugin.js
JavaScript
gpl3
7,438
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'textarea', function( editor ) { return { title : editor.lang.textarea.title, minWidth : 350, minHeight : 220, onShow : function() { delete this.textarea; var element = this.getParentEditor().getSelection().getSelectedElement(); if ( element && element.getName() == "textarea" ) { this.textarea = element; this.setupContent( element ); } }, onOk : function() { var editor, element = this.textarea, isInsertMode = !element; if ( isInsertMode ) { editor = this.getParentEditor(); element = editor.document.createElement( 'textarea' ); } this.commitContent( element ); if ( isInsertMode ) editor.insertElement( element ); }, contents : [ { id : 'info', label : editor.lang.textarea.title, title : editor.lang.textarea.title, elements : [ { id : '_cke_saved_name', type : 'text', label : editor.lang.common.name, 'default' : '', accessKey : 'N', setup : function( element ) { this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' ); }, commit : function( element ) { if ( this.getValue() ) element.data( 'cke-saved-name', this.getValue() ); else { element.data( 'cke-saved-name', false ); element.removeAttribute( 'name' ); } } }, { type : 'hbox', widths:['50%','50%'], children:[ { id : 'cols', type : 'text', label : editor.lang.textarea.cols, 'default' : '', accessKey : 'C', style : 'width:50px', validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ), setup : function( element ) { var value = element.hasAttribute( 'cols' ) && element.getAttribute( 'cols' ); this.setValue( value || '' ); }, commit : function( element ) { if ( this.getValue() ) element.setAttribute( 'cols', this.getValue() ); else element.removeAttribute( 'cols' ); } }, { id : 'rows', type : 'text', label : editor.lang.textarea.rows, 'default' : '', accessKey : 'R', style : 'width:50px', validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ), setup : function( element ) { var value = element.hasAttribute( 'rows' ) && element.getAttribute( 'rows' ); this.setValue( value || '' ); }, commit : function( element ) { if ( this.getValue() ) element.setAttribute( 'rows', this.getValue() ); else element.removeAttribute( 'rows' ); } } ] }, { id : 'value', type : 'textarea', label : editor.lang.textfield.value, 'default' : '', setup : function( element ) { this.setValue( element.$.defaultValue ); }, commit : function( element ) { element.$.value = element.$.defaultValue = this.getValue() ; } } ] } ] }; });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/forms/dialogs/textarea.js
JavaScript
gpl3
3,527
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'textfield', function( editor ) { var autoAttributes = { value : 1, size : 1, maxLength : 1 }; var acceptedTypes = { text : 1, password : 1 }; return { title : editor.lang.textfield.title, minWidth : 350, minHeight : 150, onShow : function() { delete this.textField; var element = this.getParentEditor().getSelection().getSelectedElement(); if ( element && element.getName() == "input" && ( acceptedTypes[ element.getAttribute( 'type' ) ] || !element.getAttribute( 'type' ) ) ) { this.textField = element; this.setupContent( element ); } }, onOk : function() { var editor, element = this.textField, isInsertMode = !element; if ( isInsertMode ) { editor = this.getParentEditor(); element = editor.document.createElement( 'input' ); element.setAttribute( 'type', 'text' ); } if ( isInsertMode ) editor.insertElement( element ); this.commitContent( { element : element } ); }, onLoad : function() { var autoSetup = function( element ) { var value = element.hasAttribute( this.id ) && element.getAttribute( this.id ); this.setValue( value || '' ); }; var autoCommit = function( data ) { var element = data.element; var value = this.getValue(); if ( value ) element.setAttribute( this.id, value ); else element.removeAttribute( this.id ); }; this.foreach( function( contentObj ) { if ( autoAttributes[ contentObj.id ] ) { contentObj.setup = autoSetup; contentObj.commit = autoCommit; } } ); }, contents : [ { id : 'info', label : editor.lang.textfield.title, title : editor.lang.textfield.title, elements : [ { type : 'hbox', widths : [ '50%', '50%' ], children : [ { id : '_cke_saved_name', type : 'text', label : editor.lang.textfield.name, 'default' : '', accessKey : 'N', setup : function( element ) { this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' ); }, commit : function( data ) { var element = data.element; if ( this.getValue() ) element.data( 'cke-saved-name', this.getValue() ); else { element.data( 'cke-saved-name', false ); element.removeAttribute( 'name' ); } } }, { id : 'value', type : 'text', label : editor.lang.textfield.value, 'default' : '', accessKey : 'V' } ] }, { type : 'hbox', widths : [ '50%', '50%' ], children : [ { id : 'size', type : 'text', label : editor.lang.textfield.charWidth, 'default' : '', accessKey : 'C', style : 'width:50px', validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ) }, { id : 'maxLength', type : 'text', label : editor.lang.textfield.maxChars, 'default' : '', accessKey : 'M', style : 'width:50px', validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ) } ], onLoad : function() { // Repaint the style for IE7 (#6068) if ( CKEDITOR.env.ie7Compat ) this.getElement().setStyle( 'zoom', '100%' ); } }, { id : 'type', type : 'select', label : editor.lang.textfield.type, 'default' : 'text', accessKey : 'M', items : [ [ editor.lang.textfield.typeText, 'text' ], [ editor.lang.textfield.typePass, 'password' ] ], setup : function( element ) { this.setValue( element.getAttribute( 'type' ) ); }, commit : function( data ) { var element = data.element; if ( CKEDITOR.env.ie ) { var elementType = element.getAttribute( 'type' ); var myType = this.getValue(); if ( elementType != myType ) { var replace = CKEDITOR.dom.element.createFromHtml( '<input type="' + myType + '"></input>', editor.document ); element.copyAttributes( replace, { type : 1 } ); replace.replace( element ); editor.getSelection().selectElement( replace ); data.element = replace; } } else element.setAttribute( 'type', this.getValue() ); } } ] } ] }; });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/forms/dialogs/textfield.js
JavaScript
gpl3
4,962
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'checkbox', function( editor ) { return { title : editor.lang.checkboxAndRadio.checkboxTitle, minWidth : 350, minHeight : 140, onShow : function() { delete this.checkbox; var element = this.getParentEditor().getSelection().getSelectedElement(); if ( element && element.getAttribute( 'type' ) == 'checkbox' ) { this.checkbox = element; this.setupContent( element ); } }, onOk : function() { var editor, element = this.checkbox, isInsertMode = !element; if ( isInsertMode ) { editor = this.getParentEditor(); element = editor.document.createElement( 'input' ); element.setAttribute( 'type', 'checkbox' ); editor.insertElement( element ); } this.commitContent( { element : element } ); }, contents : [ { id : 'info', label : editor.lang.checkboxAndRadio.checkboxTitle, title : editor.lang.checkboxAndRadio.checkboxTitle, startupFocus : 'txtName', elements : [ { id : 'txtName', type : 'text', label : editor.lang.common.name, 'default' : '', accessKey : 'N', setup : function( element ) { this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' ); }, commit : function( data ) { var element = data.element; // IE failed to update 'name' property on input elements, protect it now. if ( this.getValue() ) element.data( 'cke-saved-name', this.getValue() ); else { element.data( 'cke-saved-name', false ); element.removeAttribute( 'name' ); } } }, { id : 'txtValue', type : 'text', label : editor.lang.checkboxAndRadio.value, 'default' : '', accessKey : 'V', setup : function( element ) { var value = element.getAttribute( 'value' ); // IE Return 'on' as default attr value. this.setValue( CKEDITOR.env.ie && value == 'on' ? '' : value ); }, commit : function( data ) { var element = data.element, value = this.getValue(); if ( value && !( CKEDITOR.env.ie && value == 'on' ) ) element.setAttribute( 'value', value ); else { if ( CKEDITOR.env.ie ) { // Remove attribute 'value' of checkbox (#4721). var checkbox = new CKEDITOR.dom.element( 'input', element.getDocument() ); element.copyAttributes( checkbox, { value: 1 } ); checkbox.replace( element ); editor.getSelection().selectElement( checkbox ); data.element = checkbox; } else element.removeAttribute( 'value' ); } } }, { id : 'cmbSelected', type : 'checkbox', label : editor.lang.checkboxAndRadio.selected, 'default' : '', accessKey : 'S', value : "checked", setup : function( element ) { this.setValue( element.getAttribute( 'checked' ) ); }, commit : function( data ) { var element = data.element; if ( CKEDITOR.env.ie ) { var isElementChecked = !!element.getAttribute( 'checked' ), isChecked = !!this.getValue(); if ( isElementChecked != isChecked ) { var replace = CKEDITOR.dom.element.createFromHtml( '<input type="checkbox"' + ( isChecked ? ' checked="checked"' : '' ) + '/>', editor.document ); element.copyAttributes( replace, { type : 1, checked : 1 } ); replace.replace( element ); editor.getSelection().selectElement( replace ); data.element = replace; } } else { var value = this.getValue(); if ( value ) element.setAttribute( 'checked', 'checked' ); else element.removeAttribute( 'checked' ); } } } ] } ] }; });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/forms/dialogs/checkbox.js
JavaScript
gpl3
4,267
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'hiddenfield', function( editor ) { return { title : editor.lang.hidden.title, hiddenField : null, minWidth : 350, minHeight : 110, onShow : function() { delete this.hiddenField; var editor = this.getParentEditor(), selection = editor.getSelection(), element = selection.getSelectedElement(); if ( element && element.data( 'cke-real-element-type' ) && element.data( 'cke-real-element-type' ) == 'hiddenfield' ) { this.hiddenField = element; element = editor.restoreRealElement( this.hiddenField ); this.setupContent( element ); selection.selectElement( this.hiddenField ); } }, onOk : function() { var name = this.getValueOf( 'info', '_cke_saved_name' ), value = this.getValueOf( 'info', 'value' ), editor = this.getParentEditor(), element = CKEDITOR.env.ie && !( CKEDITOR.document.$.documentMode >= 8 ) ? editor.document.createElement( '<input name="' + CKEDITOR.tools.htmlEncode( name ) + '">' ) : editor.document.createElement( 'input' ); element.setAttribute( 'type', 'hidden' ); this.commitContent( element ); var fakeElement = editor.createFakeElement( element, 'cke_hidden', 'hiddenfield' ); if ( !this.hiddenField ) editor.insertElement( fakeElement ); else { fakeElement.replace( this.hiddenField ); editor.getSelection().selectElement( fakeElement ); } return true; }, contents : [ { id : 'info', label : editor.lang.hidden.title, title : editor.lang.hidden.title, elements : [ { id : '_cke_saved_name', type : 'text', label : editor.lang.hidden.name, 'default' : '', accessKey : 'N', setup : function( element ) { this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' ); }, commit : function( element ) { if ( this.getValue() ) element.setAttribute( 'name', this.getValue() ); else { element.removeAttribute( 'name' ); } } }, { id : 'value', type : 'text', label : editor.lang.hidden.value, 'default' : '', accessKey : 'V', setup : function( element ) { this.setValue( element.getAttribute( 'value' ) || '' ); }, commit : function( element ) { if ( this.getValue() ) element.setAttribute( 'value', this.getValue() ); else element.removeAttribute( 'value' ); } } ] } ] }; });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/forms/dialogs/hiddenfield.js
JavaScript
gpl3
2,811
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'form', function( editor ) { var autoAttributes = { action : 1, id : 1, method : 1, enctype : 1, target : 1 }; return { title : editor.lang.form.title, minWidth : 350, minHeight : 200, onShow : function() { delete this.form; var element = this.getParentEditor().getSelection().getStartElement(); var form = element && element.getAscendant( 'form', true ); if ( form ) { this.form = form; this.setupContent( form ); } }, onOk : function() { var editor, element = this.form, isInsertMode = !element; if ( isInsertMode ) { editor = this.getParentEditor(); element = editor.document.createElement( 'form' ); !CKEDITOR.env.ie && element.append( editor.document.createElement( 'br' ) ); } if ( isInsertMode ) editor.insertElement( element ); this.commitContent( element ); }, onLoad : function() { function autoSetup( element ) { this.setValue( element.getAttribute( this.id ) || '' ); } function autoCommit( element ) { if ( this.getValue() ) element.setAttribute( this.id, this.getValue() ); else element.removeAttribute( this.id ); } this.foreach( function( contentObj ) { if ( autoAttributes[ contentObj.id ] ) { contentObj.setup = autoSetup; contentObj.commit = autoCommit; } } ); }, contents : [ { id : 'info', label : editor.lang.form.title, title : editor.lang.form.title, elements : [ { id : 'txtName', type : 'text', label : editor.lang.common.name, 'default' : '', accessKey : 'N', setup : function( element ) { this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' ); }, commit : function( element ) { if ( this.getValue() ) element.data( 'cke-saved-name', this.getValue() ); else { element.data( 'cke-saved-name', false ); element.removeAttribute( 'name' ); } } }, { id : 'action', type : 'text', label : editor.lang.form.action, 'default' : '', accessKey : 'T' }, { type : 'hbox', widths : [ '45%', '55%' ], children : [ { id : 'id', type : 'text', label : editor.lang.common.id, 'default' : '', accessKey : 'I' }, { id : 'enctype', type : 'select', label : editor.lang.form.encoding, style : 'width:100%', accessKey : 'E', 'default' : '', items : [ [ '' ], [ 'text/plain' ], [ 'multipart/form-data' ], [ 'application/x-www-form-urlencoded' ] ] } ] }, { type : 'hbox', widths : [ '45%', '55%' ], children : [ { id : 'target', type : 'select', label : editor.lang.common.target, style : 'width:100%', accessKey : 'M', 'default' : '', items : [ [ editor.lang.common.notSet, '' ], [ editor.lang.common.targetNew, '_blank' ], [ editor.lang.common.targetTop, '_top' ], [ editor.lang.common.targetSelf, '_self' ], [ editor.lang.common.targetParent, '_parent' ] ] }, { id : 'method', type : 'select', label : editor.lang.form.method, accessKey : 'M', 'default' : 'GET', items : [ [ 'GET', 'get' ], [ 'POST', 'post' ] ] } ] } ] } ] }; });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/forms/dialogs/form.js
JavaScript
gpl3
4,016
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'select', function( editor ) { // Add a new option to a SELECT object (combo or list). function addOption( combo, optionText, optionValue, documentObject, index ) { combo = getSelect( combo ); var oOption; if ( documentObject ) oOption = documentObject.createElement( "OPTION" ); else oOption = document.createElement( "OPTION" ); if ( combo && oOption && oOption.getName() == 'option' ) { if ( CKEDITOR.env.ie ) { if ( !isNaN( parseInt( index, 10) ) ) combo.$.options.add( oOption.$, index ); else combo.$.options.add( oOption.$ ); oOption.$.innerHTML = optionText.length > 0 ? optionText : ''; oOption.$.value = optionValue; } else { if ( index !== null && index < combo.getChildCount() ) combo.getChild( index < 0 ? 0 : index ).insertBeforeMe( oOption ); else combo.append( oOption ); oOption.setText( optionText.length > 0 ? optionText : '' ); oOption.setValue( optionValue ); } } else return false; return oOption; } // Remove all selected options from a SELECT object. function removeSelectedOptions( combo ) { combo = getSelect( combo ); // Save the selected index var iSelectedIndex = getSelectedIndex( combo ); // Remove all selected options. for ( var i = combo.getChildren().count() - 1 ; i >= 0 ; i-- ) { if ( combo.getChild( i ).$.selected ) combo.getChild( i ).remove(); } // Reset the selection based on the original selected index. setSelectedIndex( combo, iSelectedIndex ); } //Modify option from a SELECT object. function modifyOption( combo, index, title, value ) { combo = getSelect( combo ); if ( index < 0 ) return false; var child = combo.getChild( index ); child.setText( title ); child.setValue( value ); return child; } function removeAllOptions( combo ) { combo = getSelect( combo ); while ( combo.getChild( 0 ) && combo.getChild( 0 ).remove() ) { /*jsl:pass*/ } } // Moves the selected option by a number of steps (also negative). function changeOptionPosition( combo, steps, documentObject ) { combo = getSelect( combo ); var iActualIndex = getSelectedIndex( combo ); if ( iActualIndex < 0 ) return false; var iFinalIndex = iActualIndex + steps; iFinalIndex = ( iFinalIndex < 0 ) ? 0 : iFinalIndex; iFinalIndex = ( iFinalIndex >= combo.getChildCount() ) ? combo.getChildCount() - 1 : iFinalIndex; if ( iActualIndex == iFinalIndex ) return false; var oOption = combo.getChild( iActualIndex ), sText = oOption.getText(), sValue = oOption.getValue(); oOption.remove(); oOption = addOption( combo, sText, sValue, ( !documentObject ) ? null : documentObject, iFinalIndex ); setSelectedIndex( combo, iFinalIndex ); return oOption; } function getSelectedIndex( combo ) { combo = getSelect( combo ); return combo ? combo.$.selectedIndex : -1; } function setSelectedIndex( combo, index ) { combo = getSelect( combo ); if ( index < 0 ) return null; var count = combo.getChildren().count(); combo.$.selectedIndex = ( index >= count ) ? ( count - 1 ) : index; return combo; } function getOptions( combo ) { combo = getSelect( combo ); return combo ? combo.getChildren() : false; } function getSelect( obj ) { if ( obj && obj.domId && obj.getInputElement().$ ) // Dialog element. return obj.getInputElement(); else if ( obj && obj.$ ) return obj; return false; } return { title : editor.lang.select.title, minWidth : CKEDITOR.env.ie ? 460 : 395, minHeight : CKEDITOR.env.ie ? 320 : 300, onShow : function() { delete this.selectBox; this.setupContent( 'clear' ); var element = this.getParentEditor().getSelection().getSelectedElement(); if ( element && element.getName() == "select" ) { this.selectBox = element; this.setupContent( element.getName(), element ); // Load Options into dialog. var objOptions = getOptions( element ); for ( var i = 0 ; i < objOptions.count() ; i++ ) this.setupContent( 'option', objOptions.getItem( i ) ); } }, onOk : function() { var editor = this.getParentEditor(), element = this.selectBox, isInsertMode = !element; if ( isInsertMode ) element = editor.document.createElement( 'select' ); this.commitContent( element ); if ( isInsertMode ) { editor.insertElement( element ); if ( CKEDITOR.env.ie ) { var sel = editor.getSelection(), bms = sel.createBookmarks(); setTimeout(function() { sel.selectBookmarks( bms ); }, 0 ); } } }, contents : [ { id : 'info', label : editor.lang.select.selectInfo, title : editor.lang.select.selectInfo, accessKey : '', elements : [ { id : 'txtName', type : 'text', widths : [ '25%','75%' ], labelLayout : 'horizontal', label : editor.lang.common.name, 'default' : '', accessKey : 'N', style : 'width:350px', setup : function( name, element ) { if ( name == 'clear' ) this.setValue( this[ 'default' ] || '' ); else if ( name == 'select' ) { this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' ); } }, commit : function( element ) { if ( this.getValue() ) element.data( 'cke-saved-name', this.getValue() ); else { element.data( 'cke-saved-name', false ); element.removeAttribute( 'name' ); } } }, { id : 'txtValue', type : 'text', widths : [ '25%','75%' ], labelLayout : 'horizontal', label : editor.lang.select.value, style : 'width:350px', 'default' : '', className : 'cke_disabled', onLoad : function() { this.getInputElement().setAttribute( 'readOnly', true ); }, setup : function( name, element ) { if ( name == 'clear' ) this.setValue( '' ); else if ( name == 'option' && element.getAttribute( 'selected' ) ) this.setValue( element.$.value ); } }, { type : 'hbox', widths : [ '175px', '170px' ], children : [ { id : 'txtSize', type : 'text', labelLayout : 'horizontal', label : editor.lang.select.size, 'default' : '', accessKey : 'S', style : 'width:175px', validate: function() { var func = CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ); return ( ( this.getValue() === '' ) || func.apply( this ) ); }, setup : function( name, element ) { if ( name == 'select' ) this.setValue( element.getAttribute( 'size' ) || '' ); if ( CKEDITOR.env.webkit ) this.getInputElement().setStyle( 'width', '86px' ); }, commit : function( element ) { if ( this.getValue() ) element.setAttribute( 'size', this.getValue() ); else element.removeAttribute( 'size' ); } }, { type : 'html', html : '<span>' + CKEDITOR.tools.htmlEncode( editor.lang.select.lines ) + '</span>' } ] }, { type : 'html', html : '<span>' + CKEDITOR.tools.htmlEncode( editor.lang.select.opAvail ) + '</span>' }, { type : 'hbox', widths : [ '115px', '115px' ,'100px' ], children : [ { type : 'vbox', children : [ { id : 'txtOptName', type : 'text', label : editor.lang.select.opText, style : 'width:115px', setup : function( name, element ) { if ( name == 'clear' ) this.setValue( "" ); } }, { type : 'select', id : 'cmbName', label : '', title : '', size : 5, style : 'width:115px;height:75px', items : [], onChange : function() { var dialog = this.getDialog(), values = dialog.getContentElement( 'info', 'cmbValue' ), optName = dialog.getContentElement( 'info', 'txtOptName' ), optValue = dialog.getContentElement( 'info', 'txtOptValue' ), iIndex = getSelectedIndex( this ); setSelectedIndex( values, iIndex ); optName.setValue( this.getValue() ); optValue.setValue( values.getValue() ); }, setup : function( name, element ) { if ( name == 'clear' ) removeAllOptions( this ); else if ( name == 'option' ) addOption( this, element.getText(), element.getText(), this.getDialog().getParentEditor().document ); }, commit : function( element ) { var dialog = this.getDialog(), optionsNames = getOptions( this ), optionsValues = getOptions( dialog.getContentElement( 'info', 'cmbValue' ) ), selectValue = dialog.getContentElement( 'info', 'txtValue' ).getValue(); removeAllOptions( element ); for ( var i = 0 ; i < optionsNames.count() ; i++ ) { var oOption = addOption( element, optionsNames.getItem( i ).getValue(), optionsValues.getItem( i ).getValue(), dialog.getParentEditor().document ); if ( optionsValues.getItem( i ).getValue() == selectValue ) { oOption.setAttribute( 'selected', 'selected' ); oOption.selected = true; } } } } ] }, { type : 'vbox', children : [ { id : 'txtOptValue', type : 'text', label : editor.lang.select.opValue, style : 'width:115px', setup : function( name, element ) { if ( name == 'clear' ) this.setValue( "" ); } }, { type : 'select', id : 'cmbValue', label : '', size : 5, style : 'width:115px;height:75px', items : [], onChange : function() { var dialog = this.getDialog(), names = dialog.getContentElement( 'info', 'cmbName' ), optName = dialog.getContentElement( 'info', 'txtOptName' ), optValue = dialog.getContentElement( 'info', 'txtOptValue' ), iIndex = getSelectedIndex( this ); setSelectedIndex( names, iIndex ); optName.setValue( names.getValue() ); optValue.setValue( this.getValue() ); }, setup : function( name, element ) { if ( name == 'clear' ) removeAllOptions( this ); else if ( name == 'option' ) { var oValue = element.getValue(); addOption( this, oValue, oValue, this.getDialog().getParentEditor().document ); if ( element.getAttribute( 'selected' ) == 'selected' ) this.getDialog().getContentElement( 'info', 'txtValue' ).setValue( oValue ); } } } ] }, { type : 'vbox', padding : 5, children : [ { type : 'button', id : 'btnAdd', style : '', label : editor.lang.select.btnAdd, title : editor.lang.select.btnAdd, style : 'width:100%;', onClick : function() { //Add new option. var dialog = this.getDialog(), parentEditor = dialog.getParentEditor(), optName = dialog.getContentElement( 'info', 'txtOptName' ), optValue = dialog.getContentElement( 'info', 'txtOptValue' ), names = dialog.getContentElement( 'info', 'cmbName' ), values = dialog.getContentElement( 'info', 'cmbValue' ); addOption(names, optName.getValue(), optName.getValue(), dialog.getParentEditor().document ); addOption(values, optValue.getValue(), optValue.getValue(), dialog.getParentEditor().document ); optName.setValue( "" ); optValue.setValue( "" ); } }, { type : 'button', id : 'btnModify', label : editor.lang.select.btnModify, title : editor.lang.select.btnModify, style : 'width:100%;', onClick : function() { //Modify selected option. var dialog = this.getDialog(), optName = dialog.getContentElement( 'info', 'txtOptName' ), optValue = dialog.getContentElement( 'info', 'txtOptValue' ), names = dialog.getContentElement( 'info', 'cmbName' ), values = dialog.getContentElement( 'info', 'cmbValue' ), iIndex = getSelectedIndex( names ); if ( iIndex >= 0 ) { modifyOption( names, iIndex, optName.getValue(), optName.getValue() ); modifyOption( values, iIndex, optValue.getValue(), optValue.getValue() ); } } }, { type : 'button', id : 'btnUp', style : 'width:100%;', label : editor.lang.select.btnUp, title : editor.lang.select.btnUp, onClick : function() { //Move up. var dialog = this.getDialog(), names = dialog.getContentElement( 'info', 'cmbName' ), values = dialog.getContentElement( 'info', 'cmbValue' ); changeOptionPosition( names, -1, dialog.getParentEditor().document ); changeOptionPosition( values, -1, dialog.getParentEditor().document ); } }, { type : 'button', id : 'btnDown', style : 'width:100%;', label : editor.lang.select.btnDown, title : editor.lang.select.btnDown, onClick : function() { //Move down. var dialog = this.getDialog(), names = dialog.getContentElement( 'info', 'cmbName' ), values = dialog.getContentElement( 'info', 'cmbValue' ); changeOptionPosition( names, 1, dialog.getParentEditor().document ); changeOptionPosition( values, 1, dialog.getParentEditor().document ); } } ] } ] }, { type : 'hbox', widths : [ '40%', '20%', '40%' ], children : [ { type : 'button', id : 'btnSetValue', label : editor.lang.select.btnSetValue, title : editor.lang.select.btnSetValue, onClick : function() { //Set as default value. var dialog = this.getDialog(), values = dialog.getContentElement( 'info', 'cmbValue' ), txtValue = dialog.getContentElement( 'info', 'txtValue' ); txtValue.setValue( values.getValue() ); } }, { type : 'button', id : 'btnDelete', label : editor.lang.select.btnDelete, title : editor.lang.select.btnDelete, onClick : function() { // Delete option. var dialog = this.getDialog(), names = dialog.getContentElement( 'info', 'cmbName' ), values = dialog.getContentElement( 'info', 'cmbValue' ), optName = dialog.getContentElement( 'info', 'txtOptName' ), optValue = dialog.getContentElement( 'info', 'txtOptValue' ); removeSelectedOptions( names ); removeSelectedOptions( values ); optName.setValue( "" ); optValue.setValue( "" ); } }, { id : 'chkMulti', type : 'checkbox', label : editor.lang.select.chkMulti, 'default' : '', accessKey : 'M', value : "checked", setup : function( name, element ) { if ( name == 'select' ) this.setValue( element.getAttribute( 'multiple' ) ); if ( CKEDITOR.env.webkit ) this.getElement().getParent().setStyle( 'vertical-align', 'middle' ); }, commit : function( element ) { if ( this.getValue() ) element.setAttribute( 'multiple', this.getValue() ); else element.removeAttribute( 'multiple' ); } } ] } ] } ] }; });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/forms/dialogs/select.js
JavaScript
gpl3
17,251
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'radio', function( editor ) { return { title : editor.lang.checkboxAndRadio.radioTitle, minWidth : 350, minHeight : 140, onShow : function() { delete this.radioButton; var element = this.getParentEditor().getSelection().getSelectedElement(); if ( element && element.getName() == 'input' && element.getAttribute( 'type' ) == 'radio' ) { this.radioButton = element; this.setupContent( element ); } }, onOk : function() { var editor, element = this.radioButton, isInsertMode = !element; if ( isInsertMode ) { editor = this.getParentEditor(); element = editor.document.createElement( 'input' ); element.setAttribute( 'type', 'radio' ); } if ( isInsertMode ) editor.insertElement( element ); this.commitContent( { element : element } ); }, contents : [ { id : 'info', label : editor.lang.checkboxAndRadio.radioTitle, title : editor.lang.checkboxAndRadio.radioTitle, elements : [ { id : 'name', type : 'text', label : editor.lang.common.name, 'default' : '', accessKey : 'N', setup : function( element ) { this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' ); }, commit : function( data ) { var element = data.element; if ( this.getValue() ) element.data( 'cke-saved-name', this.getValue() ); else { element.data( 'cke-saved-name', false ); element.removeAttribute( 'name' ); } } }, { id : 'value', type : 'text', label : editor.lang.checkboxAndRadio.value, 'default' : '', accessKey : 'V', setup : function( element ) { this.setValue( element.getAttribute( 'value' ) || '' ); }, commit : function( data ) { var element = data.element; if ( this.getValue() ) element.setAttribute( 'value', this.getValue() ); else element.removeAttribute( 'value' ); } }, { id : 'checked', type : 'checkbox', label : editor.lang.checkboxAndRadio.selected, 'default' : '', accessKey : 'S', value : "checked", setup : function( element ) { this.setValue( element.getAttribute( 'checked' ) ); }, commit : function( data ) { var element = data.element; if ( !( CKEDITOR.env.ie || CKEDITOR.env.opera ) ) { if ( this.getValue() ) element.setAttribute( 'checked', 'checked' ); else element.removeAttribute( 'checked' ); } else { var isElementChecked = element.getAttribute( 'checked' ); var isChecked = !!this.getValue(); if ( isElementChecked != isChecked ) { var replace = CKEDITOR.dom.element.createFromHtml( '<input type="radio"' + ( isChecked ? ' checked="checked"' : '' ) + '></input>', editor.document ); element.copyAttributes( replace, { type : 1, checked : 1 } ); replace.replace( element ); editor.getSelection().selectElement( replace ); data.element = replace; } } } } ] } ] }; });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/forms/dialogs/radio.js
JavaScript
gpl3
3,596
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'button', function( editor ) { function commitAttributes( element ) { var val = this.getValue(); if ( val ) { element.attributes[ this.id ] = val; if ( this.id == 'name' ) element.attributes[ 'data-cke-saved-name' ] = val; } else { delete element.attributes[ this.id ]; if ( this.id == 'name' ) delete element.attributes[ 'data-cke-saved-name' ]; } } return { title : editor.lang.button.title, minWidth : 350, minHeight : 150, onShow : function() { delete this.button; var element = this.getParentEditor().getSelection().getSelectedElement(); if ( element && element.is( 'input' ) ) { var type = element.getAttribute( 'type' ); if ( type in { button:1, reset:1, submit:1 } ) { this.button = element; this.setupContent( element ); } } }, onOk : function() { var editor = this.getParentEditor(), element = this.button, isInsertMode = !element; var fake = element ? CKEDITOR.htmlParser.fragment.fromHtml( element.getOuterHtml() ).children[ 0 ] : new CKEDITOR.htmlParser.element( 'input' ); this.commitContent( fake ); var writer = new CKEDITOR.htmlParser.basicWriter(); fake.writeHtml( writer ); var newElement = CKEDITOR.dom.element.createFromHtml( writer.getHtml(), editor.document ); if ( isInsertMode ) editor.insertElement( newElement ); else { newElement.replace( element ); editor.getSelection().selectElement( newElement ); } }, contents : [ { id : 'info', label : editor.lang.button.title, title : editor.lang.button.title, elements : [ { id : 'name', type : 'text', label : editor.lang.common.name, 'default' : '', setup : function( element ) { this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' ); }, commit : commitAttributes }, { id : 'value', type : 'text', label : editor.lang.button.text, accessKey : 'V', 'default' : '', setup : function( element ) { this.setValue( element.getAttribute( 'value' ) || '' ); }, commit : commitAttributes }, { id : 'type', type : 'select', label : editor.lang.button.type, 'default' : 'button', accessKey : 'T', items : [ [ editor.lang.button.typeBtn, 'button' ], [ editor.lang.button.typeSbm, 'submit' ], [ editor.lang.button.typeRst, 'reset' ] ], setup : function( element ) { this.setValue( element.getAttribute( 'type' ) || '' ); }, commit : commitAttributes } ] } ] }; });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/forms/dialogs/button.js
JavaScript
gpl3
3,007
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview The "filebrowser" plugin that adds support for file uploads and * browsing. * * When a file is uploaded or selected inside the file browser, its URL is * inserted automatically into a field defined in the <code>filebrowser</code> * attribute. In order to specify a field that should be updated, pass the tab ID and * the element ID, separated with a colon.<br /><br /> * * <strong>Example 1: (Browse)</strong> * * <pre> * { * type : 'button', * id : 'browse', * filebrowser : 'tabId:elementId', * label : editor.lang.common.browseServer * } * </pre> * * If you set the <code>filebrowser</code> attribute for an element other than * the <code>fileButton</code>, the <code>Browse</code> action will be triggered.<br /><br /> * * <strong>Example 2: (Quick Upload)</strong> * * <pre> * { * type : 'fileButton', * id : 'uploadButton', * filebrowser : 'tabId:elementId', * label : editor.lang.common.uploadSubmit, * 'for' : [ 'upload', 'upload' ] * } * </pre> * * If you set the <code>filebrowser</code> attribute for a <code>fileButton</code> * element, the <code>QuickUpload</code> action will be executed.<br /><br /> * * The filebrowser plugin also supports more advanced configuration performed through * a JavaScript object. * * The following settings are supported: * * <ul> * <li><code>action</code> &ndash; <code>Browse</code> or <code>QuickUpload</code>.</li> * <li><code>target</code> &ndash; the field to update in the <code><em>tabId:elementId</em></code> format.</li> * <li><code>params</code> &ndash; additional arguments to be passed to the server connector (optional).</li> * <li><code>onSelect</code> &ndash; a function to execute when the file is selected/uploaded (optional).</li> * <li><code>url</code> &ndash; the URL to be called (optional).</li> * </ul> * * <strong>Example 3: (Quick Upload)</strong> * * <pre> * { * type : 'fileButton', * label : editor.lang.common.uploadSubmit, * id : 'buttonId', * filebrowser : * { * action : 'QuickUpload', // required * target : 'tab1:elementId', // required * params : // optional * { * type : 'Files', * currentFolder : '/folder/' * }, * onSelect : function( fileUrl, errorMessage ) // optional * { * // Do not call the built-in selectFuntion. * // return false; * } * }, * 'for' : [ 'tab1', 'myFile' ] * } * </pre> * * Suppose you have a file element with an ID of <code>myFile</code>, a text * field with an ID of <code>elementId</code> and a <code>fileButton</code>. * If the <code>filebowser.url</code> attribute is not specified explicitly, * the form action will be set to <code>filebrowser[<em>DialogWindowName</em>]UploadUrl</code> * or, if not specified, to <code>filebrowserUploadUrl</code>. Additional parameters * from the <code>params</code> object will be added to the query string. It is * possible to create your own <code>uploadHandler</code> and cancel the built-in * <code>updateTargetElement</code> command.<br /><br /> * * <strong>Example 4: (Browse)</strong> * * <pre> * { * type : 'button', * id : 'buttonId', * label : editor.lang.common.browseServer, * filebrowser : * { * action : 'Browse', * url : '/ckfinder/ckfinder.html&amp;type=Images', * target : 'tab1:elementId' * } * } * </pre> * * In this example, when the button is pressed, the file browser will be opened in a * popup window. If you do not specify the <code>filebrowser.url</code> attribute, * <code>filebrowser[<em>DialogName</em>]BrowseUrl</code> or * <code>filebrowserBrowseUrl</code> will be used. After selecting a file in the file * browser, an element with an ID of <code>elementId</code> will be updated. Just * like in the third example, a custom <code>onSelect</code> function may be defined. */ ( function() { /* * Adds (additional) arguments to given url. * * @param {String} * url The url. * @param {Object} * params Additional parameters. */ function addQueryString( url, params ) { var queryString = []; if ( !params ) return url; else { for ( var i in params ) queryString.push( i + "=" + encodeURIComponent( params[ i ] ) ); } return url + ( ( url.indexOf( "?" ) != -1 ) ? "&" : "?" ) + queryString.join( "&" ); } /* * Make a string's first character uppercase. * * @param {String} * str String. */ function ucFirst( str ) { str += ''; var f = str.charAt( 0 ).toUpperCase(); return f + str.substr( 1 ); } /* * The onlick function assigned to the 'Browse Server' button. Opens the * file browser and updates target field when file is selected. * * @param {CKEDITOR.event} * evt The event object. */ function browseServer( evt ) { var dialog = this.getDialog(); var editor = dialog.getParentEditor(); editor._.filebrowserSe = this; var width = editor.config[ 'filebrowser' + ucFirst( dialog.getName() ) + 'WindowWidth' ] || editor.config.filebrowserWindowWidth || '80%'; var height = editor.config[ 'filebrowser' + ucFirst( dialog.getName() ) + 'WindowHeight' ] || editor.config.filebrowserWindowHeight || '70%'; var params = this.filebrowser.params || {}; params.CKEditor = editor.name; params.CKEditorFuncNum = editor._.filebrowserFn; if ( !params.langCode ) params.langCode = editor.langCode; var url = addQueryString( this.filebrowser.url, params ); // TODO: V4: Remove backward compatibility (#8163). editor.popup( url, width, height, editor.config.filebrowserWindowFeatures || editor.config.fileBrowserWindowFeatures ); } /* * The onlick function assigned to the 'Upload' button. Makes the final * decision whether form is really submitted and updates target field when * file is uploaded. * * @param {CKEDITOR.event} * evt The event object. */ function uploadFile( evt ) { var dialog = this.getDialog(); var editor = dialog.getParentEditor(); editor._.filebrowserSe = this; // If user didn't select the file, stop the upload. if ( !dialog.getContentElement( this[ 'for' ][ 0 ], this[ 'for' ][ 1 ] ).getInputElement().$.value ) return false; if ( !dialog.getContentElement( this[ 'for' ][ 0 ], this[ 'for' ][ 1 ] ).getAction() ) return false; return true; } /* * Setups the file element. * * @param {CKEDITOR.ui.dialog.file} * fileInput The file element used during file upload. * @param {Object} * filebrowser Object containing filebrowser settings assigned to * the fileButton associated with this file element. */ function setupFileElement( editor, fileInput, filebrowser ) { var params = filebrowser.params || {}; params.CKEditor = editor.name; params.CKEditorFuncNum = editor._.filebrowserFn; if ( !params.langCode ) params.langCode = editor.langCode; fileInput.action = addQueryString( filebrowser.url, params ); fileInput.filebrowser = filebrowser; } /* * Traverse through the content definition and attach filebrowser to * elements with 'filebrowser' attribute. * * @param String * dialogName Dialog name. * @param {CKEDITOR.dialog.definitionObject} * definition Dialog definition. * @param {Array} * elements Array of {@link CKEDITOR.dialog.definition.content} * objects. */ function attachFileBrowser( editor, dialogName, definition, elements ) { var element, fileInput; for ( var i in elements ) { element = elements[ i ]; if ( element.type == 'hbox' || element.type == 'vbox' || element.type == 'fieldset' ) attachFileBrowser( editor, dialogName, definition, element.children ); if ( !element.filebrowser ) continue; if ( typeof element.filebrowser == 'string' ) { var fb = { action : ( element.type == 'fileButton' ) ? 'QuickUpload' : 'Browse', target : element.filebrowser }; element.filebrowser = fb; } if ( element.filebrowser.action == 'Browse' ) { var url = element.filebrowser.url; if ( url === undefined ) { url = editor.config[ 'filebrowser' + ucFirst( dialogName ) + 'BrowseUrl' ]; if ( url === undefined ) url = editor.config.filebrowserBrowseUrl; } if ( url ) { element.onClick = browseServer; element.filebrowser.url = url; element.hidden = false; } } else if ( element.filebrowser.action == 'QuickUpload' && element[ 'for' ] ) { url = element.filebrowser.url; if ( url === undefined ) { url = editor.config[ 'filebrowser' + ucFirst( dialogName ) + 'UploadUrl' ]; if ( url === undefined ) url = editor.config.filebrowserUploadUrl; } if ( url ) { var onClick = element.onClick; element.onClick = function( evt ) { // "element" here means the definition object, so we need to find the correct // button to scope the event call var sender = evt.sender; if ( onClick && onClick.call( sender, evt ) === false ) return false; return uploadFile.call( sender, evt ); }; element.filebrowser.url = url; element.hidden = false; setupFileElement( editor, definition.getContents( element[ 'for' ][ 0 ] ).get( element[ 'for' ][ 1 ] ), element.filebrowser ); } } } } /* * Updates the target element with the url of uploaded/selected file. * * @param {String} * url The url of a file. */ function updateTargetElement( url, sourceElement ) { var dialog = sourceElement.getDialog(); var targetElement = sourceElement.filebrowser.target || null; // If there is a reference to targetElement, update it. if ( targetElement ) { var target = targetElement.split( ':' ); var element = dialog.getContentElement( target[ 0 ], target[ 1 ] ); if ( element ) { element.setValue( url ); dialog.selectPage( target[ 0 ] ); } } } /* * Returns true if filebrowser is configured in one of the elements. * * @param {CKEDITOR.dialog.definitionObject} * definition Dialog definition. * @param String * tabId The tab id where element(s) can be found. * @param String * elementId The element id (or ids, separated with a semicolon) to check. */ function isConfigured( definition, tabId, elementId ) { if ( elementId.indexOf( ";" ) !== -1 ) { var ids = elementId.split( ";" ); for ( var i = 0 ; i < ids.length ; i++ ) { if ( isConfigured( definition, tabId, ids[i] ) ) return true; } return false; } var elementFileBrowser = definition.getContents( tabId ).get( elementId ).filebrowser; return ( elementFileBrowser && elementFileBrowser.url ); } function setUrl( fileUrl, data ) { var dialog = this._.filebrowserSe.getDialog(), targetInput = this._.filebrowserSe[ 'for' ], onSelect = this._.filebrowserSe.filebrowser.onSelect; if ( targetInput ) dialog.getContentElement( targetInput[ 0 ], targetInput[ 1 ] ).reset(); if ( typeof data == 'function' && data.call( this._.filebrowserSe ) === false ) return; if ( onSelect && onSelect.call( this._.filebrowserSe, fileUrl, data ) === false ) return; // The "data" argument may be used to pass the error message to the editor. if ( typeof data == 'string' && data ) alert( data ); if ( fileUrl ) updateTargetElement( fileUrl, this._.filebrowserSe ); } CKEDITOR.plugins.add( 'filebrowser', { init : function( editor, pluginPath ) { editor._.filebrowserFn = CKEDITOR.tools.addFunction( setUrl, editor ); editor.on( 'destroy', function () { CKEDITOR.tools.removeFunction( this._.filebrowserFn ); } ); } } ); CKEDITOR.on( 'dialogDefinition', function( evt ) { var definition = evt.data.definition, element; // Associate filebrowser to elements with 'filebrowser' attribute. for ( var i in definition.contents ) { if ( ( element = definition.contents[ i ] ) ) { attachFileBrowser( evt.editor, evt.data.name, definition, element.elements ); if ( element.hidden && element.filebrowser ) { element.hidden = !isConfigured( definition, element[ 'id' ], element.filebrowser ); } } } } ); } )(); /** * The location of an external file browser that should be launched when the <strong>Browse Server</strong> * button is pressed. If configured, the <strong>Browse Server</strong> button will appear in the * <strong>Link</strong>, <strong>Image</strong>, and <strong>Flash</strong> dialog windows. * @see The <a href="http://docs.cksource.com/CKEditor_3.x/Developers_Guide/File_Browser_(Uploader)">File Browser/Uploader</a> documentation. * @name CKEDITOR.config.filebrowserBrowseUrl * @since 3.0 * @type String * @default <code>''</code> (empty string = disabled) * @example * config.filebrowserBrowseUrl = '/browser/browse.php'; */ /** * The location of the script that handles file uploads. * If set, the <strong>Upload</strong> tab will appear in the <strong>Link</strong>, <strong>Image</strong>, * and <strong>Flash</strong> dialog windows. * @name CKEDITOR.config.filebrowserUploadUrl * @see The <a href="http://docs.cksource.com/CKEditor_3.x/Developers_Guide/File_Browser_(Uploader)">File Browser/Uploader</a> documentation. * @since 3.0 * @type String * @default <code>''</code> (empty string = disabled) * @example * config.filebrowserUploadUrl = '/uploader/upload.php'; */ /** * The location of an external file browser that should be launched when the <strong>Browse Server</strong> * button is pressed in the <strong>Image</strong> dialog window. * If not set, CKEditor will use <code>{@link CKEDITOR.config.filebrowserBrowseUrl}</code>. * @name CKEDITOR.config.filebrowserImageBrowseUrl * @since 3.0 * @type String * @default <code>''</code> (empty string = disabled) * @example * config.filebrowserImageBrowseUrl = '/browser/browse.php?type=Images'; */ /** * The location of an external file browser that should be launched when the <strong>Browse Server</strong> * button is pressed in the <strong>Flash</strong> dialog window. * If not set, CKEditor will use <code>{@link CKEDITOR.config.filebrowserBrowseUrl}</code>. * @name CKEDITOR.config.filebrowserFlashBrowseUrl * @since 3.0 * @type String * @default <code>''</code> (empty string = disabled) * @example * config.filebrowserFlashBrowseUrl = '/browser/browse.php?type=Flash'; */ /** * The location of the script that handles file uploads in the <strong>Image</strong> dialog window. * If not set, CKEditor will use <code>{@link CKEDITOR.config.filebrowserUploadUrl}</code>. * @name CKEDITOR.config.filebrowserImageUploadUrl * @since 3.0 * @type String * @default <code>''</code> (empty string = disabled) * @example * config.filebrowserImageUploadUrl = '/uploader/upload.php?type=Images'; */ /** * The location of the script that handles file uploads in the <strong>Flash</strong> dialog window. * If not set, CKEditor will use <code>{@link CKEDITOR.config.filebrowserUploadUrl}</code>. * @name CKEDITOR.config.filebrowserFlashUploadUrl * @since 3.0 * @type String * @default <code>''</code> (empty string = disabled) * @example * config.filebrowserFlashUploadUrl = '/uploader/upload.php?type=Flash'; */ /** * The location of an external file browser that should be launched when the <strong>Browse Server</strong> * button is pressed in the <strong>Link</strong> tab of the <strong>Image</strong> dialog window. * If not set, CKEditor will use <code>{@link CKEDITOR.config.filebrowserBrowseUrl}</code>. * @name CKEDITOR.config.filebrowserImageBrowseLinkUrl * @since 3.2 * @type String * @default <code>''</code> (empty string = disabled) * @example * config.filebrowserImageBrowseLinkUrl = '/browser/browse.php'; */ /** * The features to use in the file browser popup window. * @name CKEDITOR.config.filebrowserWindowFeatures * @since 3.4.1 * @type String * @default <code>'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes'</code> * @example * config.filebrowserWindowFeatures = 'resizable=yes,scrollbars=no'; */ /** * The width of the file browser popup window. It can be a number denoting a value in * pixels or a percent string. * @name CKEDITOR.config.filebrowserWindowWidth * @type Number|String * @default <code>'80%'</code> * @example * config.filebrowserWindowWidth = 750; * @example * config.filebrowserWindowWidth = '50%'; */ /** * The height of the file browser popup window. It can be a number denoting a value in * pixels or a percent string. * @name CKEDITOR.config.filebrowserWindowHeight * @type Number|String * @default <code>'70%'</code> * @example * config.filebrowserWindowHeight = 580; * @example * config.filebrowserWindowHeight = '50%'; */
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/filebrowser/plugin.js
JavaScript
gpl3
17,560
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { var meta = { editorFocus : false, modes : { wysiwyg:1, source:1 } }; var blurCommand = { exec : function( editor ) { editor.container.focusNext( true, editor.tabIndex ); } }; var blurBackCommand = { exec : function( editor ) { editor.container.focusPrevious( true, editor.tabIndex ); } }; function selectNextCellCommand( backward ) { return { editorFocus : false, canUndo : false, modes : { wysiwyg : 1 }, exec : function( editor ) { if ( editor.focusManager.hasFocus ) { var sel = editor.getSelection(), ancestor = sel.getCommonAncestor(), cell; if ( ( cell = ( ancestor.getAscendant( 'td', true ) || ancestor.getAscendant( 'th', true ) ) ) ) { var resultRange = new CKEDITOR.dom.range( editor.document ), next = CKEDITOR.tools.tryThese( function() { var row = cell.getParent(), next = row.$.cells[ cell.$.cellIndex + ( backward ? - 1 : 1 ) ]; // Invalid any empty value. next.parentNode.parentNode; return next; }, function() { var row = cell.getParent(), table = row.getAscendant( 'table' ), nextRow = table.$.rows[ row.$.rowIndex + ( backward ? - 1 : 1 ) ]; return nextRow.cells[ backward? nextRow.cells.length -1 : 0 ]; }); // Clone one more row at the end of table and select the first newly established cell. if ( ! ( next || backward ) ) { var table = cell.getAscendant( 'table' ).$, cells = cell.getParent().$.cells; var newRow = new CKEDITOR.dom.element( table.insertRow( -1 ), editor.document ); for ( var i = 0, count = cells.length ; i < count; i++ ) { var newCell = newRow.append( new CKEDITOR.dom.element( cells[ i ], editor.document ).clone( false, false ) ); !CKEDITOR.env.ie && newCell.appendBogus(); } resultRange.moveToElementEditStart( newRow ); } else if ( next ) { next = new CKEDITOR.dom.element( next ); resultRange.moveToElementEditStart( next ); // Avoid selecting empty block makes the cursor blind. if ( !( resultRange.checkStartOfBlock() && resultRange.checkEndOfBlock() ) ) resultRange.selectNodeContents( next ); } else return true; resultRange.select( true ); return true; } } return false; } }; } CKEDITOR.plugins.add( 'tab', { requires : [ 'keystrokes' ], init : function( editor ) { var tabTools = editor.config.enableTabKeyTools !== false, tabSpaces = editor.config.tabSpaces || 0, tabText = ''; while ( tabSpaces-- ) tabText += '\xa0'; if ( tabText ) { editor.on( 'key', function( ev ) { if ( ev.data.keyCode == 9 ) // TAB { editor.insertHtml( tabText ); ev.cancel(); } }); } if ( tabTools ) { editor.on( 'key', function( ev ) { if ( ev.data.keyCode == 9 && editor.execCommand( 'selectNextCell' ) || // TAB ev.data.keyCode == ( CKEDITOR.SHIFT + 9 ) && editor.execCommand( 'selectPreviousCell' ) ) // SHIFT+TAB ev.cancel(); }); } if ( CKEDITOR.env.webkit || CKEDITOR.env.gecko ) { editor.on( 'key', function( ev ) { var keyCode = ev.data.keyCode; if ( keyCode == 9 && !tabText ) // TAB { ev.cancel(); editor.execCommand( 'blur' ); } if ( keyCode == ( CKEDITOR.SHIFT + 9 ) ) // SHIFT+TAB { editor.execCommand( 'blurBack' ); ev.cancel(); } }); } editor.addCommand( 'blur', CKEDITOR.tools.extend( blurCommand, meta ) ); editor.addCommand( 'blurBack', CKEDITOR.tools.extend( blurBackCommand, meta ) ); editor.addCommand( 'selectNextCell', selectNextCellCommand() ); editor.addCommand( 'selectPreviousCell', selectNextCellCommand( true ) ); } }); })(); /** * Moves the UI focus to the element following this element in the tabindex * order. * @example * var element = CKEDITOR.document.getById( 'example' ); * element.focusNext(); */ CKEDITOR.dom.element.prototype.focusNext = function( ignoreChildren, indexToUse ) { var $ = this.$, curTabIndex = ( indexToUse === undefined ? this.getTabIndex() : indexToUse ), passedCurrent, enteredCurrent, elected, electedTabIndex, element, elementTabIndex; if ( curTabIndex <= 0 ) { // If this element has tabindex <= 0 then we must simply look for any // element following it containing tabindex=0. element = this.getNextSourceNode( ignoreChildren, CKEDITOR.NODE_ELEMENT ); while ( element ) { if ( element.isVisible() && element.getTabIndex() === 0 ) { elected = element; break; } element = element.getNextSourceNode( false, CKEDITOR.NODE_ELEMENT ); } } else { // If this element has tabindex > 0 then we must look for: // 1. An element following this element with the same tabindex. // 2. The first element in source other with the lowest tabindex // that is higher than this element tabindex. // 3. The first element with tabindex=0. element = this.getDocument().getBody().getFirst(); while ( ( element = element.getNextSourceNode( false, CKEDITOR.NODE_ELEMENT ) ) ) { if ( !passedCurrent ) { if ( !enteredCurrent && element.equals( this ) ) { enteredCurrent = true; // Ignore this element, if required. if ( ignoreChildren ) { if ( !( element = element.getNextSourceNode( true, CKEDITOR.NODE_ELEMENT ) ) ) break; passedCurrent = 1; } } else if ( enteredCurrent && !this.contains( element ) ) passedCurrent = 1; } if ( !element.isVisible() || ( elementTabIndex = element.getTabIndex() ) < 0 ) continue; if ( passedCurrent && elementTabIndex == curTabIndex ) { elected = element; break; } if ( elementTabIndex > curTabIndex && ( !elected || !electedTabIndex || elementTabIndex < electedTabIndex ) ) { elected = element; electedTabIndex = elementTabIndex; } else if ( !elected && elementTabIndex === 0 ) { elected = element; electedTabIndex = elementTabIndex; } } } if ( elected ) elected.focus(); }; /** * Moves the UI focus to the element before this element in the tabindex order. * @example * var element = CKEDITOR.document.getById( 'example' ); * element.focusPrevious(); */ CKEDITOR.dom.element.prototype.focusPrevious = function( ignoreChildren, indexToUse ) { var $ = this.$, curTabIndex = ( indexToUse === undefined ? this.getTabIndex() : indexToUse ), passedCurrent, enteredCurrent, elected, electedTabIndex = 0, elementTabIndex; var element = this.getDocument().getBody().getLast(); while ( ( element = element.getPreviousSourceNode( false, CKEDITOR.NODE_ELEMENT ) ) ) { if ( !passedCurrent ) { if ( !enteredCurrent && element.equals( this ) ) { enteredCurrent = true; // Ignore this element, if required. if ( ignoreChildren ) { if ( !( element = element.getPreviousSourceNode( true, CKEDITOR.NODE_ELEMENT ) ) ) break; passedCurrent = 1; } } else if ( enteredCurrent && !this.contains( element ) ) passedCurrent = 1; } if ( !element.isVisible() || ( elementTabIndex = element.getTabIndex() ) < 0 ) continue; if ( curTabIndex <= 0 ) { // If this element has tabindex <= 0 then we must look for: // 1. An element before this one containing tabindex=0. // 2. The last element with the highest tabindex. if ( passedCurrent && elementTabIndex === 0 ) { elected = element; break; } if ( elementTabIndex > electedTabIndex ) { elected = element; electedTabIndex = elementTabIndex; } } else { // If this element has tabindex > 0 we must look for: // 1. An element preceeding this one, with the same tabindex. // 2. The last element in source other with the highest tabindex // that is lower than this element tabindex. if ( passedCurrent && elementTabIndex == curTabIndex ) { elected = element; break; } if ( elementTabIndex < curTabIndex && ( !elected || elementTabIndex > electedTabIndex ) ) { elected = element; electedTabIndex = elementTabIndex; } } } if ( elected ) elected.focus(); }; /** * Intructs the editor to add a number of spaces (&amp;nbsp;) to the text when * hitting the TAB key. If set to zero, the TAB key will be used to move the * cursor focus to the next element in the page, out of the editor focus. * @name CKEDITOR.config.tabSpaces * @type Number * @default 0 * @example * config.tabSpaces = 4; */ /** * Allow context-sensitive tab key behaviors, including the following scenarios: * <h5>When selection is anchored inside <b>table cells</b>:</h5> * <ul> * <li>If TAB is pressed, select the contents of the "next" cell. If in the last cell in the table, add a new row to it and focus its first cell.</li> * <li>If SHIFT+TAB is pressed, select the contents of the "previous" cell. Do nothing when it's in the first cell.</li> * </ul> * @name CKEDITOR.config.enableTabKeyTools * @type Boolean * @default true * @example * config.enableTabKeyTools = false; */ // If the TAB key is not supposed to be enabled for navigation, the following // settings could be used alternatively: // config.keystrokes.push( // [ CKEDITOR.ALT + 38 /*Arrow Up*/, 'selectPreviousCell' ], // [ CKEDITOR.ALT + 40 /*Arrow Down*/, 'selectNextCell' ] // );
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/tab/plugin.js
JavaScript
gpl3
10,104
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add( 'listblock', { requires : [ 'panel' ], onLoad : function() { CKEDITOR.ui.panel.prototype.addListBlock = function( name, definition ) { return this.addBlock( name, new CKEDITOR.ui.listBlock( this.getHolderElement(), definition ) ); }; CKEDITOR.ui.listBlock = CKEDITOR.tools.createClass( { base : CKEDITOR.ui.panel.block, $ : function( blockHolder, blockDefinition ) { blockDefinition = blockDefinition || {}; var attribs = blockDefinition.attributes || ( blockDefinition.attributes = {} ); ( this.multiSelect = !!blockDefinition.multiSelect ) && ( attribs[ 'aria-multiselectable' ] = true ); // Provide default role of 'listbox'. !attribs.role && ( attribs.role = 'listbox' ); // Call the base contructor. this.base.apply( this, arguments ); var keys = this.keys; keys[ 40 ] = 'next'; // ARROW-DOWN keys[ 9 ] = 'next'; // TAB keys[ 38 ] = 'prev'; // ARROW-UP keys[ CKEDITOR.SHIFT + 9 ] = 'prev'; // SHIFT + TAB keys[ 32 ] = CKEDITOR.env.ie ? 'mouseup' : 'click'; // SPACE CKEDITOR.env.ie && ( keys[ 13 ] = 'mouseup' ); // Manage ENTER, since onclick is blocked in IE (#8041). this._.pendingHtml = []; this._.items = {}; this._.groups = {}; }, _ : { close : function() { if ( this._.started ) { this._.pendingHtml.push( '</ul>' ); delete this._.started; } }, getClick : function() { if ( !this._.click ) { this._.click = CKEDITOR.tools.addFunction( function( value ) { var marked = true; if ( this.multiSelect ) marked = this.toggle( value ); else this.mark( value ); if ( this.onClick ) this.onClick( value, marked ); }, this ); } return this._.click; } }, proto : { add : function( value, html, title ) { var pendingHtml = this._.pendingHtml, id = CKEDITOR.tools.getNextId(); if ( !this._.started ) { pendingHtml.push( '<ul role="presentation" class=cke_panel_list>' ); this._.started = 1; this._.size = this._.size || 0; } this._.items[ value ] = id; pendingHtml.push( '<li id=', id, ' class=cke_panel_listItem role=presentation>' + '<a id="', id, '_option" _cke_focus=1 hidefocus=true' + ' title="', title || value, '"' + ' href="javascript:void(\'', value, '\')" ' + ( CKEDITOR.env.ie ? 'onclick="return false;" onmouseup' : 'onclick' ) + // #188 '="CKEDITOR.tools.callFunction(', this._.getClick(), ',\'', value, '\'); return false;"', ' role="option">', html || value, '</a>' + '</li>' ); }, startGroup : function( title ) { this._.close(); var id = CKEDITOR.tools.getNextId(); this._.groups[ title ] = id; this._.pendingHtml.push( '<h1 role="presentation" id=', id, ' class=cke_panel_grouptitle>', title, '</h1>' ); }, commit : function() { this._.close(); this.element.appendHtml( this._.pendingHtml.join( '' ) ); delete this._.size; this._.pendingHtml = []; }, toggle : function( value ) { var isMarked = this.isMarked( value ); if ( isMarked ) this.unmark( value ); else this.mark( value ); return !isMarked; }, hideGroup : function( groupTitle ) { var group = this.element.getDocument().getById( this._.groups[ groupTitle ] ), list = group && group.getNext(); if ( group ) { group.setStyle( 'display', 'none' ); if ( list && list.getName() == 'ul' ) list.setStyle( 'display', 'none' ); } }, hideItem : function( value ) { this.element.getDocument().getById( this._.items[ value ] ).setStyle( 'display', 'none' ); }, showAll : function() { var items = this._.items, groups = this._.groups, doc = this.element.getDocument(); for ( var value in items ) { doc.getById( items[ value ] ).setStyle( 'display', '' ); } for ( var title in groups ) { var group = doc.getById( groups[ title ] ), list = group.getNext(); group.setStyle( 'display', '' ); if ( list && list.getName() == 'ul' ) list.setStyle( 'display', '' ); } }, mark : function( value ) { if ( !this.multiSelect ) this.unmarkAll(); var itemId = this._.items[ value ], item = this.element.getDocument().getById( itemId ); item.addClass( 'cke_selected' ); this.element.getDocument().getById( itemId + '_option' ).setAttribute( 'aria-selected', true ); this.onMark && this.onMark( item ); }, unmark : function( value ) { var doc = this.element.getDocument(), itemId = this._.items[ value ], item = doc.getById( itemId ); item.removeClass( 'cke_selected' ); doc.getById( itemId + '_option' ).removeAttribute( 'aria-selected' ); this.onUnmark && this.onUnmark( item ); }, unmarkAll : function() { var items = this._.items, doc = this.element.getDocument(); for ( var value in items ) { var itemId = items[ value ]; doc.getById( itemId ).removeClass( 'cke_selected' ); doc.getById( itemId + '_option' ).removeAttribute( 'aria-selected' ); } this.onUnmark && this.onUnmark(); }, isMarked : function( value ) { return this.element.getDocument().getById( this._.items[ value ] ).hasClass( 'cke_selected' ); }, focus : function( value ) { this._.focusIndex = -1; if ( value ) { var selected = this.element.getDocument().getById( this._.items[ value ] ).getFirst(); var links = this.element.getElementsByTag( 'a' ), link, i = -1; while ( ( link = links.getItem( ++i ) ) ) { if ( link.equals( selected ) ) { this._.focusIndex = i; break; } } setTimeout( function() { selected.focus(); }, 0 ); } } } }); } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/listblock/plugin.js
JavaScript
gpl3
6,772
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @file DOM iterator, which iterates over list items, lines and paragraphs. */ CKEDITOR.plugins.add( 'domiterator' ); (function() { /** * @name CKEDITOR.dom.iterator */ function iterator( range ) { if ( arguments.length < 1 ) return; this.range = range; this.forceBrBreak = 0; // Whether include <br>s into the enlarged range.(#3730). this.enlargeBr = 1; this.enforceRealBlocks = 0; this._ || ( this._ = {} ); } var beginWhitespaceRegex = /^[\r\n\t ]+$/, // Ignore bookmark nodes.(#3783) bookmarkGuard = CKEDITOR.dom.walker.bookmark( false, true ), whitespacesGuard = CKEDITOR.dom.walker.whitespaces( true ), skipGuard = function( node ) { return bookmarkGuard( node ) && whitespacesGuard( node ); }; // Get a reference for the next element, bookmark nodes are skipped. function getNextSourceNode( node, startFromSibling, lastNode ) { var next = node.getNextSourceNode( startFromSibling, null, lastNode ); while ( !bookmarkGuard( next ) ) next = next.getNextSourceNode( startFromSibling, null, lastNode ); return next; } iterator.prototype = { getNextParagraph : function( blockTag ) { // The block element to be returned. var block; // The range object used to identify the paragraph contents. var range; // Indicats that the current element in the loop is the last one. var isLast; // Indicate at least one of the range boundaries is inside a preformat block. var touchPre; // Instructs to cleanup remaining BRs. var removePreviousBr, removeLastBr; // This is the first iteration. Let's initialize it. if ( !this._.started ) { range = this.range.clone(); // Shrink the range to exclude harmful "noises" (#4087, #4450, #5435). range.shrink( CKEDITOR.NODE_ELEMENT, true ); touchPre = range.endContainer.hasAscendant( 'pre', true ) || range.startContainer.hasAscendant( 'pre', true ); range.enlarge( this.forceBrBreak && !touchPre || !this.enlargeBr ? CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS : CKEDITOR.ENLARGE_BLOCK_CONTENTS ); if ( !range.collapsed ) { var walker = new CKEDITOR.dom.walker( range.clone() ), ignoreBookmarkTextEvaluator = CKEDITOR.dom.walker.bookmark( true, true ); // Avoid anchor inside bookmark inner text. walker.evaluator = ignoreBookmarkTextEvaluator; this._.nextNode = walker.next(); // TODO: It's better to have walker.reset() used here. walker = new CKEDITOR.dom.walker( range.clone() ); walker.evaluator = ignoreBookmarkTextEvaluator; var lastNode = walker.previous(); this._.lastNode = lastNode.getNextSourceNode( true ); // We may have an empty text node at the end of block due to [3770]. // If that node is the lastNode, it would cause our logic to leak to the // next block.(#3887) if ( this._.lastNode && this._.lastNode.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.trim( this._.lastNode.getText() ) && this._.lastNode.getParent().isBlockBoundary() ) { var testRange = new CKEDITOR.dom.range( range.document ); testRange.moveToPosition( this._.lastNode, CKEDITOR.POSITION_AFTER_END ); if ( testRange.checkEndOfBlock() ) { var path = new CKEDITOR.dom.elementPath( testRange.endContainer ); var lastBlock = path.block || path.blockLimit; this._.lastNode = lastBlock.getNextSourceNode( true ); } } // Probably the document end is reached, we need a marker node. if ( !this._.lastNode ) { this._.lastNode = this._.docEndMarker = range.document.createText( '' ); this._.lastNode.insertAfter( lastNode ); } // Let's reuse this variable. range = null; } this._.started = 1; } var currentNode = this._.nextNode; lastNode = this._.lastNode; this._.nextNode = null; while ( currentNode ) { // closeRange indicates that a paragraph boundary has been found, // so the range can be closed. var closeRange = 0, parentPre = currentNode.hasAscendant( 'pre' ); // includeNode indicates that the current node is good to be part // of the range. By default, any non-element node is ok for it. var includeNode = ( currentNode.type != CKEDITOR.NODE_ELEMENT ), continueFromSibling = 0; // If it is an element node, let's check if it can be part of the // range. if ( !includeNode ) { var nodeName = currentNode.getName(); if ( currentNode.isBlockBoundary( this.forceBrBreak && !parentPre && { br : 1 } ) ) { // <br> boundaries must be part of the range. It will // happen only if ForceBrBreak. if ( nodeName == 'br' ) includeNode = 1; else if ( !range && !currentNode.getChildCount() && nodeName != 'hr' ) { // If we have found an empty block, and haven't started // the range yet, it means we must return this block. block = currentNode; isLast = currentNode.equals( lastNode ); break; } // The range must finish right before the boundary, // including possibly skipped empty spaces. (#1603) if ( range ) { range.setEndAt( currentNode, CKEDITOR.POSITION_BEFORE_START ); // The found boundary must be set as the next one at this // point. (#1717) if ( nodeName != 'br' ) this._.nextNode = currentNode; } closeRange = 1; } else { // If we have child nodes, let's check them. if ( currentNode.getFirst() ) { // If we don't have a range yet, let's start it. if ( !range ) { range = new CKEDITOR.dom.range( this.range.document ); range.setStartAt( currentNode, CKEDITOR.POSITION_BEFORE_START ); } currentNode = currentNode.getFirst(); continue; } includeNode = 1; } } else if ( currentNode.type == CKEDITOR.NODE_TEXT ) { // Ignore normal whitespaces (i.e. not including &nbsp; or // other unicode whitespaces) before/after a block node. if ( beginWhitespaceRegex.test( currentNode.getText() ) ) includeNode = 0; } // The current node is good to be part of the range and we are // starting a new range, initialize it first. if ( includeNode && !range ) { range = new CKEDITOR.dom.range( this.range.document ); range.setStartAt( currentNode, CKEDITOR.POSITION_BEFORE_START ); } // The last node has been found. isLast = ( ( !closeRange || includeNode ) && currentNode.equals( lastNode ) ); // If we are in an element boundary, let's check if it is time // to close the range, otherwise we include the parent within it. if ( range && !closeRange ) { while ( !currentNode.getNext( skipGuard ) && !isLast ) { var parentNode = currentNode.getParent(); if ( parentNode.isBlockBoundary( this.forceBrBreak && !parentPre && { br : 1 } ) ) { closeRange = 1; includeNode = 0; isLast = isLast || ( parentNode.equals( lastNode) ); // Make sure range includes bookmarks at the end of the block. (#7359) range.setEndAt( parentNode, CKEDITOR.POSITION_BEFORE_END ); break; } currentNode = parentNode; includeNode = 1; isLast = ( currentNode.equals( lastNode ) ); continueFromSibling = 1; } } // Now finally include the node. if ( includeNode ) range.setEndAt( currentNode, CKEDITOR.POSITION_AFTER_END ); currentNode = getNextSourceNode ( currentNode, continueFromSibling, lastNode ); isLast = !currentNode; // We have found a block boundary. Let's close the range and move out of the // loop. if ( isLast || ( closeRange && range ) ) break; } // Now, based on the processed range, look for (or create) the block to be returned. if ( !block ) { // If no range has been found, this is the end. if ( !range ) { this._.docEndMarker && this._.docEndMarker.remove(); this._.nextNode = null; return null; } var startPath = new CKEDITOR.dom.elementPath( range.startContainer ); var startBlockLimit = startPath.blockLimit, checkLimits = { div : 1, th : 1, td : 1 }; block = startPath.block; if ( !block && !this.enforceRealBlocks && checkLimits[ startBlockLimit.getName() ] && range.checkStartOfBlock() && range.checkEndOfBlock() ) block = startBlockLimit; else if ( !block || ( this.enforceRealBlocks && block.getName() == 'li' ) ) { // Create the fixed block. block = this.range.document.createElement( blockTag || 'p' ); // Move the contents of the temporary range to the fixed block. range.extractContents().appendTo( block ); block.trim(); // Insert the fixed block into the DOM. range.insertNode( block ); removePreviousBr = removeLastBr = true; } else if ( block.getName() != 'li' ) { // If the range doesn't includes the entire contents of the // block, we must split it, isolating the range in a dedicated // block. if ( !range.checkStartOfBlock() || !range.checkEndOfBlock() ) { // The resulting block will be a clone of the current one. block = block.clone( false ); // Extract the range contents, moving it to the new block. range.extractContents().appendTo( block ); block.trim(); // Split the block. At this point, the range will be in the // right position for our intents. var splitInfo = range.splitBlock(); removePreviousBr = !splitInfo.wasStartOfBlock; removeLastBr = !splitInfo.wasEndOfBlock; // Insert the new block into the DOM. range.insertNode( block ); } } else if ( !isLast ) { // LIs are returned as is, with all their children (due to the // nested lists). But, the next node is the node right after // the current range, which could be an <li> child (nested // lists) or the next sibling <li>. this._.nextNode = ( block.equals( lastNode ) ? null : getNextSourceNode( range.getBoundaryNodes().endNode, 1, lastNode ) ); } } if ( removePreviousBr ) { var previousSibling = block.getPrevious(); if ( previousSibling && previousSibling.type == CKEDITOR.NODE_ELEMENT ) { if ( previousSibling.getName() == 'br' ) previousSibling.remove(); else if ( previousSibling.getLast() && previousSibling.getLast().$.nodeName.toLowerCase() == 'br' ) previousSibling.getLast().remove(); } } if ( removeLastBr ) { var lastChild = block.getLast(); if ( lastChild && lastChild.type == CKEDITOR.NODE_ELEMENT && lastChild.getName() == 'br' ) { // Take care not to remove the block expanding <br> in non-IE browsers. if ( CKEDITOR.env.ie || lastChild.getPrevious( bookmarkGuard ) || lastChild.getNext( bookmarkGuard ) ) lastChild.remove(); } } // Get a reference for the next element. This is important because the // above block can be removed or changed, so we can rely on it for the // next interation. if ( !this._.nextNode ) { this._.nextNode = ( isLast || block.equals( lastNode ) || !lastNode ) ? null : getNextSourceNode( block, 1, lastNode ); } return block; } }; CKEDITOR.dom.range.prototype.createIterator = function() { return new iterator( this ); }; })();
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/domiterator/plugin.js
JavaScript
gpl3
12,003
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview The "placeholder" plugin. * */ (function() { var placeholderReplaceRegex = /\[\[[^\]]+\]\]/g; CKEDITOR.plugins.add( 'placeholder', { requires : [ 'dialog' ], lang : [ 'bg', 'cs', 'cy', 'da', 'de', 'el', 'en', 'eo', 'et', 'fa', 'fi', 'fr', 'he', 'hr', 'it', 'nb', 'nl', 'no', 'pl', 'tr', 'ug', 'uk', 'vi', 'zh-cn' ], init : function( editor ) { var lang = editor.lang.placeholder; editor.addCommand( 'createplaceholder', new CKEDITOR.dialogCommand( 'createplaceholder' ) ); editor.addCommand( 'editplaceholder', new CKEDITOR.dialogCommand( 'editplaceholder' ) ); editor.ui.addButton( 'CreatePlaceholder', { label : lang.toolbar, command :'createplaceholder', icon : this.path + 'placeholder.gif' }); if ( editor.addMenuItems ) { editor.addMenuGroup( 'placeholder', 20 ); editor.addMenuItems( { editplaceholder : { label : lang.edit, command : 'editplaceholder', group : 'placeholder', order : 1, icon : this.path + 'placeholder.gif' } } ); if ( editor.contextMenu ) { editor.contextMenu.addListener( function( element, selection ) { if ( !element || !element.data( 'cke-placeholder' ) ) return null; return { editplaceholder : CKEDITOR.TRISTATE_OFF }; } ); } } editor.on( 'doubleclick', function( evt ) { if ( CKEDITOR.plugins.placeholder.getSelectedPlaceHoder( editor ) ) evt.data.dialog = 'editplaceholder'; }); editor.addCss( '.cke_placeholder' + '{' + 'background-color: #ffff00;' + ( CKEDITOR.env.gecko ? 'cursor: default;' : '' ) + '}' ); editor.on( 'contentDom', function() { editor.document.getBody().on( 'resizestart', function( evt ) { if ( editor.getSelection().getSelectedElement().data( 'cke-placeholder' ) ) evt.data.preventDefault(); }); }); CKEDITOR.dialog.add( 'createplaceholder', this.path + 'dialogs/placeholder.js' ); CKEDITOR.dialog.add( 'editplaceholder', this.path + 'dialogs/placeholder.js' ); }, afterInit : function( editor ) { var dataProcessor = editor.dataProcessor, dataFilter = dataProcessor && dataProcessor.dataFilter, htmlFilter = dataProcessor && dataProcessor.htmlFilter; if ( dataFilter ) { dataFilter.addRules( { text : function( text ) { return text.replace( placeholderReplaceRegex, function( match ) { return CKEDITOR.plugins.placeholder.createPlaceholder( editor, null, match, 1 ); }); } }); } if ( htmlFilter ) { htmlFilter.addRules( { elements : { 'span' : function( element ) { if ( element.attributes && element.attributes[ 'data-cke-placeholder' ] ) delete element.name; } } }); } } }); })(); CKEDITOR.plugins.placeholder = { createPlaceholder : function( editor, oldElement, text, isGet ) { var element = new CKEDITOR.dom.element( 'span', editor.document ); element.setAttributes( { contentEditable : 'false', 'data-cke-placeholder' : 1, 'class' : 'cke_placeholder' } ); text && element.setText( text ); if ( isGet ) return element.getOuterHtml(); if ( oldElement ) { if ( CKEDITOR.env.ie ) { element.insertAfter( oldElement ); // Some time is required for IE before the element is removed. setTimeout( function() { oldElement.remove(); element.focus(); }, 10 ); } else element.replace( oldElement ); } else editor.insertElement( element ); return null; }, getSelectedPlaceHoder : function( editor ) { var range = editor.getSelection().getRanges()[ 0 ]; range.shrink( CKEDITOR.SHRINK_TEXT ); var node = range.startContainer; while( node && !( node.type == CKEDITOR.NODE_ELEMENT && node.data( 'cke-placeholder' ) ) ) node = node.getParent(); return node; } };
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/plugin.js
JavaScript
gpl3
4,308
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'cy', { placeholder : { title : 'Priodweddau\'r Daliwr Geiriau', toolbar : 'Creu Daliwr Geiriau', text : 'Testun y Daliwr Geiriau', edit : 'Golygu\'r Dailwr Geiriau', textMissing : 'Mae\'n rhaid i\'r daliwr geiriau gynnwys testun.' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/cy.js
JavaScript
gpl3
461
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'tr', { placeholder : { title : 'Yer tutucu özellikleri', toolbar : 'Yer tutucu oluşturun', text : 'Yer tutucu metini', edit : 'Yer tutucuyu düzenle', textMissing : 'Yer tutucu metin içermelidir.' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/tr.js
JavaScript
gpl3
430
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'nb', { placeholder : { title : 'Egenskaper for plassholder', toolbar : 'Opprett plassholder', text : 'Tekst for plassholder', edit : 'Rediger plassholder', textMissing : 'Plassholderen må inneholde tekst.' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/nb.js
JavaScript
gpl3
437
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'fr', { placeholder : { title : 'Propriétés de l\'Espace réservé', toolbar : 'Créer l\'Espace réservé', text : 'Texte de l\'Espace réservé', edit : 'Modifier l\'Espace réservé', textMissing : 'L\'Espace réservé doit contenir du texte.' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/fr.js
JavaScript
gpl3
478
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'fa', { placeholder : { title : 'ویژگیهای محل نگهداری', toolbar : 'ایجاد یک محل نگهداری', text : 'متن محل نگهداری', edit : 'ویرایش محل نگهداری', textMissing : 'محل نگهداری باید محتوی متن باشد.' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/fa.js
JavaScript
gpl3
513
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'eo', { placeholder : { title : 'Atributoj de la rezervita spaco', toolbar : 'Krei la rezervitan spacon', text : 'Texto de la rezervita spaco', edit : 'Modifi la rezervitan spacon', textMissing : 'La rezervita spaco devas enteni tekston.' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/eo.js
JavaScript
gpl3
468
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'uk', { placeholder : { title : 'Налаштування Заповнювача', toolbar : 'Створити Заповнювач', text : 'Текст Заповнювача', edit : 'Редагувати Заповнювач', textMissing : 'Заповнювач повинен містити текст.' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/uk.js
JavaScript
gpl3
538
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'he', { placeholder : { title : 'מאפייני שומר מקום', toolbar : 'צור שומר מקום', text : 'תוכן שומר המקום', edit : 'ערוך שומר מקום', textMissing : 'שומר המקום חייב להכיל טקסט.' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/he.js
JavaScript
gpl3
477
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'de', { placeholder : { title : 'Platzhalter Einstellungen', toolbar : 'Platzhalter erstellen', text : 'Platzhalter Text', edit : 'Platzhalter bearbeiten', textMissing : 'Der Platzhalter muss einen Text beinhalten.' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/de.js
JavaScript
gpl3
445
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'no', { placeholder : { title : 'Egenskaper for plassholder', toolbar : 'Opprett plassholder', text : 'Tekst for plassholder', edit : 'Rediger plassholder', textMissing : 'Plassholderen må inneholde tekst.' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/no.js
JavaScript
gpl3
437
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'el', { placeholder : { title : 'Ιδιότητες Υποκατάστατου Κειμένου', toolbar : 'Δημιουργία Υποκατάσταστου Κειμένου', text : 'Υποκαθιστόμενο Κείμενο', edit : 'Επεξεργασία Υποκατάσταστου Κειμένου', textMissing : 'Πρέπει να υπάρχει υποκαθιστόμενο κείμενο.' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/el.js
JavaScript
gpl3
634
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'vi', { placeholder : { title : 'Thuộc tính đặt chỗ', toolbar : 'Tạo đặt chỗ', text : 'Văn bản đặt chỗ', edit : 'Edit Placeholder', // MISSING textMissing : 'The placeholder must contain text.' // MISSING } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/vi.js
JavaScript
gpl3
457
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'it', { placeholder : { title : 'Proprietà segnaposto', toolbar : 'Crea segnaposto', text : 'Testo segnaposto', edit : 'Modifica segnaposto', textMissing : 'Il segnaposto deve contenere del testo.' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/it.js
JavaScript
gpl3
428
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'nl', { placeholder : { title : 'Eigenschappen placeholder', toolbar : 'Placeholder aanmaken', text : 'Placeholder tekst', edit : 'Placeholder wijzigen', textMissing : 'De placeholder moet tekst bevatten.' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/nl.js
JavaScript
gpl3
435
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'da', { placeholder : { title : 'Egenskaber for pladsholder', toolbar : 'Opret pladsholder', text : 'Tekst til pladsholder', edit : 'Rediger pladsholder', textMissing : 'Pladsholder skal indeholde tekst' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/da.js
JavaScript
gpl3
433
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'et', { placeholder : { title : 'Kohahoidja omadused', toolbar : 'Kohahoidja loomine', text : 'Kohahoidja tekst', edit : 'Kohahoidja muutmine', textMissing : 'Kohahoidja peab sisaldama teksti.' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/et.js
JavaScript
gpl3
423
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'pl', { placeholder : { title : 'Właściwości wypełniacza', toolbar : 'Utwórz wypełniacz', text : 'Tekst wypełnienia', edit : 'Edytuj wypełnienie', textMissing : 'Wypełnienie musi posiadać jakiś tekst.' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/pl.js
JavaScript
gpl3
442
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'cs', { placeholder : { title : 'Vlastnosti vyhrazeného prostoru', toolbar : 'Vytvořit vyhrazený prostor', text : 'Vyhrazený text', edit : 'Upravit vyhrazený prostor', textMissing : 'Vyhrazený prostor musí obsahovat text.' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/cs.js
JavaScript
gpl3
459
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'hr', { placeholder : { title : 'Svojstva rezerviranog mjesta', toolbar : 'Napravi rezervirano mjesto', text : 'Tekst rezerviranog mjesta', edit : 'Uredi rezervirano mjesto', textMissing : 'Rezervirano mjesto mora sadržavati tekst.' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/hr.js
JavaScript
gpl3
463
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'fi', { placeholder : { title : 'Paikkamerkin ominaisuudet', toolbar : 'Luo paikkamerkki', text : 'Paikkamerkin teksti', edit : 'Muokkaa paikkamerkkiä', textMissing : 'Paikkamerkin täytyy sisältää tekstiä' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/fi.js
JavaScript
gpl3
441
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'ug', { placeholder : { title : 'ئورۇن بەلگە خاسلىقى', toolbar : 'ئورۇن بەلگە قۇر', text : 'ئورۇن بەلگە تېكىستى', edit : 'ئورۇن بەلگە تەھرىر', textMissing : 'ئورۇن بەلگىسىدە چوقۇم تېكىست بولۇشى لازىم' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/ug.js
JavaScript
gpl3
529
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'zh-cn', { placeholder : { title : '占位符属性', toolbar : '创建占位符', text : '占位符文字', edit : '编辑占位符', textMissing : '占位符必需包含有文字' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/zh-cn.js
JavaScript
gpl3
411
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'bg', { placeholder : { title : 'Настройки на контейнера', toolbar : 'Нов контейнер', text : 'Текст за контейнера', edit : 'Промяна на контейнер', textMissing : 'Контейнера трябва да съдържа текст.' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/bg.js
JavaScript
gpl3
526
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'placeholder', 'en', { placeholder : { title : 'Placeholder Properties', toolbar : 'Create Placeholder', text : 'Placeholder Text', edit : 'Edit Placeholder', textMissing : 'The placeholder must contain text.' } });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/lang/en.js
JavaScript
gpl3
424
/* * Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { function placeholderDialog( editor, isEdit ) { var lang = editor.lang.placeholder, generalLabel = editor.lang.common.generalTab; return { title : lang.title, minWidth : 300, minHeight : 80, contents : [ { id : 'info', label : generalLabel, title : generalLabel, elements : [ { id : 'text', type : 'text', style : 'width: 100%;', label : lang.text, 'default' : '', required : true, validate : CKEDITOR.dialog.validate.notEmpty( lang.textMissing ), setup : function( element ) { if ( isEdit ) this.setValue( element.getText().slice( 2, -2 ) ); }, commit : function( element ) { var text = '[[' + this.getValue() + ']]'; // The placeholder must be recreated. CKEDITOR.plugins.placeholder.createPlaceholder( editor, element, text ); } } ] } ], onShow : function() { if ( isEdit ) this._element = CKEDITOR.plugins.placeholder.getSelectedPlaceHoder( editor ); this.setupContent( this._element ); }, onOk : function() { this.commitContent( this._element ); delete this._element; } }; } CKEDITOR.dialog.add( 'createplaceholder', function( editor ) { return placeholderDialog( editor ); }); CKEDITOR.dialog.add( 'editplaceholder', function( editor ) { return placeholderDialog( editor, 1 ); }); } )();
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/placeholder/dialogs/placeholder.js
JavaScript
gpl3
1,704
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add( 'floatpanel', { requires : [ 'panel' ] }); (function() { var panels = {}; var isShowing = false; function getPanel( editor, doc, parentElement, definition, level ) { // Generates the panel key: docId-eleId-skinName-langDir[-uiColor][-CSSs][-level] var key = CKEDITOR.tools.genKey( doc.getUniqueId(), parentElement.getUniqueId(), editor.skinName, editor.lang.dir, editor.uiColor || '', definition.css || '', level || '' ); var panel = panels[ key ]; if ( !panel ) { panel = panels[ key ] = new CKEDITOR.ui.panel( doc, definition ); panel.element = parentElement.append( CKEDITOR.dom.element.createFromHtml( panel.renderHtml( editor ), doc ) ); panel.element.setStyles( { display : 'none', position : 'absolute' }); } return panel; } CKEDITOR.ui.floatPanel = CKEDITOR.tools.createClass( { $ : function( editor, parentElement, definition, level ) { definition.forceIFrame = 1; var doc = parentElement.getDocument(), panel = getPanel( editor, doc, parentElement, definition, level || 0 ), element = panel.element, iframe = element.getFirst().getFirst(); // Disable native browser menu. (#4825) element.disableContextMenu(); this.element = element; this._ = { editor : editor, // The panel that will be floating. panel : panel, parentElement : parentElement, definition : definition, document : doc, iframe : iframe, children : [], dir : editor.lang.dir }; editor.on( 'mode', function(){ this.hide(); }, this ); }, proto : { addBlock : function( name, block ) { return this._.panel.addBlock( name, block ); }, addListBlock : function( name, multiSelect ) { return this._.panel.addListBlock( name, multiSelect ); }, getBlock : function( name ) { return this._.panel.getBlock( name ); }, /* corner (LTR): 1 = top-left 2 = top-right 3 = bottom-right 4 = bottom-left corner (RTL): 1 = top-right 2 = top-left 3 = bottom-left 4 = bottom-right */ showBlock : function( name, offsetParent, corner, offsetX, offsetY ) { var panel = this._.panel, block = panel.showBlock( name ); this.allowBlur( false ); isShowing = 1; // Record from where the focus is when open panel. this._.returnFocus = this._.editor.focusManager.hasFocus ? this._.editor : new CKEDITOR.dom.element( CKEDITOR.document.$.activeElement ); var element = this.element, iframe = this._.iframe, definition = this._.definition, position = offsetParent.getDocumentPosition( element.getDocument() ), rtl = this._.dir == 'rtl'; var left = position.x + ( offsetX || 0 ), top = position.y + ( offsetY || 0 ); // Floating panels are off by (-1px, 0px) in RTL mode. (#3438) if ( rtl && ( corner == 1 || corner == 4 ) ) left += offsetParent.$.offsetWidth; else if ( !rtl && ( corner == 2 || corner == 3 ) ) left += offsetParent.$.offsetWidth - 1; if ( corner == 3 || corner == 4 ) top += offsetParent.$.offsetHeight - 1; // Memorize offsetParent by it's ID. this._.panel._.offsetParentId = offsetParent.getId(); element.setStyles( { top : top + 'px', left: 0, display : '' }); // Don't use display or visibility style because we need to // calculate the rendering layout later and focus the element. element.setOpacity( 0 ); // To allow the context menu to decrease back their width element.getFirst().removeStyle( 'width' ); // Configure the IFrame blur event. Do that only once. if ( !this._.blurSet ) { // Non IE prefer the event into a window object. var focused = CKEDITOR.env.ie ? iframe : new CKEDITOR.dom.window( iframe.$.contentWindow ); // With addEventListener compatible browsers, we must // useCapture when registering the focus/blur events to // guarantee they will be firing in all situations. (#3068, #3222 ) CKEDITOR.event.useCapture = true; focused.on( 'blur', function( ev ) { if ( !this.allowBlur() ) return; // As we are using capture to register the listener, // the blur event may get fired even when focusing // inside the window itself, so we must ensure the // target is out of it. var target = ev.data.getTarget() ; if ( target.getName && target.getName() != 'iframe' ) return; if ( this.visible && !this._.activeChild && !isShowing ) { // Panel close is caused by user's navigating away the focus, e.g. click outside the panel. // DO NOT restore focus in this case. delete this._.returnFocus; this.hide(); } }, this ); focused.on( 'focus', function() { this._.focused = true; this.hideChild(); this.allowBlur( true ); }, this ); CKEDITOR.event.useCapture = false; this._.blurSet = 1; } panel.onEscape = CKEDITOR.tools.bind( function( keystroke ) { if ( this.onEscape && this.onEscape( keystroke ) === false ) return false; }, this ); CKEDITOR.tools.setTimeout( function() { var panelLoad = CKEDITOR.tools.bind( function () { var target = element.getFirst(); if ( block.autoSize ) { // We must adjust first the width or IE6 could include extra lines in the height computation var widthNode = block.element.$; if ( CKEDITOR.env.gecko || CKEDITOR.env.opera ) widthNode = widthNode.parentNode; if ( CKEDITOR.env.ie ) widthNode = widthNode.document.body; var width = widthNode.scrollWidth; // Account for extra height needed due to IE quirks box model bug: // http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug // (#3426) if ( CKEDITOR.env.ie && CKEDITOR.env.quirks && width > 0 ) width += ( target.$.offsetWidth || 0 ) - ( target.$.clientWidth || 0 ) + 3; // A little extra at the end. // If not present, IE6 might break into the next line, but also it looks better this way width += 4 ; target.setStyle( 'width', width + 'px' ); // IE doesn't compute the scrollWidth if a filter is applied previously block.element.addClass( 'cke_frameLoaded' ); var height = block.element.$.scrollHeight; // Account for extra height needed due to IE quirks box model bug: // http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug // (#3426) if ( CKEDITOR.env.ie && CKEDITOR.env.quirks && height > 0 ) height += ( target.$.offsetHeight || 0 ) - ( target.$.clientHeight || 0 ) + 3; target.setStyle( 'height', height + 'px' ); // Fix IE < 8 visibility. panel._.currentBlock.element.setStyle( 'display', 'none' ).removeStyle( 'display' ); } else target.removeStyle( 'height' ); // Flip panel layout horizontally in RTL with known width. if ( rtl ) left -= element.$.offsetWidth; // Pop the style now for measurement. element.setStyle( 'left', left + 'px' ); /* panel layout smartly fit the viewport size. */ var panelElement = panel.element, panelWindow = panelElement.getWindow(), rect = element.$.getBoundingClientRect(), viewportSize = panelWindow.getViewPaneSize(); // Compensation for browsers that dont support "width" and "height". var rectWidth = rect.width || rect.right - rect.left, rectHeight = rect.height || rect.bottom - rect.top; // Check if default horizontal layout is impossible. var spaceAfter = rtl ? rect.right : viewportSize.width - rect.left, spaceBefore = rtl ? viewportSize.width - rect.right : rect.left; if ( rtl ) { if ( spaceAfter < rectWidth ) { // Flip to show on right. if ( spaceBefore > rectWidth ) left += rectWidth; // Align to window left. else if ( viewportSize.width > rectWidth ) left = left - rect.left; // Align to window right, never cutting the panel at right. else left = left - rect.right + viewportSize.width; } } else if ( spaceAfter < rectWidth ) { // Flip to show on left. if ( spaceBefore > rectWidth ) left -= rectWidth; // Align to window right. else if ( viewportSize.width > rectWidth ) left = left - rect.right + viewportSize.width; // Align to window left, never cutting the panel at left. else left = left - rect.left; } // Check if the default vertical layout is possible. var spaceBelow = viewportSize.height - rect.top, spaceAbove = rect.top; if ( spaceBelow < rectHeight ) { // Flip to show above. if ( spaceAbove > rectHeight ) top -= rectHeight; // Align to window bottom. else if ( viewportSize.height > rectHeight ) top = top - rect.bottom + viewportSize.height; // Align to top, never cutting the panel at top. else top = top - rect.top; } // If IE is in RTL, we have troubles with absolute // position and horizontal scrolls. Here we have a // series of hacks to workaround it. (#6146) if ( CKEDITOR.env.ie ) { var offsetParent = new CKEDITOR.dom.element( element.$.offsetParent ), scrollParent = offsetParent; // Quirks returns <body>, but standards returns <html>. if ( scrollParent.getName() == 'html' ) scrollParent = scrollParent.getDocument().getBody(); if ( scrollParent.getComputedStyle( 'direction' ) == 'rtl' ) { // For IE8, there is not much logic on this, but it works. if ( CKEDITOR.env.ie8Compat ) left -= element.getDocument().getDocumentElement().$.scrollLeft * 2; else left -= ( offsetParent.$.scrollWidth - offsetParent.$.clientWidth ); } } // Trigger the onHide event of the previously active panel to prevent // incorrect styles from being applied (#6170) var innerElement = element.getFirst(), activePanel; if ( ( activePanel = innerElement.getCustomData( 'activePanel' ) ) ) activePanel.onHide && activePanel.onHide.call( this, 1 ); innerElement.setCustomData( 'activePanel', this ); element.setStyles( { top : top + 'px', left : left + 'px' } ); element.setOpacity( 1 ); } , this ); panel.isLoaded ? panelLoad() : panel.onLoad = panelLoad; // Set the panel frame focus, so the blur event gets fired. CKEDITOR.tools.setTimeout( function() { iframe.$.contentWindow.focus(); // We need this get fired manually because of unfired focus() function. this.allowBlur( true ); }, 0, this); }, CKEDITOR.env.air ? 200 : 0, this); this.visible = 1; if ( this.onShow ) this.onShow.call( this ); isShowing = 0; }, hide : function( returnFocus ) { if ( this.visible && ( !this.onHide || this.onHide.call( this ) !== true ) ) { this.hideChild(); // Blur previously focused element. (#6671) CKEDITOR.env.gecko && this._.iframe.getFrameDocument().$.activeElement.blur(); this.element.setStyle( 'display', 'none' ); this.visible = 0; this.element.getFirst().removeCustomData( 'activePanel' ); // Return focus properly. (#6247) var focusReturn = returnFocus !== false && this._.returnFocus; if ( focusReturn ) { // Webkit requires focus moved out panel iframe first. if ( CKEDITOR.env.webkit && focusReturn.type ) focusReturn.getWindow().$.focus(); focusReturn.focus(); } } }, allowBlur : function( allow ) // Prevent editor from hiding the panel. #3222. { var panel = this._.panel; if ( allow != undefined ) panel.allowBlur = allow; return panel.allowBlur; }, showAsChild : function( panel, blockName, offsetParent, corner, offsetX, offsetY ) { // Skip reshowing of child which is already visible. if ( this._.activeChild == panel && panel._.panel._.offsetParentId == offsetParent.getId() ) return; this.hideChild(); panel.onHide = CKEDITOR.tools.bind( function() { // Use a timeout, so we give time for this menu to get // potentially focused. CKEDITOR.tools.setTimeout( function() { if ( !this._.focused ) this.hide(); }, 0, this ); }, this ); this._.activeChild = panel; this._.focused = false; panel.showBlock( blockName, offsetParent, corner, offsetX, offsetY ); /* #3767 IE: Second level menu may not have borders */ if ( CKEDITOR.env.ie7Compat || ( CKEDITOR.env.ie8 && CKEDITOR.env.ie6Compat ) ) { setTimeout(function() { panel.element.getChild( 0 ).$.style.cssText += ''; }, 100); } }, hideChild : function() { var activeChild = this._.activeChild; if ( activeChild ) { delete activeChild.onHide; // Sub panels don't manage focus. (#7881) delete activeChild._.returnFocus; delete this._.activeChild; activeChild.hide(); } } } }); CKEDITOR.on( 'instanceDestroyed', function() { var isLastInstance = CKEDITOR.tools.isEmpty( CKEDITOR.instances ); for ( var i in panels ) { var panel = panels[ i ]; // Safe to destroy it since there're no more instances.(#4241) if ( isLastInstance ) panel.destroy(); // Panel might be used by other instances, just hide them.(#4552) else panel.element.hide(); } // Remove the registration. isLastInstance && ( panels = {} ); } ); })();
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/floatpanel/plugin.js
JavaScript
gpl3
14,660
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add( 'panel', { beforeInit : function( editor ) { editor.ui.addHandler( CKEDITOR.UI_PANEL, CKEDITOR.ui.panel.handler ); } }); /** * Panel UI element. * @constant * @example */ CKEDITOR.UI_PANEL = 'panel'; CKEDITOR.ui.panel = function( document, definition ) { // Copy all definition properties to this object. if ( definition ) CKEDITOR.tools.extend( this, definition ); // Set defaults. CKEDITOR.tools.extend( this, { className : '', css : [] }); this.id = CKEDITOR.tools.getNextId(); this.document = document; this._ = { blocks : {} }; }; /** * Transforms a rich combo definition in a {@link CKEDITOR.ui.richCombo} * instance. * @type Object * @example */ CKEDITOR.ui.panel.handler = { create : function( definition ) { return new CKEDITOR.ui.panel( definition ); } }; CKEDITOR.ui.panel.prototype = { renderHtml : function( editor ) { var output = []; this.render( editor, output ); return output.join( '' ); }, /** * Renders the combo. * @param {CKEDITOR.editor} editor The editor instance which this button is * to be used by. * @param {Array} output The output array to which append the HTML relative * to this button. * @example */ render : function( editor, output ) { var id = this.id; output.push( '<div class="', editor.skinClass ,'"' + ' lang="', editor.langCode, '"' + ' role="presentation"' + // iframe loading need sometime, keep the panel hidden(#4186). ' style="display:none;z-index:' + ( editor.config.baseFloatZIndex + 1 ) + '">' + '<div' + ' id=', id, ' dir=', editor.lang.dir, ' role="presentation"' + ' class="cke_panel cke_', editor.lang.dir ); if ( this.className ) output.push( ' ', this.className ); output.push( '">' ); if ( this.forceIFrame || this.css.length ) { output.push( '<iframe id="', id, '_frame"' + ' frameborder="0"' + ' role="application" src="javascript:void(' ); output.push( // Support for custom document.domain in IE. CKEDITOR.env.isCustomDomain() ? '(function(){' + 'document.open();' + 'document.domain=\'' + document.domain + '\';' + 'document.close();' + '})()' : '0' ); output.push( ')"></iframe>' ); } output.push( '</div>' + '</div>' ); return id; }, getHolderElement : function() { var holder = this._.holder; if ( !holder ) { if ( this.forceIFrame || this.css.length ) { var iframe = this.document.getById( this.id + '_frame' ), parentDiv = iframe.getParent(), dir = parentDiv.getAttribute( 'dir' ), className = parentDiv.getParent().getAttribute( 'class' ), langCode = parentDiv.getParent().getAttribute( 'lang' ), doc = iframe.getFrameDocument(); // Make it scrollable on iOS. (#8308) CKEDITOR.env.iOS && parentDiv.setStyles( { 'overflow' : 'scroll', '-webkit-overflow-scrolling' : 'touch' }); var onLoad = CKEDITOR.tools.addFunction( CKEDITOR.tools.bind( function( ev ) { this.isLoaded = true; if ( this.onLoad ) this.onLoad(); }, this ) ); var data = '<!DOCTYPE html>' + '<html dir="' + dir + '" class="' + className + '_container" lang="' + langCode + '">' + '<head>' + '<style>.' + className + '_container{visibility:hidden}</style>' + CKEDITOR.tools.buildStyleHtml( this.css ) + '</head>' + '<body class="cke_' + dir + ' cke_panel_frame ' + CKEDITOR.env.cssClass + '" style="margin:0;padding:0"' + ' onload="( window.CKEDITOR || window.parent.CKEDITOR ).tools.callFunction(' + onLoad + ');"></body>' + '<\/html>'; doc.write( data ); var win = doc.getWindow(); // Register the CKEDITOR global. win.$.CKEDITOR = CKEDITOR; // Arrow keys for scrolling is only preventable with 'keypress' event in Opera (#4534). doc.on( 'key' + ( CKEDITOR.env.opera? 'press':'down' ), function( evt ) { var keystroke = evt.data.getKeystroke(), dir = this.document.getById( this.id ).getAttribute( 'dir' ); // Delegate key processing to block. if ( this._.onKeyDown && this._.onKeyDown( keystroke ) === false ) { evt.data.preventDefault(); return; } // ESC/ARROW-LEFT(ltr) OR ARROW-RIGHT(rtl) if ( keystroke == 27 || keystroke == ( dir == 'rtl' ? 39 : 37 ) ) { if ( this.onEscape && this.onEscape( keystroke ) === false ) evt.data.preventDefault(); } }, this ); holder = doc.getBody(); holder.unselectable(); CKEDITOR.env.air && CKEDITOR.tools.callFunction( onLoad ); } else holder = this.document.getById( this.id ); this._.holder = holder; } return holder; }, addBlock : function( name, block ) { block = this._.blocks[ name ] = block instanceof CKEDITOR.ui.panel.block ? block : new CKEDITOR.ui.panel.block( this.getHolderElement(), block ); if ( !this._.currentBlock ) this.showBlock( name ); return block; }, getBlock : function( name ) { return this._.blocks[ name ]; }, showBlock : function( name ) { var blocks = this._.blocks, block = blocks[ name ], current = this._.currentBlock; // ARIA role works better in IE on the body element, while on the iframe // for FF. (#8864) var holder = !this.forceIFrame || CKEDITOR.env.ie ? this._.holder : this.document.getById( this.id + '_frame' ); if ( current ) { // Clean up the current block's effects on holder. holder.removeAttributes( current.attributes ); current.hide(); } this._.currentBlock = block; holder.setAttributes( block.attributes ); CKEDITOR.fire( 'ariaWidget', holder ); // Reset the focus index, so it will always go into the first one. block._.focusIndex = -1; this._.onKeyDown = block.onKeyDown && CKEDITOR.tools.bind( block.onKeyDown, block ); block.show(); return block; }, destroy : function() { this.element && this.element.remove(); } }; CKEDITOR.ui.panel.block = CKEDITOR.tools.createClass( { $ : function( blockHolder, blockDefinition ) { this.element = blockHolder.append( blockHolder.getDocument().createElement( 'div', { attributes : { 'tabIndex' : -1, 'class' : 'cke_panel_block', 'role' : 'presentation' }, styles : { display : 'none' } }) ); // Copy all definition properties to this object. if ( blockDefinition ) CKEDITOR.tools.extend( this, blockDefinition ); if ( !this.attributes.title ) this.attributes.title = this.attributes[ 'aria-label' ]; this.keys = {}; this._.focusIndex = -1; // Disable context menu for panels. this.element.disableContextMenu(); }, _ : { /** * Mark the item specified by the index as current activated. */ markItem: function( index ) { if ( index == -1 ) return; var links = this.element.getElementsByTag( 'a' ); var item = links.getItem( this._.focusIndex = index ); // Safari need focus on the iframe window first(#3389), but we need // lock the blur to avoid hiding the panel. if ( CKEDITOR.env.webkit || CKEDITOR.env.opera ) item.getDocument().getWindow().focus(); item.focus(); this.onMark && this.onMark( item ); } }, proto : { show : function() { this.element.setStyle( 'display', '' ); }, hide : function() { if ( !this.onHide || this.onHide.call( this ) !== true ) this.element.setStyle( 'display', 'none' ); }, onKeyDown : function( keystroke ) { var keyAction = this.keys[ keystroke ]; switch ( keyAction ) { // Move forward. case 'next' : var index = this._.focusIndex, links = this.element.getElementsByTag( 'a' ), link; while ( ( link = links.getItem( ++index ) ) ) { // Move the focus only if the element is marked with // the _cke_focus and it it's visible (check if it has // width). if ( link.getAttribute( '_cke_focus' ) && link.$.offsetWidth ) { this._.focusIndex = index; link.focus(); break; } } return false; // Move backward. case 'prev' : index = this._.focusIndex; links = this.element.getElementsByTag( 'a' ); while ( index > 0 && ( link = links.getItem( --index ) ) ) { // Move the focus only if the element is marked with // the _cke_focus and it it's visible (check if it has // width). if ( link.getAttribute( '_cke_focus' ) && link.$.offsetWidth ) { this._.focusIndex = index; link.focus(); break; } } return false; case 'click' : case 'mouseup' : index = this._.focusIndex; link = index >= 0 && this.element.getElementsByTag( 'a' ).getItem( index ); if ( link ) link.$[ keyAction ] ? link.$[ keyAction ]() : link.$[ 'on' + keyAction ](); return false; } return true; } } }); /** * Fired when a panel is added to the document * @name CKEDITOR#ariaWidget * @event * @param {Object} holder The element wrapping the panel */
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/panel/plugin.js
JavaScript
gpl3
9,711
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { // Base HTML entities. var htmlbase = 'nbsp,gt,lt,amp'; var entities = // Latin-1 Entities 'quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,' + 'not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,' + 'cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,' + // Symbols 'fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,' + 'alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,' + 'forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,' + 'radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,' + 'equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,' + 'rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,' + // Other Special Characters 'circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,' + 'rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,' + 'euro'; // Latin Letters Entities var latin = 'Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,' + 'Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,' + 'Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,' + 'agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,' + 'ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,' + 'otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,' + 'OElig,oelig,Scaron,scaron,Yuml'; // Greek Letters Entities. var greek = 'Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,' + 'Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,' + 'beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,' + 'omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,' + 'upsih,piv'; /** * Create a mapping table between one character and its entity form from a list of entity names. * @param reverse {Boolean} Whether to create a reverse map from the entity string form to an actual character. */ function buildTable( entities, reverse ) { var table = {}, regex = []; // Entities that the browsers DOM don't transform to the final char // automatically. var specialTable = { nbsp : '\u00A0', // IE | FF shy : '\u00AD', // IE gt : '\u003E', // IE | FF | -- | Opera lt : '\u003C', // IE | FF | Safari | Opera amp : '\u0026', // ALL apos : '\u0027', // IE quot : '\u0022' // IE }; entities = entities.replace( /\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g, function( match, entity ) { var org = reverse ? '&' + entity + ';' : specialTable[ entity ], result = reverse ? specialTable[ entity ] : '&' + entity + ';'; table[ org ] = result; regex.push( org ); return ''; }); if ( !reverse && entities ) { // Transforms the entities string into an array. entities = entities.split( ',' ); // Put all entities inside a DOM element, transforming them to their // final chars. var div = document.createElement( 'div' ), chars; div.innerHTML = '&' + entities.join( ';&' ) + ';'; chars = div.innerHTML; div = null; // Add all chars to the table. for ( var i = 0 ; i < chars.length ; i++ ) { var charAt = chars.charAt( i ); table[ charAt ] = '&' + entities[ i ] + ';'; regex.push( charAt ); } } table.regex = regex.join( reverse ? '|' : '' ); return table; } CKEDITOR.plugins.add( 'entities', { afterInit : function( editor ) { var config = editor.config; var dataProcessor = editor.dataProcessor, htmlFilter = dataProcessor && dataProcessor.htmlFilter; if ( htmlFilter ) { // Mandatory HTML base entities. var selectedEntities = []; if ( config.basicEntities !== false ) selectedEntities.push( htmlbase ); if ( config.entities ) { if ( selectedEntities.length ) selectedEntities.push( entities ); if ( config.entities_latin ) selectedEntities.push( latin ); if ( config.entities_greek ) selectedEntities.push( greek ); if ( config.entities_additional ) selectedEntities.push( config.entities_additional ); } var entitiesTable = buildTable( selectedEntities.join( ',' ) ); // Create the Regex used to find entities in the text, leave it matches nothing if entities are empty. var entitiesRegex = entitiesTable.regex ? '[' + entitiesTable.regex + ']' : 'a^'; delete entitiesTable.regex; if ( config.entities && config.entities_processNumerical ) entitiesRegex = '[^ -~]|' + entitiesRegex ; entitiesRegex = new RegExp( entitiesRegex, 'g' ); function getEntity( character ) { return config.entities_processNumerical == 'force' || !entitiesTable[ character ] ? '&#' + character.charCodeAt(0) + ';' : entitiesTable[ character ]; } // Decode entities that the browsers has transformed // at first place. var baseEntitiesTable = buildTable( [ htmlbase, 'shy' ].join( ',' ) , true ), baseEntitiesRegex = new RegExp( baseEntitiesTable.regex, 'g' ); function getChar( character ) { return baseEntitiesTable[ character ]; } htmlFilter.addRules( { text : function( text ) { return text.replace( baseEntitiesRegex, getChar ) .replace( entitiesRegex, getEntity ); } }); } } }); })(); /** * Whether to escape basic HTML entities in the document, including: * <ul> * <li><code>nbsp</code></li> * <li><code>gt</code></li> * <li><code>lt</code></li> * <li><code>amp</code></li> * </ul> * <strong>Note:</strong> It should not be subject to change unless when outputting a non-HTML data format like BBCode. * @type Boolean * @default <code>true</code> * @example * config.basicEntities = false; */ CKEDITOR.config.basicEntities = true; /** * Whether to use HTML entities in the output. * @name CKEDITOR.config.entities * @type Boolean * @default <code>true</code> * @example * config.entities = false; */ CKEDITOR.config.entities = true; /** * Whether to convert some Latin characters (Latin alphabet No&#46; 1, ISO 8859-1) * to HTML entities. The list of entities can be found in the * <a href="http://www.w3.org/TR/html4/sgml/entities.html#h-24.2.1">W3C HTML 4.01 Specification, section 24.2.1</a>. * @name CKEDITOR.config.entities_latin * @type Boolean * @default <code>true</code> * @example * config.entities_latin = false; */ CKEDITOR.config.entities_latin = true; /** * Whether to convert some symbols, mathematical symbols, and Greek letters to * HTML entities. This may be more relevant for users typing text written in Greek. * The list of entities can be found in the * <a href="http://www.w3.org/TR/html4/sgml/entities.html#h-24.3.1">W3C HTML 4.01 Specification, section 24.3.1</a>. * @name CKEDITOR.config.entities_greek * @type Boolean * @default <code>true</code> * @example * config.entities_greek = false; */ CKEDITOR.config.entities_greek = true; /** * Whether to convert all remaining characters not included in the ASCII * character table to their relative decimal numeric representation of HTML entity. * When set to <code>force</code>, it will convert all entities into this format. * For example the phrase "This is Chinese: &#27721;&#35821;." is output * as "This is Chinese: &amp;#27721;&amp;#35821;." * @name CKEDITOR.config.entities_processNumerical * @type Boolean|String * @default <code>false</code> * @example * config.entities_processNumerical = true; * config.entities_processNumerical = 'force'; //Converts from "&nbsp;" into "&#160;"; */ /** * A comma separated list of additional entities to be used. Entity names * or numbers must be used in a form that excludes the "&amp;" prefix and the ";" ending. * @name CKEDITOR.config.entities_additional * @default <code>'#39'</code> (The single quote (') character.) * @type String * @example * config.entities_additional = '#1049'; // Adds Cyrillic capital letter Short I (&#1049;). */ CKEDITOR.config.entities_additional = '#39';
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/entities/plugin.js
JavaScript
gpl3
8,499
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { CKEDITOR.plugins.add( 'iframe', { requires : [ 'dialog', 'fakeobjects' ], init : function( editor ) { var pluginName = 'iframe', lang = editor.lang.iframe; CKEDITOR.dialog.add( pluginName, this.path + 'dialogs/iframe.js' ); editor.addCommand( pluginName, new CKEDITOR.dialogCommand( pluginName ) ); editor.addCss( 'img.cke_iframe' + '{' + 'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/placeholder.png' ) + ');' + 'background-position: center center;' + 'background-repeat: no-repeat;' + 'border: 1px solid #a9a9a9;' + 'width: 80px;' + 'height: 80px;' + '}' ); editor.ui.addButton( 'Iframe', { label : lang.toolbar, command : pluginName }); editor.on( 'doubleclick', function( evt ) { var element = evt.data.element; if ( element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'iframe' ) evt.data.dialog = 'iframe'; }); if ( editor.addMenuItems ) { editor.addMenuItems( { iframe : { label : lang.title, command : 'iframe', group : 'image' } }); } // If the "contextmenu" plugin is loaded, register the listeners. if ( editor.contextMenu ) { editor.contextMenu.addListener( function( element, selection ) { if ( element && element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'iframe' ) return { iframe : CKEDITOR.TRISTATE_OFF }; }); } }, afterInit : function( editor ) { var dataProcessor = editor.dataProcessor, dataFilter = dataProcessor && dataProcessor.dataFilter; if ( dataFilter ) { dataFilter.addRules( { elements : { iframe : function( element ) { return editor.createFakeParserElement( element, 'cke_iframe', 'iframe', true ); } } }); } } }); })();
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/iframe/plugin.js
JavaScript
gpl3
2,143
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { // Map 'true' and 'false' values to match W3C's specifications // http://www.w3.org/TR/REC-html40/present/frames.html#h-16.5 var checkboxValues = { scrolling : { 'true' : 'yes', 'false' : 'no' }, frameborder : { 'true' : '1', 'false' : '0' } }; function loadValue( iframeNode ) { var isCheckbox = this instanceof CKEDITOR.ui.dialog.checkbox; if ( iframeNode.hasAttribute( this.id ) ) { var value = iframeNode.getAttribute( this.id ); if ( isCheckbox ) this.setValue( checkboxValues[ this.id ][ 'true' ] == value.toLowerCase() ); else this.setValue( value ); } } function commitValue( iframeNode ) { var isRemove = this.getValue() === '', isCheckbox = this instanceof CKEDITOR.ui.dialog.checkbox, value = this.getValue(); if ( isRemove ) iframeNode.removeAttribute( this.att || this.id ); else if ( isCheckbox ) iframeNode.setAttribute( this.id, checkboxValues[ this.id ][ value ] ); else iframeNode.setAttribute( this.att || this.id, value ); } CKEDITOR.dialog.add( 'iframe', function( editor ) { var iframeLang = editor.lang.iframe, commonLang = editor.lang.common, dialogadvtab = editor.plugins.dialogadvtab; return { title : iframeLang.title, minWidth : 350, minHeight : 260, onShow : function() { // Clear previously saved elements. this.fakeImage = this.iframeNode = null; var fakeImage = this.getSelectedElement(); if ( fakeImage && fakeImage.data( 'cke-real-element-type' ) && fakeImage.data( 'cke-real-element-type' ) == 'iframe' ) { this.fakeImage = fakeImage; var iframeNode = editor.restoreRealElement( fakeImage ); this.iframeNode = iframeNode; this.setupContent( iframeNode ); } }, onOk : function() { var iframeNode; if ( !this.fakeImage ) iframeNode = new CKEDITOR.dom.element( 'iframe' ); else iframeNode = this.iframeNode; // A subset of the specified attributes/styles // should also be applied on the fake element to // have better visual effect. (#5240) var extraStyles = {}, extraAttributes = {}; this.commitContent( iframeNode, extraStyles, extraAttributes ); // Refresh the fake image. var newFakeImage = editor.createFakeElement( iframeNode, 'cke_iframe', 'iframe', true ); newFakeImage.setAttributes( extraAttributes ); newFakeImage.setStyles( extraStyles ); if ( this.fakeImage ) { newFakeImage.replace( this.fakeImage ); editor.getSelection().selectElement( newFakeImage ); } else editor.insertElement( newFakeImage ); }, contents : [ { id : 'info', label : commonLang.generalTab, accessKey : 'I', elements : [ { type : 'vbox', padding : 0, children : [ { id : 'src', type : 'text', label : commonLang.url, required : true, validate : CKEDITOR.dialog.validate.notEmpty( iframeLang.noUrl ), setup : loadValue, commit : commitValue } ] }, { type : 'hbox', children : [ { id : 'width', type : 'text', style : 'width:100%', labelLayout : 'vertical', label : commonLang.width, validate : CKEDITOR.dialog.validate.htmlLength( commonLang.invalidHtmlLength.replace( '%1', commonLang.width ) ), setup : loadValue, commit : commitValue }, { id : 'height', type : 'text', style : 'width:100%', labelLayout : 'vertical', label : commonLang.height, validate : CKEDITOR.dialog.validate.htmlLength( commonLang.invalidHtmlLength.replace( '%1', commonLang.height ) ), setup : loadValue, commit : commitValue }, { id : 'align', type : 'select', 'default' : '', items : [ [ commonLang.notSet , '' ], [ commonLang.alignLeft , 'left' ], [ commonLang.alignRight , 'right' ], [ commonLang.alignTop , 'top' ], [ commonLang.alignMiddle , 'middle' ], [ commonLang.alignBottom , 'bottom' ] ], style : 'width:100%', labelLayout : 'vertical', label : commonLang.align, setup : function( iframeNode, fakeImage ) { loadValue.apply( this, arguments ); if ( fakeImage ) { var fakeImageAlign = fakeImage.getAttribute( 'align' ); this.setValue( fakeImageAlign && fakeImageAlign.toLowerCase() || '' ); } }, commit : function( iframeNode, extraStyles, extraAttributes ) { commitValue.apply( this, arguments ); if ( this.getValue() ) extraAttributes.align = this.getValue(); } } ] }, { type : 'hbox', widths : [ '50%', '50%' ], children : [ { id : 'scrolling', type : 'checkbox', label : iframeLang.scrolling, setup : loadValue, commit : commitValue }, { id : 'frameborder', type : 'checkbox', label : iframeLang.border, setup : loadValue, commit : commitValue } ] }, { type : 'hbox', widths : [ '50%', '50%' ], children : [ { id : 'name', type : 'text', label : commonLang.name, setup : loadValue, commit : commitValue }, { id : 'title', type : 'text', label : commonLang.advisoryTitle, setup : loadValue, commit : commitValue } ] }, { id : 'longdesc', type : 'text', label : commonLang.longDescr, setup : loadValue, commit : commitValue } ] }, dialogadvtab && dialogadvtab.createAdvancedTab( editor, { id:1, classes:1, styles:1 }) ] }; }); })();
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/iframe/dialogs/iframe.js
JavaScript
gpl3
6,454
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @file Special Character plugin */ CKEDITOR.plugins.add( 'specialchar', { // List of available localizations. availableLangs : { cs:1, cy:1, de:1, en:1, eo:1, et:1, fa:1, fi:1, fr:1, hr:1, it:1, nb:1, nl:1, no:1, tr:1, ug:1, 'zh-cn':1 }, init : function( editor ) { var pluginName = 'specialchar', plugin = this; // Register the dialog. CKEDITOR.dialog.add( pluginName, this.path + 'dialogs/specialchar.js' ); editor.addCommand( pluginName, { exec : function() { var langCode = editor.langCode; langCode = plugin.availableLangs[ langCode ] ? langCode : 'en'; CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( plugin.path + 'lang/' + langCode + '.js' ), function() { CKEDITOR.tools.extend( editor.lang.specialChar, plugin.langEntries[ langCode ] ); editor.openDialog( pluginName ); }); }, modes : { wysiwyg:1 }, canUndo : false }); // Register the toolbar button. editor.ui.addButton( 'SpecialChar', { label : editor.lang.specialChar.toolbar, command : pluginName }); } } ); /** * The list of special characters visible in the Special Character dialog window. * @type Array * @example * config.specialChars = [ '&quot;', '&rsquo;', [ '&custom;', 'Custom label' ] ]; * config.specialChars = config.specialChars.concat( [ '&quot;', [ '&rsquo;', 'Custom label' ] ] ); */ CKEDITOR.config.specialChars = [ '!','&quot;','#','$','%','&amp;',"'",'(',')','*','+','-','.','/', '0','1','2','3','4','5','6','7','8','9',':',';', '&lt;','=','&gt;','?','@', 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O', 'P','Q','R','S','T','U','V','W','X','Y','Z', '[',']','^','_','`', 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p', 'q','r','s','t','u','v','w','x','y','z', '{','|','}','~', "&euro;", "&lsquo;", "&rsquo;", "&ldquo;", "&rdquo;", "&ndash;", "&mdash;", "&iexcl;", "&cent;", "&pound;", "&curren;", "&yen;", "&brvbar;", "&sect;", "&uml;", "&copy;", "&ordf;", "&laquo;", "&not;", "&reg;", "&macr;", "&deg;", "&sup2;", "&sup3;", "&acute;", "&micro;", "&para;", "&middot;", "&cedil;", "&sup1;", "&ordm;", "&raquo;", "&frac14;", "&frac12;", "&frac34;", "&iquest;", "&Agrave;", "&Aacute;", "&Acirc;", "&Atilde;", "&Auml;", "&Aring;", "&AElig;", "&Ccedil;", "&Egrave;", "&Eacute;", "&Ecirc;", "&Euml;", "&Igrave;", "&Iacute;", "&Icirc;", "&Iuml;", "&ETH;", "&Ntilde;", "&Ograve;", "&Oacute;", "&Ocirc;", "&Otilde;", "&Ouml;", "&times;", "&Oslash;", "&Ugrave;", "&Uacute;", "&Ucirc;", "&Uuml;", "&Yacute;", "&THORN;", "&szlig;", "&agrave;", "&aacute;", "&acirc;", "&atilde;", "&auml;", "&aring;", "&aelig;", "&ccedil;", "&egrave;", "&eacute;", "&ecirc;", "&euml;", "&igrave;", "&iacute;", "&icirc;", "&iuml;", "&eth;", "&ntilde;", "&ograve;", "&oacute;", "&ocirc;", "&otilde;", "&ouml;", "&divide;", "&oslash;", "&ugrave;", "&uacute;", "&ucirc;", "&uuml;", "&yacute;", "&thorn;", "&yuml;", "&OElig;", "&oelig;", "&#372;", "&#374", "&#373", "&#375;", "&sbquo;", "&#8219;", "&bdquo;", "&hellip;", "&trade;", "&#9658;", "&bull;", "&rarr;", "&rArr;", "&hArr;", "&diams;", "&asymp;" ];
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/specialchar/plugin.js
JavaScript
gpl3
3,368
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'cy', { euro: 'Arwydd yr Ewro', lsquo: 'Dyfynnod chwith unigol', rsquo: 'Dyfynnod dde unigol', ldquo: 'Dyfynnod chwith dwbl', rdquo: 'Dyfynnod dde dwbl', ndash: 'Cysylltnod en', mdash: 'Cysylltnod em', iexcl: 'Ebychnod gwrthdro', cent: 'Arwydd sent', pound: 'Arwydd punt', curren: 'Arwydd arian cyfred', yen: 'Arwydd yen', brvbar: 'Bar toriedig', sect: 'Arwydd adran', uml: 'Didolnod', copy: 'Arwydd hawlfraint', ordf: 'Dangosydd benywaidd', laquo: 'Dyfynnod dwbl ar ongl i\'r chwith', not: 'Arwydd Nid', reg: 'Arwydd cofrestredig', macr: 'Macron', deg: 'Arwydd gradd', sup2: 'Dau uwchsgript', sup3: 'Tri uwchsgript', acute: 'Acen ddyrchafedig', micro: 'Arwydd micro', para: 'Arwydd pilcrow', middot: 'Dot canol', cedil: 'Sedila', sup1: 'Un uwchsgript', ordm: 'Dangosydd gwrywaidd', raquo: 'Dyfynnod dwbl ar ongl i\'r dde', frac14: 'Ffracsiwn cyffredin un cwarter', frac12: 'Ffracsiwn cyffredin un hanner', frac34: 'Ffracsiwn cyffredin tri chwarter', iquest: 'Marc cwestiwn gwrthdroëdig', Agrave: 'Priflythyren A Lladinaidd gydag acen ddisgynedig', Aacute: 'Priflythyren A Lladinaidd gydag acen ddyrchafedig', Acirc: 'Priflythyren A Lladinaidd gydag acen grom', Atilde: 'Priflythyren A Lladinaidd gyda thild', Auml: 'Priflythyren A Lladinaidd gyda didolnod', Aring: 'Priflythyren A Lladinaidd gyda chylch uwchben', AElig: 'Priflythyren Æ Lladinaidd', Ccedil: 'Priflythyren C Lladinaidd gyda sedila', Egrave: 'Priflythyren E Lladinaidd gydag acen ddisgynedig', Eacute: 'Priflythyren E Lladinaidd gydag acen ddyrchafedig', Ecirc: 'Priflythyren E Lladinaidd gydag acen grom', Euml: 'Priflythyren E Lladinaidd gyda didolnod', Igrave: 'Priflythyren I Lladinaidd gydag acen ddisgynedig', Iacute: 'Priflythyren I Lladinaidd gydag acen ddyrchafedig', Icirc: 'Priflythyren I Lladinaidd gydag acen grom', Iuml: 'Priflythyren I Lladinaidd gyda didolnod', ETH: 'Priflythyren Eth', Ntilde: 'Priflythyren N Lladinaidd gyda thild', Ograve: 'Priflythyren O Lladinaidd gydag acen ddisgynedig', Oacute: 'Priflythyren O Lladinaidd gydag acen ddyrchafedig', Ocirc: 'Priflythyren O Lladinaidd gydag acen grom', Otilde: 'Priflythyren O Lladinaidd gyda thild', Ouml: 'Priflythyren O Lladinaidd gyda didolnod', times: 'Arwydd lluosi', Oslash: 'Priflythyren O Lladinaidd gyda strôc', Ugrave: 'Priflythyren U Lladinaidd gydag acen ddisgynedig', Uacute: 'Priflythyren U Lladinaidd gydag acen ddyrchafedig', Ucirc: 'Priflythyren U Lladinaidd gydag acen grom', Uuml: 'Priflythyren U Lladinaidd gyda didolnod', Yacute: 'Priflythyren Y Lladinaidd gydag acen ddyrchafedig', THORN: 'Priflythyren Thorn', szlig: 'Llythyren s fach Lladinaidd siarp ', agrave: 'Llythyren a fach Lladinaidd gydag acen ddisgynedig', aacute: 'Llythyren a fach Lladinaidd gydag acen ddyrchafedig', acirc: 'Llythyren a fach Lladinaidd gydag acen grom', atilde: 'Llythyren a fach Lladinaidd gyda thild', auml: 'Llythyren a fach Lladinaidd gyda didolnod', aring: 'Llythyren a fach Lladinaidd gyda chylch uwchben', aelig: 'Llythyren æ fach Lladinaidd', ccedil: 'Llythyren c fach Lladinaidd gyda sedila', egrave: 'Llythyren e fach Lladinaidd gydag acen ddisgynedig', eacute: 'Llythyren e fach Lladinaidd gydag acen ddyrchafedig', ecirc: 'Llythyren e fach Lladinaidd gydag acen grom', euml: 'Llythyren e fach Lladinaidd gyda didolnod', igrave: 'Llythyren i fach Lladinaidd gydag acen ddisgynedig', iacute: 'Llythyren i fach Lladinaidd gydag acen ddyrchafedig', icirc: 'Llythyren i fach Lladinaidd gydag acen grom', iuml: 'Llythyren i fach Lladinaidd gyda didolnod', eth: 'Llythyren eth fach', ntilde: 'Llythyren n fach Lladinaidd gyda thild', ograve: 'Llythyren o fach Lladinaidd gydag acen ddisgynedig', oacute: 'Llythyren o fach Lladinaidd gydag acen ddyrchafedig', ocirc: 'Llythyren o fach Lladinaidd gydag acen grom', otilde: 'Llythyren o fach Lladinaidd gyda thild', ouml: 'Llythyren o fach Lladinaidd gyda didolnod', divide: 'Arwydd rhannu', oslash: 'Llyth', ugrave: 'Llythyren u fach Lladinaidd gydag acen ddisgynedig', uacute: 'Llythyren u fach Lladinaidd gydag acen ddyrchafedig', ucirc: 'Llythyren u fach Lladinaidd gydag acen grom', uuml: 'Llythyren u fach Lladinaidd gyda didolnod', yacute: 'Llythyren y fach Lladinaidd gydag acen ddisgynedig', thorn: 'Llythyren o fach Lladinaidd gyda strôc', yuml: 'Llythyren y fach Lladinaidd gyda didolnod', OElig: 'Priflythyren cwlwm OE Lladinaidd ', oelig: 'Priflythyren cwlwm oe Lladinaidd ', '372': 'Priflythyren W gydag acen grom', '374': 'Priflythyren Y gydag acen grom', '373': 'Llythyren w fach gydag acen grom', '375': 'Llythyren y fach gydag acen grom', sbquo: 'Dyfynnod sengl 9-isel', '8219': 'Dyfynnod sengl 9-uchel cildro', bdquo: 'Dyfynnod dwbl 9-isel', hellip: 'Coll geiriau llorweddol', trade: 'Arwydd marc masnachol', '9658': 'Pwyntydd du i\'r dde', bull: 'Bwled', rarr: 'Saeth i\'r dde', rArr: 'Saeth ddwbl i\'r dde', hArr: 'Saeth ddwbl i\'r chwith', diams: 'Siwt diemwnt du', asymp: 'Bron yn hafal iddo' });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/specialchar/lang/cy.js
JavaScript
gpl3
5,352
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'tr', { euro: 'Euro işareti', lsquo: 'Sol tek tırnak işareti', rsquo: 'Sağ tek tırnak işareti', ldquo: 'Sol çift tırnak işareti', rdquo: 'Sağ çift tırnak işareti', ndash: 'En tire', mdash: 'Em tire', iexcl: 'Ters ünlem işareti', cent: 'Cent işareti', pound: 'Pound işareti', curren: 'Para birimi işareti', yen: 'Yen işareti', brvbar: 'Kırık bar', sect: 'Bölüm işareti', uml: 'İki sesli harfin ayrılması', copy: 'Telif hakkı işareti', ordf: 'Dişil sıralı gösterge', laquo: 'Sol-işaret çift açı tırnak işareti', not: 'Not işareti', reg: 'Kayıtlı işareti', macr: 'Makron', deg: 'Derece işareti', sup2: 'İkili üstsimge', sup3: 'Üçlü üstsimge', acute: 'Aksan işareti', micro: 'Mikro işareti', para: 'Pilcrow işareti', middot: 'Orta nokta', cedil: 'Kedilla', sup1: 'Üstsimge', ordm: 'Eril sıralı gösterge', raquo: 'Sağ işaret çift açı tırnak işareti', frac14: 'Bayağı kesrin dörtte biri', frac12: 'Bayağı kesrin bir yarım', frac34: 'Bayağı kesrin dörtte üç', iquest: 'Ters soru işareti', Agrave: 'Aksanlı latin harfi', Aacute: 'Aşırı aksanıyla Latin harfi', Acirc: 'Çarpık Latin harfi', Atilde: 'Tilde latin harfi', Auml: 'Sesli harf ayrılımlıı latin harfi', Aring: 'Halkalı latin büyük A harfi', AElig: 'Latin büyük Æ harfi', Ccedil: 'Latin büyük C harfi ile kedilla', Egrave: 'Aksanlı latin büyük E harfi', Eacute: 'Aşırı vurgulu latin büyük E harfi', Ecirc: 'Çarpık latin büyük E harfi', Euml: 'Sesli harf ayrılımlıı latin büyük E harfi', Igrave: 'Aksanlı latin büyük I harfi', Iacute: 'Aşırı aksanlı latin büyük I harfi', Icirc: 'Çarpık latin büyük I harfi', Iuml: 'Sesli harf ayrılımlıı latin büyük I harfi', ETH: 'Latin büyük Eth harfi', Ntilde: 'Tildeli latin büyük N harfi', Ograve: 'Aksanlı latin büyük O harfi', Oacute: 'Aşırı aksanlı latin büyük O harfi', Ocirc: 'Çarpık latin büyük O harfi', Otilde: 'Tildeli latin büyük O harfi', Ouml: 'Sesli harf ayrılımlı latin büyük O harfi', times: 'Çarpma işareti', Oslash: 'Vurgulu latin büyük O harfi', Ugrave: 'Aksanlı latin büyük U harfi', Uacute: 'Aşırı aksanlı latin büyük U harfi', Ucirc: 'Çarpık latin büyük U harfi', Uuml: 'Sesli harf ayrılımlı latin büyük U harfi', Yacute: 'Aşırı aksanlı latin büyük Y harfi', THORN: 'Latin büyük Thorn harfi', szlig: 'Latin küçük keskin s harfi', agrave: 'Aksanlı latin küçük a harfi', aacute: 'Aşırı aksanlı latin küçük a harfi', acirc: 'Çarpık latin küçük a harfi', atilde: 'Tildeli latin küçük a harfi', auml: 'Sesli harf ayrılımlı latin küçük a harfi', aring: 'Halkalı latin küçük a harfi', aelig: 'Latin büyük æ harfi', ccedil: 'Kedillalı latin küçük c harfi', egrave: 'Aksanlı latin küçük e harfi', eacute: 'Aşırı aksanlı latin küçük e harfi', ecirc: 'Çarpık latin küçük e harfi', euml: 'Sesli harf ayrılımlı latin küçük e harfi', igrave: 'Aksanlı latin küçük i harfi', iacute: 'Aşırı aksanlı latin küçük i harfi', icirc: 'Çarpık latin küçük i harfi', iuml: 'Sesli harf ayrılımlı latin küçük i harfi', eth: 'Latin küçük eth harfi', ntilde: 'Tildeli latin küçük n harfi', ograve: 'Aksanlı latin küçük o harfi', oacute: 'Aşırı aksanlı latin küçük o harfi', ocirc: 'Çarpık latin küçük o harfi', otilde: 'Tildeli latin küçük o harfi', ouml: 'Sesli harf ayrılımlı latin küçük o harfi', divide: 'Bölme işareti', oslash: 'Vurgulu latin küçük o harfi', ugrave: 'Aksanlı latin küçük u harfi', uacute: 'Aşırı aksanlı latin küçük u harfi', ucirc: 'Çarpık latin küçük u harfi', uuml: 'Sesli harf ayrılımlı latin küçük u harfi', yacute: 'Aşırı aksanlı latin küçük y harfi', thorn: 'Latin küçük thorn harfi', yuml: 'Sesli harf ayrılımlı latin küçük y harfi', OElig: 'Latin büyük bağlı OE harfi', oelig: 'Latin küçük bağlı oe harfi', '372': 'Çarpık latin büyük W harfi', '374': 'Çarpık latin büyük Y harfi', '373': 'Çarpık latin küçük w harfi', '375': 'Çarpık latin küçük y harfi', sbquo: 'Tek düşük-9 tırnak işareti', '8219': 'Tek yüksek-ters-9 tırnak işareti', bdquo: 'Çift düşük-9 tırnak işareti', hellip: 'Yatay elips', trade: 'Marka tescili işareti', '9658': 'Siyah sağ işaret işaretçisi', bull: 'Koyu nokta', rarr: 'Sağa doğru ok', rArr: 'Sağa doğru çift ok', hArr: 'Sol, sağ çift ok', diams: 'Siyah elmas takımı', asymp: 'Hemen hemen eşit' });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/specialchar/lang/tr.js
JavaScript
gpl3
4,966
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'nb', { euro: 'Eurosymbol', lsquo: 'Venstre enkelt anførselstegn', rsquo: 'Høyre enkelt anførselstegn', ldquo: 'Venstre dobbelt anførselstegn', rdquo: 'Høyre anførsesltegn', ndash: 'Kort tankestrek', mdash: 'Lang tankestrek', iexcl: 'Omvendt utropstegn', cent: 'Centsymbol', pound: 'Pundsymbol', curren: 'Valutategn', yen: 'Yensymbol', brvbar: 'Brutt loddrett strek', sect: 'Paragraftegn', uml: 'Tøddel', copy: 'Copyrighttegn', ordf: 'Feminin ordensindikator', laquo: 'Venstre anførselstegn', not: 'Negasjonstegn', reg: 'Registrert varemerke-tegn', macr: 'Makron', deg: 'Gradsymbol', sup2: 'Hevet totall', sup3: 'Hevet tretall', acute: 'Akutt aksent', micro: 'Mikrosymbol', para: 'Avsnittstegn', middot: 'Midtstilt prikk', cedil: 'Cedille', sup1: 'Hevet ettall', ordm: 'Maskulin ordensindikator', raquo: 'Høyre anførselstegn', frac14: 'Fjerdedelsbrøk', frac12: 'Halvbrøk', frac34: 'Tre fjerdedelers brøk', iquest: 'Omvendt spørsmålstegn', Agrave: 'Stor A med grav aksent', Aacute: 'Stor A med akutt aksent', Acirc: 'Stor A med cirkumfleks', Atilde: 'Stor A med tilde', Auml: 'Stor A med tøddel', Aring: 'Stor Å', AElig: 'Stor Æ', Ccedil: 'Stor C med cedille', Egrave: 'Stor E med grav aksent', Eacute: 'Stor E med akutt aksent', Ecirc: 'Stor E med cirkumfleks', Euml: 'Stor E med tøddel', Igrave: 'Stor I med grav aksent', Iacute: 'Stor I med akutt aksent', Icirc: 'Stor I med cirkumfleks', Iuml: 'Stor I med tøddel', ETH: 'Stor Edd/stungen D', Ntilde: 'Stor N med tilde', Ograve: 'Stor O med grav aksent', Oacute: 'Stor O med akutt aksent', Ocirc: 'Stor O med cirkumfleks', Otilde: 'Stor O med tilde', Ouml: 'Stor O med tøddel', times: 'Multiplikasjonstegn', Oslash: 'Stor Ø', Ugrave: 'Stor U med grav aksent', Uacute: 'Stor U med akutt aksent', Ucirc: 'Stor U med cirkumfleks', Uuml: 'Stor U med tøddel', Yacute: 'Stor Y med akutt aksent', THORN: 'Stor Thorn', szlig: 'Liten dobbelt-s/Eszett', agrave: 'Liten a med grav aksent', aacute: 'Liten a med akutt aksent', acirc: 'Liten a med cirkumfleks', atilde: 'Liten a med tilde', auml: 'Liten a med tøddel', aring: 'Liten å', aelig: 'Liten æ', ccedil: 'Liten c med cedille', egrave: 'Liten e med grav aksent', eacute: 'Liten e med akutt aksent', ecirc: 'Liten e med cirkumfleks', euml: 'Liten e med tøddel', igrave: 'Liten i med grav aksent', iacute: 'Liten i med akutt aksent', icirc: 'Liten i med cirkumfleks', iuml: 'Liten i med tøddel', eth: 'Liten edd/stungen d', ntilde: 'Liten n med tilde', ograve: 'Liten o med grav aksent', oacute: 'Liten o med akutt aksent', ocirc: 'Liten o med cirkumfleks', otilde: 'Liten o med tilde', ouml: 'Liten o med tøddel', divide: 'Divisjonstegn', oslash: 'Liten ø', ugrave: 'Liten u med grav aksent', uacute: 'Liten u med akutt aksent', ucirc: 'Liten u med cirkumfleks', uuml: 'Liten u med tøddel', yacute: 'Liten y med akutt aksent', thorn: 'Liten thorn', yuml: 'Liten y med tøddel', OElig: 'Stor ligatur av O og E', oelig: 'Liten ligatur av o og e', '372': 'Stor W med cirkumfleks', '374': 'Stor Y med cirkumfleks', '373': 'Liten w med cirkumfleks', '375': 'Liten y med cirkumfleks', sbquo: 'Enkelt lavt 9-anførselstegn', '8219': 'Enkelt høyt reversert 9-anførselstegn', bdquo: 'Dobbelt lavt 9-anførselstegn', hellip: 'Ellipse', trade: 'Varemerkesymbol', '9658': 'Svart høyrevendt peker', bull: 'Tykk interpunkt', rarr: 'Høyrevendt pil', rArr: 'Dobbel høyrevendt pil', hArr: 'Dobbel venstrevendt pil', diams: 'Svart ruter', asymp: 'Omtrent likhetstegn' });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/specialchar/lang/nb.js
JavaScript
gpl3
3,920
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'fr', { euro: 'Symbole Euro', lsquo: 'Guillemet simple ouvrant', rsquo: 'Guillemet simple fermant', ldquo: 'Guillemet double ouvrant', rdquo: 'Guillemet double fermant', ndash: 'Tiret haut', mdash: 'Tiret bas underscore', iexcl: 'Point d\'exclamation inversé', cent: 'Symbole Cent', pound: 'Symbole Livre Sterling', curren: 'Symbole monétaire', yen: 'Symbole Yen', brvbar: 'Barre verticale scindée', sect: 'Section', uml: 'Tréma', copy: 'Symbole Copyright', ordf: 'Indicateur ordinal féminin', laquo: 'Guillemet français ouvrant', not: 'Crochet de négation', reg: 'Marque déposée', macr: 'Macron', deg: 'Degré', sup2: 'Exposant 2', sup3: '\\tExposant 3', acute: 'Accent aigu', micro: 'Omicron', para: 'Paragraphe', middot: 'Point médian', cedil: 'Cédille', sup1: '\\tExposant 1', ordm: 'Indicateur ordinal masculin', raquo: 'Guillemet français fermant', frac14: 'Un quart', frac12: 'Un demi', frac34: 'Trois quarts', iquest: 'Point d\'interrogation inversé', Agrave: 'A majuscule accent grave', Aacute: 'A majuscule accent aigu', Acirc: 'A majuscule accent circonflexe', Atilde: 'A majuscule avec caron', Auml: 'A majuscule tréma', Aring: 'A majuscule avec un rond au-dessus', AElig: 'Æ majuscule ligaturés', Ccedil: 'C majuscule cédille', Egrave: 'E majuscule accent grave', Eacute: 'E majuscule accent aigu', Ecirc: 'E majuscule accent circonflexe', Euml: 'E majuscule tréma', Igrave: 'I majuscule accent grave', Iacute: 'I majuscule accent aigu', Icirc: 'I majuscule accent circonflexe', Iuml: 'I majuscule tréma', ETH: 'Lettre majuscule islandaise ED', Ntilde: 'N majuscule avec caron', Ograve: 'O majuscule accent grave', Oacute: 'O majuscule accent aigu', Ocirc: 'O majuscule accent circonflexe', Otilde: 'O majuscule avec caron', Ouml: 'O majuscule tréma', times: 'Multiplication', Oslash: 'O majuscule barré', Ugrave: 'U majuscule accent grave', Uacute: 'U majuscule accent aigu', Ucirc: 'U majuscule accent circonflexe', Uuml: 'U majuscule tréma', Yacute: 'Y majuscule accent aigu', THORN: 'Lettre islandaise Thorn majuscule', szlig: 'Lettre minuscule allemande s dur', agrave: 'a minuscule accent grave', aacute: 'a minuscule accent aigu', acirc: 'a minuscule accent circonflexe', atilde: 'a minuscule avec caron', auml: 'a minuscule tréma', aring: 'a minuscule avec un rond au-dessus', aelig: 'æ minuscule ligaturés', ccedil: 'c minuscule cédille', egrave: 'e minuscule accent grave', eacute: 'e minuscule accent aigu', ecirc: 'e minuscule accent circonflexe', euml: 'e minuscule tréma', igrave: 'i minuscule accent grave', iacute: 'i minuscule accent aigu', icirc: 'i minuscule accent circonflexe', iuml: 'i minuscule tréma', eth: 'Lettre minuscule islandaise ED', ntilde: 'n minuscule avec caron', ograve: 'o minuscule accent grave', oacute: 'o minuscule accent aigu', ocirc: 'o minuscule accent circonflexe', otilde: 'o minuscule avec caron', ouml: 'o minuscule tréma', divide: 'Division', oslash: 'o minuscule barré', ugrave: 'u minuscule accent grave', uacute: 'u minuscule accent aigu', ucirc: 'u minuscule accent circonflexe', uuml: 'u minuscule tréma', yacute: 'y minuscule accent aigu', thorn: 'Lettre islandaise thorn minuscule', yuml: 'y minuscule tréma', OElig: 'ligature majuscule latine Œ', oelig: 'ligature minuscule latine œ', '372': 'W majuscule accent circonflexe', '374': 'Y majuscule accent circonflexe', '373': 'w minuscule accent circonflexe', '375': 'y minuscule accent circonflexe', sbquo: 'Guillemet simple fermant (anglais)', '8219': 'Guillemet-virgule supérieur culbuté', bdquo: 'Guillemet-virgule double inférieur', hellip: 'Points de suspension', trade: 'Marque commerciale (trade mark)', '9658': 'Flèche noire pointant vers la droite', bull: 'Gros point médian', rarr: 'Flèche vers la droite', rArr: 'Double flèche vers la droite', hArr: 'Double flèche vers la gauche', diams: 'Carreau noir', asymp: 'Presque égal' });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/specialchar/lang/fr.js
JavaScript
gpl3
4,338
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'fa', { euro: 'نشان یورو', lsquo: 'علامت نقل قول تکی چپ', rsquo: 'علامت نقل قول تکی راست', ldquo: 'علامت دوتایی نقل قول چپ', rdquo: 'علامت دوتایی نقل قول راست', ndash: 'En dash', // MISSING mdash: 'Em dash', // MISSING iexcl: 'علامت گذاری به عنوان علامت تعجب وارونه', cent: 'نشان سنت', pound: 'نشان پوند', curren: 'نشان ارز', yen: 'نشان ین', brvbar: 'نوار شکسته', sect: 'نشان بخش', uml: 'Diaeresis', // MISSING copy: 'نشان کپی رایت', ordf: 'Feminine ordinal indicator', // MISSING laquo: 'Left-pointing double angle quotation mark', // MISSING not: 'علامت ثبت نشده', reg: 'علامت ثبت شده', macr: 'Macron', // MISSING deg: 'نشان درجه', sup2: 'بالانویس دو', sup3: 'بالانویس سه', acute: 'لهجه غلیظ', micro: 'نشان مایکرو', para: 'Pilcrow sign', // MISSING middot: 'نقطه میانی', cedil: 'Cedilla', // MISSING sup1: 'Superscript one', // MISSING ordm: 'Masculine ordinal indicator', // MISSING raquo: 'نشان زاویهدار دوتایی نقل قول راست چین', frac14: 'Vulgar fraction one quarter', // MISSING frac12: 'Vulgar fraction one half', // MISSING frac34: 'Vulgar fraction three quarters', // MISSING iquest: 'Inverted question mark', // MISSING Agrave: 'Latin capital letter A with grave accent', // MISSING Aacute: 'Latin capital letter A with acute accent', // MISSING Acirc: 'Latin capital letter A with circumflex', // MISSING Atilde: 'Latin capital letter A with tilde', // MISSING Auml: 'Latin capital letter A with diaeresis', // MISSING Aring: 'Latin capital letter A with ring above', // MISSING AElig: 'Latin Capital letter Æ', // MISSING Ccedil: 'Latin capital letter C with cedilla', // MISSING Egrave: 'Latin capital letter E with grave accent', // MISSING Eacute: 'Latin capital letter E with acute accent', // MISSING Ecirc: 'Latin capital letter E with circumflex', // MISSING Euml: 'Latin capital letter E with diaeresis', // MISSING Igrave: 'Latin capital letter I with grave accent', // MISSING Iacute: 'Latin capital letter I with acute accent', // MISSING Icirc: 'Latin capital letter I with circumflex', // MISSING Iuml: 'Latin capital letter I with diaeresis', // MISSING ETH: 'Latin capital letter Eth', // MISSING Ntilde: 'Latin capital letter N with tilde', // MISSING Ograve: 'Latin capital letter O with grave accent', // MISSING Oacute: 'Latin capital letter O with acute accent', // MISSING Ocirc: 'Latin capital letter O with circumflex', // MISSING Otilde: 'Latin capital letter O with tilde', // MISSING Ouml: 'Latin capital letter O with diaeresis', // MISSING times: 'Multiplication sign', // MISSING Oslash: 'Latin capital letter O with stroke', // MISSING Ugrave: 'Latin capital letter U with grave accent', // MISSING Uacute: 'Latin capital letter U with acute accent', // MISSING Ucirc: 'Latin capital letter U with circumflex', // MISSING Uuml: 'Latin capital letter U with diaeresis', // MISSING Yacute: 'Latin capital letter Y with acute accent', // MISSING THORN: 'Latin capital letter Thorn', // MISSING szlig: 'Latin small letter sharp s', // MISSING agrave: 'Latin small letter a with grave accent', // MISSING aacute: 'Latin small letter a with acute accent', // MISSING acirc: 'Latin small letter a with circumflex', // MISSING atilde: 'Latin small letter a with tilde', // MISSING auml: 'Latin small letter a with diaeresis', // MISSING aring: 'Latin small letter a with ring above', // MISSING aelig: 'Latin small letter æ', // MISSING ccedil: 'Latin small letter c with cedilla', // MISSING egrave: 'Latin small letter e with grave accent', // MISSING eacute: 'Latin small letter e with acute accent', // MISSING ecirc: 'Latin small letter e with circumflex', // MISSING euml: 'Latin small letter e with diaeresis', // MISSING igrave: 'Latin small letter i with grave accent', // MISSING iacute: 'Latin small letter i with acute accent', // MISSING icirc: 'Latin small letter i with circumflex', // MISSING iuml: 'Latin small letter i with diaeresis', // MISSING eth: 'Latin small letter eth', // MISSING ntilde: 'Latin small letter n with tilde', // MISSING ograve: 'Latin small letter o with grave accent', // MISSING oacute: 'Latin small letter o with acute accent', // MISSING ocirc: 'Latin small letter o with circumflex', // MISSING otilde: 'Latin small letter o with tilde', // MISSING ouml: 'Latin small letter o with diaeresis', // MISSING divide: 'Division sign', // MISSING oslash: 'Latin small letter o with stroke', // MISSING ugrave: 'Latin small letter u with grave accent', // MISSING uacute: 'Latin small letter u with acute accent', // MISSING ucirc: 'Latin small letter u with circumflex', // MISSING uuml: 'Latin small letter u with diaeresis', // MISSING yacute: 'Latin small letter y with acute accent', // MISSING thorn: 'Latin small letter thorn', // MISSING yuml: 'Latin small letter y with diaeresis', // MISSING OElig: 'Latin capital ligature OE', // MISSING oelig: 'Latin small ligature oe', // MISSING '372': 'Latin capital letter W with circumflex', // MISSING '374': 'Latin capital letter Y with circumflex', // MISSING '373': 'Latin small letter w with circumflex', // MISSING '375': 'Latin small letter y with circumflex', // MISSING sbquo: 'Single low-9 quotation mark', // MISSING '8219': 'Single high-reversed-9 quotation mark', // MISSING bdquo: 'Double low-9 quotation mark', // MISSING hellip: 'Horizontal ellipsis', // MISSING trade: 'Trade mark sign', // MISSING '9658': 'Black right-pointing pointer', // MISSING bull: 'Bullet', // MISSING rarr: 'Rightwards arrow', // MISSING rArr: 'Rightwards double arrow', // MISSING hArr: 'جهتنمای دوتایی چپ به راست', diams: 'Black diamond suit', // MISSING asymp: 'تقریبا برابر با' });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/specialchar/lang/fa.js
JavaScript
gpl3
6,350
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'eo', { euro: 'Eŭrosigno', lsquo: 'Supra 6-citilo', rsquo: 'Supra 9-citilo', ldquo: 'Supra 66-citilo', rdquo: 'Supra 99-citilo', ndash: 'Streketo', mdash: 'Substreko', iexcl: 'Renversita krisigno', cent: 'Cendosigno', pound: 'Pundosigno', curren: 'Monersigno', yen: 'Enosigno', brvbar: 'Rompita vertikala streko', sect: 'Kurba paragrafo', uml: 'Tremao', copy: 'Kopirajtosigno', ordf: 'Adjektiva numerfinaĵo', laquo: 'Duobla malplio-citilo', not: 'Negohoko', reg: 'Registrita marko', macr: 'Superstreko', deg: 'Gradosigno', sup2: 'Supra indico 2', sup3: 'Supra indico 3', acute: 'Dekstra korno', micro: 'Mikrosigno', para: 'Rekta paragrafo', middot: 'Meza punkto', cedil: 'Zoeto', sup1: 'Supra indico 1', ordm: 'Substantiva numerfinaĵo', raquo: 'Duobla plio-citilo', frac14: 'Kvaronosigno', frac12: 'Duonosigno', frac34: 'Trikvaronosigno', iquest: 'renversita demandosigno', Agrave: 'Latina ĉeflitero A kun liva korno', Aacute: 'Latina ĉeflitero A kun dekstra korno', Acirc: 'Latina ĉeflitero A kun ĉapelo', Atilde: 'Latina ĉeflitero A kun tildo', Auml: 'Latina ĉeflitero A kun tremao', Aring: 'Latina ĉeflitero A kun superringo', AElig: 'Latina ĉeflitera ligaturo Æ', Ccedil: 'Latina ĉeflitero C kun zoeto', Egrave: 'Latina ĉeflitero E kun liva korno', Eacute: 'Latina ĉeflitero E kun dekstra korno', Ecirc: 'Latina ĉeflitero E kun ĉapelo', Euml: 'Latina ĉeflitero E kun tremao', Igrave: 'Latina ĉeflitero I kun liva korno', Iacute: 'Latina ĉeflitero I kun dekstra korno', Icirc: 'Latina ĉeflitero I kun ĉapelo', Iuml: 'Latina ĉeflitero I kun tremao', ETH: 'Latina ĉeflitero islanda edo', Ntilde: 'Latina ĉeflitero N kun tildo', Ograve: 'Latina ĉeflitero O kun liva korno', Oacute: 'Latina ĉeflitero O kun dekstra korno', Ocirc: 'Latina ĉeflitero O kun ĉapelo', Otilde: 'Latina ĉeflitero O kun tildo', Ouml: 'Latina ĉeflitero O kun tremao', times: 'Multipliko', Oslash: 'Latina ĉeflitero O trastrekita', Ugrave: 'Latina ĉeflitero U kun liva korno', Uacute: 'Latina ĉeflitero U kun dekstra korno', Ucirc: 'Latina ĉeflitero U kun ĉapelo', Uuml: 'Latina ĉeflitero U kun tremao', Yacute: 'Latina ĉeflitero Y kun dekstra korno', THORN: 'Latina ĉeflitero islanda dorno', szlig: 'Latina etlitero germana sozo (akra s)', agrave: 'Latina etlitero a kun liva korno', aacute: 'Latina etlitero a kun dekstra korno', acirc: 'Latina etlitero a kun ĉapelo', atilde: 'Latina etlitero a kun tildo', auml: 'Latina etlitero a kun tremao', aring: 'Latina etlitero a kun superringo', aelig: 'Latina etlitera ligaturo æ', ccedil: 'Latina etlitero c kun zoeto', egrave: 'Latina etlitero e kun liva korno', eacute: 'Latina etlitero e kun dekstra korno', ecirc: 'Latina etlitero e kun ĉapelo', euml: 'Latina etlitero e kun tremao', igrave: 'Latina etlitero i kun liva korno', iacute: 'Latina etlitero i kun dekstra korno', icirc: 'Latina etlitero i kun ĉapelo', iuml: 'Latina etlitero i kun tremao', eth: 'Latina etlitero islanda edo', ntilde: 'Latina etlitero n kun tildo', ograve: 'Latina etlitero o kun liva korno', oacute: 'Latina etlitero o kun dekstra korno', ocirc: 'Latina etlitero o kun ĉapelo', otilde: 'Latina etlitero o kun tildo', ouml: 'Latina etlitero o kun tremao', divide: 'Dividosigno', oslash: 'Latina etlitero o trastrekita', ugrave: 'Latina etlitero u kun liva korno', uacute: 'Latina etlitero u kun dekstra korno', ucirc: 'Latina etlitero u kun ĉapelo', uuml: 'Latina etlitero u kun tremao', yacute: 'Latina etlitero y kun dekstra korno', thorn: 'Latina etlitero islanda dorno', yuml: 'Latina etlitero y kun tremao', OElig: 'Latina ĉeflitera ligaturo Œ', oelig: 'Latina etlitera ligaturo œ', '372': 'Latina ĉeflitero W kun ĉapelo', '374': 'Latina ĉeflitero Y kun ĉapelo', '373': 'Latina etlitero w kun ĉapelo', '375': 'Latina etlitero y kun ĉapelo', sbquo: 'Suba 9-citilo', '8219': 'Supra renversita 9-citilo', bdquo: 'Suba 99-citilo', hellip: 'Tripunkto', trade: 'Varmarka signo', '9658': 'Nigra sago dekstren', bull: 'Bulmarko', rarr: 'Sago dekstren', rArr: 'Duobla sago dekstren', hArr: 'Duobla sago maldekstren', diams: 'Nigra kvadrato', asymp: 'Preskaŭ egala' });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/specialchar/lang/eo.js
JavaScript
gpl3
4,555
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'de', { euro: 'Euro Zeichen', lsquo: 'Hochkomma links', rsquo: 'Hochkomma rechts', ldquo: 'Anführungszeichen links', rdquo: 'Anführungszeichen rechts', ndash: 'kleiner Strich', mdash: 'mittlerer Strich', iexcl: 'invertiertes Ausrufezeichen', cent: 'Cent', pound: 'Pfund', curren: 'Währung', yen: 'Yen', brvbar: 'gestrichelte Linie', sect: '§ Zeichen', uml: 'Diäresis', copy: 'Copyright', ordf: 'Feminine ordinal Anzeige', laquo: 'Nach links zeigenden Doppel-Winkel Anführungszeichen', not: 'Not-Zeichen', reg: 'Registriert', macr: 'Längezeichen', deg: 'Grad', sup2: 'Hoch 2', sup3: 'Hoch 3', acute: 'Akzentzeichen ', micro: 'Micro', para: 'Pilcrow-Zeichen', middot: 'Mittelpunkt', cedil: 'Cedilla', sup1: 'Hoch 1', ordm: 'Männliche Ordnungszahl Anzeige', raquo: 'Nach rechts zeigenden Doppel-Winkel Anführungszeichen', frac14: 'ein Viertel', frac12: 'Hälfte', frac34: 'Dreiviertel', iquest: 'Umgekehrtes Fragezeichen', Agrave: 'Lateinischer Buchstabe A mit AkzentGrave', Aacute: 'Lateinischer Buchstabe A mit Akutakzent', Acirc: 'Lateinischer Buchstabe A mit Zirkumflex', Atilde: 'Lateinischer Buchstabe A mit Tilde', Auml: 'Lateinischer Buchstabe A mit Trema', Aring: 'Lateinischer Buchstabe A mit Ring oben', AElig: 'Lateinischer Buchstabe Æ', Ccedil: 'Lateinischer Buchstabe C mit Cedille', Egrave: 'Lateinischer Buchstabe E mit AkzentGrave', Eacute: 'Lateinischer Buchstabe E mit Akutakzent', Ecirc: 'Lateinischer Buchstabe E mit Zirkumflex', Euml: 'Lateinischer Buchstabe E Trema', Igrave: 'Lateinischer Buchstabe I mit AkzentGrave', Iacute: 'Lateinischer Buchstabe I mit Akutakzent', Icirc: 'Lateinischer Buchstabe I mit Zirkumflex', Iuml: 'Lateinischer Buchstabe I mit Trema', ETH: 'Lateinischer Buchstabe Eth', Ntilde: 'Lateinischer Buchstabe N mit Tilde', Ograve: 'Lateinischer Buchstabe O mit AkzentGrave', Oacute: 'Lateinischer Buchstabe O mit Akutakzent', Ocirc: 'Lateinischer Buchstabe O mit Zirkumflex', Otilde: 'Lateinischer Buchstabe O mit Tilde', Ouml: 'Lateinischer Buchstabe O mit Trema', times: 'Multiplikation', Oslash: 'Lateinischer Buchstabe O durchgestrichen', Ugrave: 'Lateinischer Buchstabe U mit Akzentgrave', Uacute: 'Lateinischer Buchstabe U mit Akutakzent', Ucirc: 'Lateinischer Buchstabe U mit Zirkumflex', Uuml: 'Lateinischer Buchstabe a mit Trema', Yacute: 'Lateinischer Buchstabe a mit Akzent', THORN: 'Lateinischer Buchstabe mit Dorn', szlig: 'Kleiner lateinischer Buchstabe scharfe s', agrave: 'Kleiner lateinischer Buchstabe a mit Accent grave', aacute: 'Kleiner lateinischer Buchstabe a mit Akut', acirc: 'Lateinischer Buchstabe a mit Zirkumflex', atilde: 'Lateinischer Buchstabe a mit Tilde', auml: 'Kleiner lateinischer Buchstabe a mit Trema', aring: 'Kleiner lateinischer Buchstabe a mit Ring oben', aelig: 'Lateinischer Buchstabe æ', ccedil: 'Kleiner lateinischer Buchstabe c mit Cedille', egrave: 'Kleiner lateinischer Buchstabe e mit Accent grave', eacute: 'Kleiner lateinischer Buchstabe e mit Akut', ecirc: 'Kleiner lateinischer Buchstabe e mit Zirkumflex', euml: 'Kleiner lateinischer Buchstabe e mit Trema', igrave: 'Kleiner lateinischer Buchstabe i mit AkzentGrave', iacute: 'Kleiner lateinischer Buchstabe i mit Akzent', icirc: 'Kleiner lateinischer Buchstabe i mit Zirkumflex', iuml: 'Kleiner lateinischer Buchstabe i mit Trema', eth: 'Kleiner lateinischer Buchstabe eth', ntilde: 'Kleiner lateinischer Buchstabe n mit Tilde', ograve: 'Kleiner lateinischer Buchstabe o mit Accent grave', oacute: 'Kleiner lateinischer Buchstabe o mit Akzent', ocirc: 'Kleiner lateinischer Buchstabe o mit Zirkumflex', otilde: 'Lateinischer Buchstabe i mit Tilde', ouml: 'Kleiner lateinischer Buchstabe o mit Trema', divide: 'Divisionszeichen', oslash: 'Kleiner lateinischer Buchstabe o durchgestrichen', ugrave: 'Kleiner lateinischer Buchstabe u mit Accent grave', uacute: 'Kleiner lateinischer Buchstabe u mit Akut', ucirc: 'Kleiner lateinischer Buchstabe u mit Zirkumflex', uuml: 'Kleiner lateinischer Buchstabe u mit Trema', yacute: 'Kleiner lateinischer Buchstabe y mit Akut', thorn: 'Kleiner lateinischer Buchstabe Dorn', yuml: 'Kleiner lateinischer Buchstabe y mit Trema', OElig: 'Lateinischer Buchstabe Ligatur OE', oelig: 'Kleiner lateinischer Buchstabe Ligatur OE', '372': 'Lateinischer Buchstabe W mit Zirkumflex', '374': 'Lateinischer Buchstabe Y mit Zirkumflex', '373': 'Kleiner lateinischer Buchstabe w mit Zirkumflex', '375': 'Kleiner lateinischer Buchstabe y mit Zirkumflex', sbquo: 'Tiefergestelltes Komma', '8219': 'Rumgedrehtes Komma', bdquo: 'Doppeltes Anführungszeichen unten', hellip: 'horizontale Auslassungspunkte', trade: 'Handelszeichen', '9658': 'Dreickspfeil rechts', bull: 'Bullet', rarr: 'Pfeil rechts', rArr: 'Doppelpfeil rechts', hArr: 'Doppelpfeil links', diams: 'Karo', asymp: 'Ungefähr' });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/specialchar/lang/de.js
JavaScript
gpl3
5,207
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'no', { euro: 'Eurosymbol', lsquo: 'Venstre enkelt anførselstegn', rsquo: 'Høyre enkelt anførselstegn', ldquo: 'Venstre dobbelt anførselstegn', rdquo: 'Høyre anførsesltegn', ndash: 'Kort tankestrek', mdash: 'Lang tankestrek', iexcl: 'Omvendt utropstegn', cent: 'Centsymbol', pound: 'Pundsymbol', curren: 'Valutategn', yen: 'Yensymbol', brvbar: 'Brutt loddrett strek', sect: 'Paragraftegn', uml: 'Tøddel', copy: 'Copyrighttegn', ordf: 'Feminin ordensindikator', laquo: 'Venstre anførselstegn', not: 'Negasjonstegn', reg: 'Registrert varemerke-tegn', macr: 'Makron', deg: 'Gradsymbol', sup2: 'Hevet totall', sup3: 'Hevet tretall', acute: 'Akutt aksent', micro: 'Mikrosymbol', para: 'Avsnittstegn', middot: 'Midtstilt prikk', cedil: 'Cedille', sup1: 'Hevet ettall', ordm: 'Maskulin ordensindikator', raquo: 'Høyre anførselstegn', frac14: 'Fjerdedelsbrøk', frac12: 'Halvbrøk', frac34: 'Tre fjerdedelers brøk', iquest: 'Omvendt spørsmålstegn', Agrave: 'Stor A med grav aksent', Aacute: 'Stor A med akutt aksent', Acirc: 'Stor A med cirkumfleks', Atilde: 'Stor A med tilde', Auml: 'Stor A med tøddel', Aring: 'Stor Å', AElig: 'Stor Æ', Ccedil: 'Stor C med cedille', Egrave: 'Stor E med grav aksent', Eacute: 'Stor E med akutt aksent', Ecirc: 'Stor E med cirkumfleks', Euml: 'Stor E med tøddel', Igrave: 'Stor I med grav aksent', Iacute: 'Stor I med akutt aksent', Icirc: 'Stor I med cirkumfleks', Iuml: 'Stor I med tøddel', ETH: 'Stor Edd/stungen D', Ntilde: 'Stor N med tilde', Ograve: 'Stor O med grav aksent', Oacute: 'Stor O med akutt aksent', Ocirc: 'Stor O med cirkumfleks', Otilde: 'Stor O med tilde', Ouml: 'Stor O med tøddel', times: 'Multiplikasjonstegn', Oslash: 'Stor Ø', Ugrave: 'Stor U med grav aksent', Uacute: 'Stor U med akutt aksent', Ucirc: 'Stor U med cirkumfleks', Uuml: 'Stor U med tøddel', Yacute: 'Stor Y med akutt aksent', THORN: 'Stor Thorn', szlig: 'Liten dobbelt-s/Eszett', agrave: 'Liten a med grav aksent', aacute: 'Liten a med akutt aksent', acirc: 'Liten a med cirkumfleks', atilde: 'Liten a med tilde', auml: 'Liten a med tøddel', aring: 'Liten å', aelig: 'Liten æ', ccedil: 'Liten c med cedille', egrave: 'Liten e med grav aksent', eacute: 'Liten e med akutt aksent', ecirc: 'Liten e med cirkumfleks', euml: 'Liten e med tøddel', igrave: 'Liten i med grav aksent', iacute: 'Liten i med akutt aksent', icirc: 'Liten i med cirkumfleks', iuml: 'Liten i med tøddel', eth: 'Liten edd/stungen d', ntilde: 'Liten n med tilde', ograve: 'Liten o med grav aksent', oacute: 'Liten o med akutt aksent', ocirc: 'Liten o med cirkumfleks', otilde: 'Liten o med tilde', ouml: 'Liten o med tøddel', divide: 'Divisjonstegn', oslash: 'Liten ø', ugrave: 'Liten u med grav aksent', uacute: 'Liten u med akutt aksent', ucirc: 'Liten u med cirkumfleks', uuml: 'Liten u med tøddel', yacute: 'Liten y med akutt aksent', thorn: 'Liten thorn', yuml: 'Liten y med tøddel', OElig: 'Stor ligatur av O og E', oelig: 'Liten ligatur av o og e', '372': 'Stor W med cirkumfleks', '374': 'Stor Y med cirkumfleks', '373': 'Liten w med cirkumfleks', '375': 'Liten y med cirkumfleks', sbquo: 'Enkelt lavt 9-anførselstegn', '8219': 'Enkelt høyt reversert 9-anførselstegn', bdquo: 'Dobbelt lavt 9-anførselstegn', hellip: 'Ellipse', trade: 'Varemerkesymbol', '9658': 'Svart høyrevendt peker', bull: 'Tykk interpunkt', rarr: 'Høyrevendt pil', rArr: 'Dobbel høyrevendt pil', hArr: 'Dobbel venstrevendt pil', diams: 'Svart ruter', asymp: 'Omtrent likhetstegn' });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/specialchar/lang/no.js
JavaScript
gpl3
3,920
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'it', { euro: 'Simbolo Euro', lsquo: 'Virgoletta singola sinistra', rsquo: 'Virgoletta singola destra', ldquo: 'Virgolette aperte', rdquo: 'Virgolette chiuse', ndash: 'Trattino', mdash: 'Trattino lungo', iexcl: 'Punto esclavamativo invertito', cent: 'Simbolo Cent', pound: 'Simbolo Sterlina', curren: 'Simbolo Moneta', yen: 'Simbolo Yen', brvbar: 'Barra interrotta', sect: 'Simbolo di sezione', uml: 'Dieresi', copy: 'Simbolo Copyright', ordf: 'Indicatore ordinale femminile', laquo: 'Virgolette basse aperte', not: 'Nessun segno', reg: 'Simbolo Registrato', macr: 'Macron', deg: 'Simbolo Grado', sup2: 'Apice Due', sup3: 'Apice Tre', acute: 'Accento acuto', micro: 'Simbolo Micro', para: 'Simbolo Paragrafo', middot: 'Punto centrale', cedil: 'Cediglia', sup1: 'Apice Uno', ordm: 'Indicatore ordinale maschile', raquo: 'Virgolette basse chiuse', frac14: 'Frazione volgare un quarto', frac12: 'Frazione volgare un mezzo', frac34: 'Frazione volgare tre quarti', iquest: 'Punto interrogativo invertito', Agrave: 'Lettera maiuscola latina A con accento grave', Aacute: 'Lettera maiuscola latina A con accento acuto', Acirc: 'Lettera maiuscola latina A con accento circonflesso', Atilde: 'Lettera maiuscola latina A con tilde', Auml: 'Lettera maiuscola latina A con dieresi', Aring: 'Lettera maiuscola latina A con anello sopra', AElig: 'Lettera maiuscola latina AE', Ccedil: 'Lettera maiuscola latina C con cediglia', Egrave: 'Lettera maiuscola latina E con accento grave', Eacute: 'Lettera maiuscola latina E con accento acuto', Ecirc: 'Lettera maiuscola latina E con accento circonflesso', Euml: 'Lettera maiuscola latina E con dieresi', Igrave: 'Lettera maiuscola latina I con accento grave', Iacute: 'Lettera maiuscola latina I con accento acuto', Icirc: 'Lettera maiuscola latina I con accento circonflesso', Iuml: 'Lettera maiuscola latina I con dieresi', ETH: 'Lettera maiuscola latina Eth', Ntilde: 'Lettera maiuscola latina N con tilde', Ograve: 'Lettera maiuscola latina O con accento grave', Oacute: 'Lettera maiuscola latina O con accento acuto', Ocirc: 'Lettera maiuscola latina O con accento circonflesso', Otilde: 'Lettera maiuscola latina O con tilde', Ouml: 'Lettera maiuscola latina O con dieresi', times: 'Simbolo di moltiplicazione', Oslash: 'Lettera maiuscola latina O barrata', Ugrave: 'Lettera maiuscola latina U con accento grave', Uacute: 'Lettera maiuscola latina U con accento acuto', Ucirc: 'Lettera maiuscola latina U con accento circonflesso', Uuml: 'Lettera maiuscola latina U con accento circonflesso', Yacute: 'Lettera maiuscola latina Y con accento acuto', THORN: 'Lettera maiuscola latina Thorn', szlig: 'Lettera latina minuscola doppia S', agrave: 'Lettera minuscola latina a con accento grave', aacute: 'Lettera minuscola latina a con accento acuto', acirc: 'Lettera minuscola latina a con accento circonflesso', atilde: 'Lettera minuscola latina a con tilde', auml: 'Lettera minuscola latina a con dieresi', aring: 'Lettera minuscola latina a con anello superiore', aelig: 'Lettera minuscola latina ae', ccedil: 'Lettera minuscola latina c con cediglia', egrave: 'Lettera minuscola latina e con accento grave', eacute: 'Lettera minuscola latina e con accento acuto', ecirc: 'Lettera minuscola latina e con accento circonflesso', euml: 'Lettera minuscola latina e con dieresi', igrave: 'Lettera minuscola latina i con accento grave', iacute: 'Lettera minuscola latina i con accento acuto', icirc: 'Lettera minuscola latina i con accento circonflesso', iuml: 'Lettera minuscola latina i con dieresi', eth: 'Lettera minuscola latina eth', ntilde: 'Lettera minuscola latina n con tilde', ograve: 'Lettera minuscola latina o con accento grave', oacute: 'Lettera minuscola latina o con accento acuto', ocirc: 'Lettera minuscola latina o con accento circonflesso', otilde: 'Lettera minuscola latina o con tilde', ouml: 'Lettera minuscola latina o con dieresi', divide: 'Simbolo di divisione', oslash: 'Lettera minuscola latina o barrata', ugrave: 'Lettera minuscola latina u con accento grave', uacute: 'Lettera minuscola latina u con accento acuto', ucirc: 'Lettera minuscola latina u con accento circonflesso', uuml: 'Lettera minuscola latina u con dieresi', yacute: 'Lettera minuscola latina y con accento acuto', thorn: 'Lettera minuscola latina thorn', yuml: 'Lettera minuscola latina y con dieresi', OElig: 'Legatura maiuscola latina OE', oelig: 'Legatura minuscola latina oe', '372': 'Lettera maiuscola latina W con accento circonflesso', '374': 'Lettera maiuscola latina Y con accento circonflesso', '373': 'Lettera minuscola latina w con accento circonflesso', '375': 'Lettera minuscola latina y con accento circonflesso', sbquo: 'Singola virgoletta bassa low-9', '8219': 'Singola virgoletta bassa low-9 inversa', bdquo: 'Doppia virgoletta bassa low-9', hellip: 'Ellissi orizzontale', trade: 'Simbolo TM', '9658': 'Puntatore nero rivolto verso destra', bull: 'Punto', rarr: 'Freccia verso destra', rArr: 'Doppia freccia verso destra', hArr: 'Doppia freccia sinistra destra', diams: 'Simbolo nero diamante', asymp: 'Quasi uguale a' });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/specialchar/lang/it.js
JavaScript
gpl3
5,505
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'nl', { euro: 'Euro-teken', lsquo: 'Linker enkel aanhalingsteken', rsquo: 'Rechter enkel aanhalingsteken', ldquo: 'Linker dubbel aanhalingsteken', rdquo: 'Rechter dubbel aanhalingsteken', ndash: 'En dash', mdash: 'Em dash', iexcl: 'Omgekeerd uitroepteken', cent: 'Cent-teken', pound: 'Pond-teken', curren: 'Valuta-teken', yen: 'Yen-teken', brvbar: 'Gebroken streep', sect: 'Paragraaf-teken', uml: 'Trema', copy: 'Copyright-teken', ordf: 'Vrouwelijk ordinaal', laquo: 'Linker guillemet', not: 'Ongelijk-teken', reg: 'Geregistreerd handelsmerk-teken', macr: 'Macron', deg: 'Graden-teken', sup2: 'Superscript twee', sup3: 'Superscript drie', acute: 'Accent aigu', micro: 'Mico-teken', para: 'Alinea-teken', middot: 'Halfhoge punt', cedil: 'Cedille', sup1: 'Superscript een', ordm: 'Mannelijk ordinaal', raquo: 'Rechter guillemet', frac14: 'Breuk kwart', frac12: 'Breuk half', frac34: 'Breuk driekwart', iquest: 'Omgekeerd vraagteken', Agrave: 'Latijnse hoofdletter A met een accent grave', Aacute: 'Latijnse hoofdletter A met een accent aigu', Acirc: 'Latijnse hoofdletter A met een circonflexe', Atilde: 'Latijnse hoofdletter A met een tilde', Auml: 'Latijnse hoofdletter A met een trema', Aring: 'Latijnse hoofdletter A met een corona', AElig: 'Latijnse hoofdletter Æ', Ccedil: 'Latijnse hoofdletter C met een cedille', Egrave: 'Latijnse hoofdletter E met een accent grave', Eacute: 'Latijnse hoofdletter E met een accent aigu', Ecirc: 'Latijnse hoofdletter E met een circonflexe', Euml: 'Latijnse hoofdletter E met een trema', Igrave: 'Latijnse hoofdletter I met een accent grave', Iacute: 'Latijnse hoofdletter I met een accent aigu', Icirc: 'Latijnse hoofdletter I met een circonflexe', Iuml: 'Latijnse hoofdletter I met een trema', ETH: 'Latijnse hoofdletter Eth', Ntilde: 'Latijnse hoofdletter N met een tilde', Ograve: 'Latijnse hoofdletter O met een accent grave', Oacute: 'Latijnse hoofdletter O met een accent aigu', Ocirc: 'Latijnse hoofdletter O met een circonflexe', Otilde: 'Latijnse hoofdletter O met een tilde', Ouml: 'Latijnse hoofdletter O met een trema', times: 'Maal-teken', Oslash: 'Latijnse hoofdletter O met een schuine streep', Ugrave: 'Latijnse hoofdletter U met een accent grave', Uacute: 'Latijnse hoofdletter U met een accent aigu', Ucirc: 'Latijnse hoofdletter U met een circonflexe', Uuml: 'Latijnse hoofdletter U met een trema', Yacute: 'Latijnse hoofdletter Y met een accent aigu', THORN: 'Latijnse hoofdletter Thorn', szlig: 'Latijnse kleine ringel-s', agrave: 'Latijnse kleine letter a met een accent grave', aacute: 'Latijnse kleine letter a met een accent aigu', acirc: 'Latijnse kleine letter a met een circonflexe', atilde: 'Latijnse kleine letter a met een tilde', auml: 'Latijnse kleine letter a met een trema', aring: 'Latijnse kleine letter a met een corona', aelig: 'Latijnse kleine letter æ', ccedil: 'Latijnse kleine letter c met een cedille', egrave: 'Latijnse kleine letter e met een accent grave', eacute: 'Latijnse kleine letter e met een accent aigu', ecirc: 'Latijnse kleine letter e met een circonflexe', euml: 'Latijnse kleine letter e met een trema', igrave: 'Latijnse kleine letter i met een accent grave', iacute: 'Latijnse kleine letter i met een accent aigu', icirc: 'Latijnse kleine letter i met een circonflexe', iuml: 'Latijnse kleine letter i met een trema', eth: 'Latijnse kleine letter eth', ntilde: 'Latijnse kleine letter n met een tilde', ograve: 'Latijnse kleine letter o met een accent grave', oacute: 'Latijnse kleine letter o met een accent aigu', ocirc: 'Latijnse kleine letter o met een circonflexe', otilde: 'Latijnse kleine letter o met een tilde', ouml: 'Latijnse kleine letter o met een trema', divide: 'Deel-teken', oslash: 'Latijnse kleine letter o met een schuine streep', ugrave: 'Latijnse kleine letter u met een accent grave', uacute: 'Latijnse kleine letter u met een accent aigu', ucirc: 'Latijnse kleine letter u met een circonflexe', uuml: 'Latijnse kleine letter u met een trema', yacute: 'Latijnse kleine letter y met een accent aigu', thorn: 'Latijnse kleine letter thorn', yuml: 'Latijnse kleine letter y met een trema', OElig: 'Latijnse hoofdletter Œ', oelig: 'Latijnse kleine letter œ', '372': 'Latijnse hoofdletter W met een circonflexe', '374': 'Latijnse hoofdletter Y met een circonflexe', '373': 'Latijnse kleine letter w met een circonflexe', '375': 'Latijnse kleine letter y met een circonflexe', sbquo: 'Lage enkele aanhalingsteken', '8219': 'Hoge omgekeerde enkele aanhalingsteken', bdquo: 'Lage dubbele aanhalingsteken', hellip: 'Beletselteken', trade: 'Trademark-teken', '9658': 'Zwarte driehoek naar rechts', bull: 'Bullet', rarr: 'Pijl naar rechts', rArr: 'Dubbele pijl naar rechts', hArr: 'Dubbele pijl naar links', diams: 'Zwart ruitje', asymp: 'Benaderingsteken' });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/specialchar/lang/nl.js
JavaScript
gpl3
5,211
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'et', { euro: 'Euromärk', lsquo: 'Alustav ühekordne jutumärk', rsquo: 'Lõpetav ühekordne jutumärk', ldquo: 'Alustav kahekordne jutumärk', rdquo: 'Lõpetav kahekordne jutumärk', ndash: 'Enn-kriips', mdash: 'Emm-kriips', iexcl: 'Pööratud hüüumärk', cent: 'Sendimärk', pound: 'Naela märk', curren: 'Valuutamärk', yen: 'Jeeni märk', brvbar: 'Katkestatud kriips', sect: 'Lõigu märk', uml: 'Täpid', copy: 'Autoriõiguse märk', ordf: 'Feminine ordinal indicator', // MISSING laquo: 'Left-pointing double angle quotation mark', // MISSING not: 'Ei-märk', reg: 'Registered sign', // MISSING macr: 'Macron', // MISSING deg: 'Kraadimärk', sup2: 'Ülaindeks kaks', sup3: 'Ülaindeks kolm', acute: 'Acute accent', // MISSING micro: 'Mikro-märk', para: 'Pilcrow sign', // MISSING middot: 'Keskpunkt', cedil: 'Cedilla', // MISSING sup1: 'Ülaindeks üks', ordm: 'Masculine ordinal indicator', // MISSING raquo: 'Right-pointing double angle quotation mark', // MISSING frac14: 'Vulgar fraction one quarter', // MISSING frac12: 'Vulgar fraction one half', // MISSING frac34: 'Vulgar fraction three quarters', // MISSING iquest: 'Inverted question mark', // MISSING Agrave: 'Latin capital letter A with grave accent', // MISSING Aacute: 'Latin capital letter A with acute accent', // MISSING Acirc: 'Latin capital letter A with circumflex', // MISSING Atilde: 'Ladina suur A tildega', Auml: 'Latin capital letter A with diaeresis', // MISSING Aring: 'Latin capital letter A with ring above', // MISSING AElig: 'Latin Capital letter Æ', // MISSING Ccedil: 'Latin capital letter C with cedilla', // MISSING Egrave: 'Latin capital letter E with grave accent', // MISSING Eacute: 'Latin capital letter E with acute accent', // MISSING Ecirc: 'Latin capital letter E with circumflex', // MISSING Euml: 'Latin capital letter E with diaeresis', // MISSING Igrave: 'Latin capital letter I with grave accent', // MISSING Iacute: 'Latin capital letter I with acute accent', // MISSING Icirc: 'Latin capital letter I with circumflex', // MISSING Iuml: 'Latin capital letter I with diaeresis', // MISSING ETH: 'Latin capital letter Eth', // MISSING Ntilde: 'Latin capital letter N with tilde', // MISSING Ograve: 'Latin capital letter O with grave accent', // MISSING Oacute: 'Latin capital letter O with acute accent', // MISSING Ocirc: 'Latin capital letter O with circumflex', // MISSING Otilde: 'Latin capital letter O with tilde', // MISSING Ouml: 'Täppidega ladina suur O', times: 'Multiplication sign', // MISSING Oslash: 'Latin capital letter O with stroke', // MISSING Ugrave: 'Latin capital letter U with grave accent', // MISSING Uacute: 'Latin capital letter U with acute accent', // MISSING Ucirc: 'Kandilise katusega suur ladina U', Uuml: 'Täppidega ladina suur U', Yacute: 'Latin capital letter Y with acute accent', // MISSING THORN: 'Latin capital letter Thorn', // MISSING szlig: 'Ladina väike terav s', agrave: 'Latin small letter a with grave accent', // MISSING aacute: 'Latin small letter a with acute accent', // MISSING acirc: 'Kandilise katusega ladina väike a', atilde: 'Tildega ladina väike a', auml: 'Täppidega ladina väike a', aring: 'Latin small letter a with ring above', // MISSING aelig: 'Latin small letter æ', // MISSING ccedil: 'Latin small letter c with cedilla', // MISSING egrave: 'Latin small letter e with grave accent', // MISSING eacute: 'Latin small letter e with acute accent', // MISSING ecirc: 'Latin small letter e with circumflex', // MISSING euml: 'Latin small letter e with diaeresis', // MISSING igrave: 'Latin small letter i with grave accent', // MISSING iacute: 'Latin small letter i with acute accent', // MISSING icirc: 'Latin small letter i with circumflex', // MISSING iuml: 'Latin small letter i with diaeresis', // MISSING eth: 'Latin small letter eth', // MISSING ntilde: 'Latin small letter n with tilde', // MISSING ograve: 'Latin small letter o with grave accent', // MISSING oacute: 'Latin small letter o with acute accent', // MISSING ocirc: 'Latin small letter o with circumflex', // MISSING otilde: 'Latin small letter o with tilde', // MISSING ouml: 'Latin small letter o with diaeresis', // MISSING divide: 'Division sign', // MISSING oslash: 'Latin small letter o with stroke', // MISSING ugrave: 'Latin small letter u with grave accent', // MISSING uacute: 'Latin small letter u with acute accent', // MISSING ucirc: 'Latin small letter u with circumflex', // MISSING uuml: 'Latin small letter u with diaeresis', // MISSING yacute: 'Latin small letter y with acute accent', // MISSING thorn: 'Latin small letter thorn', // MISSING yuml: 'Latin small letter y with diaeresis', // MISSING OElig: 'Latin capital ligature OE', // MISSING oelig: 'Latin small ligature oe', // MISSING '372': 'Latin capital letter W with circumflex', // MISSING '374': 'Latin capital letter Y with circumflex', // MISSING '373': 'Latin small letter w with circumflex', // MISSING '375': 'Latin small letter y with circumflex', // MISSING sbquo: 'Single low-9 quotation mark', // MISSING '8219': 'Single high-reversed-9 quotation mark', // MISSING bdquo: 'Double low-9 quotation mark', // MISSING hellip: 'Horizontal ellipsis', // MISSING trade: 'Trade mark sign', // MISSING '9658': 'Black right-pointing pointer', // MISSING bull: 'Bullet', // MISSING rarr: 'Rightwards arrow', // MISSING rArr: 'Rightwards double arrow', // MISSING hArr: 'Left right double arrow', // MISSING diams: 'Black diamond suit', // MISSING asymp: 'Almost equal to' // MISSING });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/specialchar/lang/et.js
JavaScript
gpl3
5,945
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'cs', { euro: 'Znak eura', lsquo: 'Počáteční uvozovka jednoduchá', rsquo: 'Koncová uvozovka jednoduchá', ldquo: 'Počáteční uvozovka dvojitá', rdquo: 'Koncová uvozovka dvojitá', ndash: 'En pomlčka', mdash: 'Em pomlčka', iexcl: 'Obrácený vykřičník', cent: 'Znak centu', pound: 'Znak libry', curren: 'Znak měny', yen: 'Znak jenu', brvbar: 'Přerušená svislá čára', sect: 'Znak oddílu', uml: 'Přehláska', copy: 'Znak copyrightu', ordf: 'Ženský indikátor rodu', laquo: 'Znak dvojitých lomených uvozovek vlevo', not: 'Logistický zápor', reg: 'Znak registrace', macr: 'Pomlčka nad', deg: 'Znak stupně', sup2: 'Dvojka jako horní index', sup3: 'Trojka jako horní index', acute: 'Čárka nad vpravo', micro: 'Znak mikro', para: 'Znak odstavce', middot: 'Tečka uprostřed', cedil: 'Ocásek vlevo', sup1: 'Jednička jako horní index', ordm: 'Mužský indikátor rodu', raquo: 'Znak dvojitých lomených uvozovek vpravo', frac14: 'Obyčejný zlomek jedna čtvrtina', frac12: 'Obyčejný zlomek jedna polovina', frac34: 'Obyčejný zlomek tři čtvrtiny', iquest: 'Znak obráceného otazníku', Agrave: 'Velké písmeno latinky A s čárkou nad vlevo', Aacute: 'Velké písmeno latinky A s čárkou nad vpravo', Acirc: 'Velké písmeno latinky A s vokáněm', Atilde: 'Velké písmeno latinky A s tildou', Auml: 'Velké písmeno latinky A s dvěma tečkami', Aring: 'Velké písmeno latinky A s kroužkem nad', AElig: 'Velké písmeno latinky Ae', Ccedil: 'Velké písmeno latinky C s ocáskem vlevo', Egrave: 'Velké písmeno latinky E s čárkou nad vlevo', Eacute: 'Velké písmeno latinky E s čárkou nad vpravo', Ecirc: 'Velké písmeno latinky E s vokáněm', Euml: 'Velké písmeno latinky E s dvěma tečkami', Igrave: 'Velké písmeno latinky I s čárkou nad vlevo', Iacute: 'Velké písmeno latinky I s čárkou nad vpravo', Icirc: 'Velké písmeno latinky I s vokáněm', Iuml: 'Velké písmeno latinky I s dvěma tečkami', ETH: 'Velké písmeno latinky Eth', Ntilde: 'Velké písmeno latinky N s tildou', Ograve: 'Velké písmeno latinky O s čárkou nad vlevo', Oacute: 'Velké písmeno latinky O s čárkou nad vpravo', Ocirc: 'Velké písmeno latinky O s vokáněm', Otilde: 'Velké písmeno latinky O s tildou', Ouml: 'Velké písmeno latinky O s dvěma tečkami', times: 'Znak násobení', Oslash: 'Velké písmeno latinky O přeškrtnuté', Ugrave: 'Velké písmeno latinky U s čárkou nad vlevo', Uacute: 'Velké písmeno latinky U s čárkou nad vpravo', Ucirc: 'Velké písmeno latinky U s vokáněm', Uuml: 'Velké písmeno latinky U s dvěma tečkami', Yacute: 'Velké písmeno latinky Y s čárkou nad vpravo', THORN: 'Velké písmeno latinky Thorn', szlig: 'Malé písmeno latinky ostré s', agrave: 'Malé písmeno latinky a s čárkou nad vlevo', aacute: 'Malé písmeno latinky a s čárkou nad vpravo', acirc: 'Malé písmeno latinky a s vokáněm', atilde: 'Malé písmeno latinky a s tildou', auml: 'Malé písmeno latinky a s dvěma tečkami', aring: 'Malé písmeno latinky a s kroužkem nad', aelig: 'Malé písmeno latinky ae', ccedil: 'Malé písmeno latinky c s ocáskem vlevo', egrave: 'Malé písmeno latinky e s čárkou nad vlevo', eacute: 'Malé písmeno latinky e s čárkou nad vpravo', ecirc: 'Malé písmeno latinky e s vokáněm', euml: 'Malé písmeno latinky e s dvěma tečkami', igrave: 'Malé písmeno latinky i s čárkou nad vlevo', iacute: 'Malé písmeno latinky i s čárkou nad vpravo', icirc: 'Malé písmeno latinky i s vokáněm', iuml: 'Malé písmeno latinky i s dvěma tečkami', eth: 'Malé písmeno latinky eth', ntilde: 'Malé písmeno latinky n s tildou', ograve: 'Malé písmeno latinky o s čárkou nad vlevo', oacute: 'Malé písmeno latinky o s čárkou nad vpravo', ocirc: 'Malé písmeno latinky o s vokáněm', otilde: 'Malé písmeno latinky o s tildou', ouml: 'Malé písmeno latinky o s dvěma tečkami', divide: 'Znak dělení', oslash: 'Malé písmeno latinky o přeškrtnuté', ugrave: 'Malé písmeno latinky u s čárkou nad vlevo', uacute: 'Malé písmeno latinky u s čárkou nad vpravo', ucirc: 'Malé písmeno latinky u s vokáněm', uuml: 'Malé písmeno latinky u s dvěma tečkami', yacute: 'Malé písmeno latinky y s čárkou nad vpravo', thorn: 'Malé písmeno latinky thorn', yuml: 'Malé písmeno latinky y s dvěma tečkami', OElig: 'Velká ligatura latinky OE', oelig: 'Malá ligatura latinky OE', '372': 'Velké písmeno latinky W s vokáněm', '374': 'Velké písmeno latinky Y s vokáněm', '373': 'Malé písmeno latinky w s vokáněm', '375': 'Malé písmeno latinky y s vokáněm', sbquo: 'Dolní 9 uvozovka jednoduchá', '8219': 'Horní obrácená 9 uvozovka jednoduchá', bdquo: 'Dolní 9 uvozovka dvojitá', hellip: 'Trojtečkový úvod', trade: 'Obchodní značka', '9658': 'Černý ukazatel směřující vpravo', bull: 'Kolečko', rarr: 'Šipka vpravo', rArr: 'Dvojitá šipka vpravo', hArr: 'Dvojitá šipka vlevo a vpravo', diams: 'Černé piky', asymp: 'Téměř se rovná' });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/specialchar/lang/cs.js
JavaScript
gpl3
5,457
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'hr', { euro: 'Euro znak', lsquo: 'Lijevi jednostruki navodnik', rsquo: 'Desni jednostruki navodnik', ldquo: 'Lijevi dvostruki navodnik', rdquo: 'Desni dvostruki navodnik', ndash: 'En crtica', mdash: 'Em crtica', iexcl: 'Naopaki uskličnik', cent: 'Cent znak', pound: 'Funta znak', curren: 'Znak valute', yen: 'Yen znak', brvbar: 'Potrgana prečka', sect: 'Znak odjeljka', uml: 'Diaeresis', // MISSING copy: 'Copyright znak', ordf: 'Feminine ordinal indicator', // MISSING laquo: 'Lijevi dvostruki uglati navodnik', not: 'Not znak', reg: 'Registered znak', macr: 'Macron', // MISSING deg: 'Stupanj znak', sup2: 'Superscript two', // MISSING sup3: 'Superscript three', // MISSING acute: 'Acute accent', // MISSING micro: 'Micro sign', // MISSING para: 'Pilcrow sign', // MISSING middot: 'Srednja točka', cedil: 'Cedilla', // MISSING sup1: 'Superscript one', // MISSING ordm: 'Masculine ordinal indicator', // MISSING raquo: 'Desni dvostruku uglati navodnik', frac14: 'Vulgar fraction one quarter', // MISSING frac12: 'Vulgar fraction one half', // MISSING frac34: 'Vulgar fraction three quarters', // MISSING iquest: 'Naopaki upitnik', Agrave: 'Veliko latinsko slovo A s akcentom', Aacute: 'Latin capital letter A with acute accent', // MISSING Acirc: 'Latin capital letter A with circumflex', // MISSING Atilde: 'Latin capital letter A with tilde', // MISSING Auml: 'Latin capital letter A with diaeresis', // MISSING Aring: 'Latin capital letter A with ring above', // MISSING AElig: 'Latin Capital letter Æ', // MISSING Ccedil: 'Latin capital letter C with cedilla', // MISSING Egrave: 'Latin capital letter E with grave accent', // MISSING Eacute: 'Latin capital letter E with acute accent', // MISSING Ecirc: 'Latin capital letter E with circumflex', // MISSING Euml: 'Latin capital letter E with diaeresis', // MISSING Igrave: 'Latin capital letter I with grave accent', // MISSING Iacute: 'Latin capital letter I with acute accent', // MISSING Icirc: 'Latin capital letter I with circumflex', // MISSING Iuml: 'Latin capital letter I with diaeresis', // MISSING ETH: 'Latin capital letter Eth', // MISSING Ntilde: 'Latin capital letter N with tilde', // MISSING Ograve: 'Latin capital letter O with grave accent', // MISSING Oacute: 'Latin capital letter O with acute accent', // MISSING Ocirc: 'Latin capital letter O with circumflex', // MISSING Otilde: 'Latin capital letter O with tilde', // MISSING Ouml: 'Latin capital letter O with diaeresis', // MISSING times: 'Multiplication sign', // MISSING Oslash: 'Latin capital letter O with stroke', // MISSING Ugrave: 'Latin capital letter U with grave accent', // MISSING Uacute: 'Latin capital letter U with acute accent', // MISSING Ucirc: 'Latin capital letter U with circumflex', // MISSING Uuml: 'Latin capital letter U with diaeresis', // MISSING Yacute: 'Latin capital letter Y with acute accent', // MISSING THORN: 'Latin capital letter Thorn', // MISSING szlig: 'Latin small letter sharp s', // MISSING agrave: 'Latin small letter a with grave accent', // MISSING aacute: 'Latin small letter a with acute accent', // MISSING acirc: 'Latin small letter a with circumflex', // MISSING atilde: 'Latin small letter a with tilde', // MISSING auml: 'Latin small letter a with diaeresis', // MISSING aring: 'Latin small letter a with ring above', // MISSING aelig: 'Latin small letter æ', // MISSING ccedil: 'Latin small letter c with cedilla', // MISSING egrave: 'Latin small letter e with grave accent', // MISSING eacute: 'Latin small letter e with acute accent', // MISSING ecirc: 'Latin small letter e with circumflex', // MISSING euml: 'Latin small letter e with diaeresis', // MISSING igrave: 'Latin small letter i with grave accent', // MISSING iacute: 'Latin small letter i with acute accent', // MISSING icirc: 'Latin small letter i with circumflex', // MISSING iuml: 'Latin small letter i with diaeresis', // MISSING eth: 'Latin small letter eth', // MISSING ntilde: 'Latin small letter n with tilde', // MISSING ograve: 'Latin small letter o with grave accent', // MISSING oacute: 'Latin small letter o with acute accent', // MISSING ocirc: 'Latin small letter o with circumflex', // MISSING otilde: 'Latin small letter o with tilde', // MISSING ouml: 'Latin small letter o with diaeresis', // MISSING divide: 'Division sign', // MISSING oslash: 'Latin small letter o with stroke', // MISSING ugrave: 'Latin small letter u with grave accent', // MISSING uacute: 'Latin small letter u with acute accent', // MISSING ucirc: 'Latin small letter u with circumflex', // MISSING uuml: 'Latin small letter u with diaeresis', // MISSING yacute: 'Latin small letter y with acute accent', // MISSING thorn: 'Latin small letter thorn', // MISSING yuml: 'Latin small letter y with diaeresis', // MISSING OElig: 'Latin capital ligature OE', // MISSING oelig: 'Latin small ligature oe', // MISSING '372': 'Latin capital letter W with circumflex', // MISSING '374': 'Latin capital letter Y with circumflex', // MISSING '373': 'Latin small letter w with circumflex', // MISSING '375': 'Latin small letter y with circumflex', // MISSING sbquo: 'Single low-9 quotation mark', // MISSING '8219': 'Single high-reversed-9 quotation mark', // MISSING bdquo: 'Double low-9 quotation mark', // MISSING hellip: 'Horizontal ellipsis', // MISSING trade: 'Trade mark sign', // MISSING '9658': 'Black right-pointing pointer', // MISSING bull: 'Bullet', // MISSING rarr: 'Rightwards arrow', // MISSING rArr: 'Rightwards double arrow', // MISSING hArr: 'Left right double arrow', // MISSING diams: 'Black diamond suit', // MISSING asymp: 'Almost equal to' // MISSING });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/specialchar/lang/hr.js
JavaScript
gpl3
6,048
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'fi', { euro: 'Euron merkki', lsquo: 'Vasen yksittäinen lainausmerkki', rsquo: 'Oikea yksittäinen lainausmerkki', ldquo: 'Vasen kaksoislainausmerkki', rdquo: 'Oikea kaksoislainausmerkki', ndash: 'En dash', // MISSING mdash: 'Em dash', // MISSING iexcl: 'Inverted exclamation mark', // MISSING cent: 'Sentin merkki', pound: 'Punnan merkki', curren: 'Valuuttamerkki', yen: 'Yenin merkki', brvbar: 'Broken bar', // MISSING sect: 'Section sign', // MISSING uml: 'Diaeresis', // MISSING copy: 'Copyright sign', // MISSING ordf: 'Feminine ordinal indicator', // MISSING laquo: 'Left-pointing double angle quotation mark', // MISSING not: 'Not sign', // MISSING reg: 'Rekisteröity merkki', macr: 'Macron', // MISSING deg: 'Asteen merkki', sup2: 'Yläindeksi kaksi', sup3: 'Yläindeksi kolme', acute: 'Acute accent', // MISSING micro: 'Mikron merkki', para: 'Pilcrow sign', // MISSING middot: 'Middle dot', // MISSING cedil: 'Cedilla', // MISSING sup1: 'Yläindeksi yksi', ordm: 'Masculine ordinal indicator', // MISSING raquo: 'Right-pointing double angle quotation mark', // MISSING frac14: 'Vulgar fraction one quarter', // MISSING frac12: 'Vulgar fraction one half', // MISSING frac34: 'Vulgar fraction three quarters', // MISSING iquest: 'Ylösalaisin oleva kysymysmerkki', Agrave: 'Latin capital letter A with grave accent', // MISSING Aacute: 'Latin capital letter A with acute accent', // MISSING Acirc: 'Latin capital letter A with circumflex', // MISSING Atilde: 'Latin capital letter A with tilde', // MISSING Auml: 'Latin capital letter A with diaeresis', // MISSING Aring: 'Latin capital letter A with ring above', // MISSING AElig: 'Latin Capital letter Æ', // MISSING Ccedil: 'Latin capital letter C with cedilla', // MISSING Egrave: 'Latin capital letter E with grave accent', // MISSING Eacute: 'Latin capital letter E with acute accent', // MISSING Ecirc: 'Latin capital letter E with circumflex', // MISSING Euml: 'Latin capital letter E with diaeresis', // MISSING Igrave: 'Latin capital letter I with grave accent', // MISSING Iacute: 'Latin capital letter I with acute accent', // MISSING Icirc: 'Latin capital letter I with circumflex', // MISSING Iuml: 'Latin capital letter I with diaeresis', // MISSING ETH: 'Latin capital letter Eth', // MISSING Ntilde: 'Latin capital letter N with tilde', // MISSING Ograve: 'Latin capital letter O with grave accent', // MISSING Oacute: 'Latin capital letter O with acute accent', // MISSING Ocirc: 'Latin capital letter O with circumflex', // MISSING Otilde: 'Latin capital letter O with tilde', // MISSING Ouml: 'Latin capital letter O with diaeresis', // MISSING times: 'Kertomerkki', Oslash: 'Latin capital letter O with stroke', // MISSING Ugrave: 'Latin capital letter U with grave accent', // MISSING Uacute: 'Latin capital letter U with acute accent', // MISSING Ucirc: 'Latin capital letter U with circumflex', // MISSING Uuml: 'Latin capital letter U with diaeresis', // MISSING Yacute: 'Latin capital letter Y with acute accent', // MISSING THORN: 'Latin capital letter Thorn', // MISSING szlig: 'Latin small letter sharp s', // MISSING agrave: 'Latin small letter a with grave accent', // MISSING aacute: 'Latin small letter a with acute accent', // MISSING acirc: 'Latin small letter a with circumflex', // MISSING atilde: 'Latin small letter a with tilde', // MISSING auml: 'Latin small letter a with diaeresis', // MISSING aring: 'Latin small letter a with ring above', // MISSING aelig: 'Latin small letter æ', // MISSING ccedil: 'Latin small letter c with cedilla', // MISSING egrave: 'Latin small letter e with grave accent', // MISSING eacute: 'Latin small letter e with acute accent', // MISSING ecirc: 'Latin small letter e with circumflex', // MISSING euml: 'Latin small letter e with diaeresis', // MISSING igrave: 'Latin small letter i with grave accent', // MISSING iacute: 'Latin small letter i with acute accent', // MISSING icirc: 'Latin small letter i with circumflex', // MISSING iuml: 'Latin small letter i with diaeresis', // MISSING eth: 'Latin small letter eth', // MISSING ntilde: 'Latin small letter n with tilde', // MISSING ograve: 'Latin small letter o with grave accent', // MISSING oacute: 'Latin small letter o with acute accent', // MISSING ocirc: 'Latin small letter o with circumflex', // MISSING otilde: 'Latin small letter o with tilde', // MISSING ouml: 'Latin small letter o with diaeresis', // MISSING divide: 'Jakomerkki', oslash: 'Latin small letter o with stroke', // MISSING ugrave: 'Latin small letter u with grave accent', // MISSING uacute: 'Latin small letter u with acute accent', // MISSING ucirc: 'Latin small letter u with circumflex', // MISSING uuml: 'Latin small letter u with diaeresis', // MISSING yacute: 'Latin small letter y with acute accent', // MISSING thorn: 'Latin small letter thorn', // MISSING yuml: 'Latin small letter y with diaeresis', // MISSING OElig: 'Latin capital ligature OE', // MISSING oelig: 'Latin small ligature oe', // MISSING '372': 'Latin capital letter W with circumflex', // MISSING '374': 'Latin capital letter Y with circumflex', // MISSING '373': 'Latin small letter w with circumflex', // MISSING '375': 'Latin small letter y with circumflex', // MISSING sbquo: 'Single low-9 quotation mark', // MISSING '8219': 'Single high-reversed-9 quotation mark', // MISSING bdquo: 'Double low-9 quotation mark', // MISSING hellip: 'Horizontal ellipsis', // MISSING trade: 'Tavaramerkki merkki', '9658': 'Black right-pointing pointer', // MISSING bull: 'Bullet', // MISSING rarr: 'Nuoli oikealle', rArr: 'Kaksoisnuoli oikealle', hArr: 'Kaksoisnuoli oikealle ja vasemmalle', diams: 'Black diamond suit', // MISSING asymp: 'Noin' });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/specialchar/lang/fi.js
JavaScript
gpl3
6,116
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'ug', { euro: 'ياۋرو بەلگىسى', lsquo: 'يالاڭ پەش سول', rsquo: 'يالاڭ پەش ئوڭ', ldquo: 'قوش پەش سول', rdquo: 'قوش پەش ئوڭ', ndash: 'سىزىقچە', mdash: 'سىزىق', iexcl: 'ئۈندەش', cent: 'تىيىن بەلگىسى', pound: 'فوند ستېرلىڭ', curren: 'پۇل بەلگىسى', yen: 'ياپونىيە يىنى', brvbar: 'ئۈزۈك بالداق', sect: 'پاراگراف بەلگىسى', uml: 'تاۋۇش ئايرىش بەلگىسى', copy: 'نەشر ھوقۇقى بەلگىسى', ordf: 'Feminine ordinal indicator', // MISSING laquo: 'قوش تىرناق سول', not: 'غەيرى بەلگە', reg: 'خەتلەتكەن تاۋار ماركىسى', macr: 'سوزۇش بەلگىسى', deg: 'گىرادۇس بەلگىسى', sup2: 'يۇقىرى ئىندېكىس 2', sup3: 'يۇقىرى ئىندېكىس 3', acute: 'ئۇرغۇ بەلگىسى', micro: 'Micro sign', // MISSING para: 'ئابزاس بەلگىسى', middot: 'ئوتتۇرا چېكىت', cedil: 'ئاستىغا قوشۇلىدىغان بەلگە', sup1: 'يۇقىرى ئىندېكىس 1', ordm: 'Masculine ordinal indicator', // MISSING raquo: 'قوش تىرناق ئوڭ', frac14: 'ئاددىي كەسىر تۆتتىن بىر', frac12: 'ئاددىي كەسىر ئىككىدىن بىر', frac34: 'ئاددىي كەسىر ئۈچتىن تۆرت', iquest: 'Inverted question mark', // MISSING Agrave: 'Latin capital letter A with grave accent', // MISSING Aacute: 'Latin capital letter A with acute accent', // MISSING Acirc: 'Latin capital letter A with circumflex', // MISSING Atilde: 'Latin capital letter A with tilde', // MISSING Auml: 'Latin capital letter A with diaeresis', // MISSING Aring: 'Latin capital letter A with ring above', // MISSING AElig: 'Latin Capital letter Æ', // MISSING Ccedil: 'Latin capital letter C with cedilla', // MISSING Egrave: 'Latin capital letter E with grave accent', // MISSING Eacute: 'Latin capital letter E with acute accent', // MISSING Ecirc: 'Latin capital letter E with circumflex', // MISSING Euml: 'Latin capital letter E with diaeresis', // MISSING Igrave: 'Latin capital letter I with grave accent', // MISSING Iacute: 'Latin capital letter I with acute accent', // MISSING Icirc: 'Latin capital letter I with circumflex', // MISSING Iuml: 'Latin capital letter I with diaeresis', // MISSING ETH: 'Latin capital letter Eth', // MISSING Ntilde: 'Latin capital letter N with tilde', // MISSING Ograve: 'قوش پەش ئوڭ', Oacute: 'Latin capital letter O with acute accent', // MISSING Ocirc: 'Latin capital letter O with circumflex', // MISSING Otilde: 'Latin capital letter O with tilde', // MISSING Ouml: 'Latin capital letter O with diaeresis', // MISSING times: 'Multiplication sign', // MISSING Oslash: 'Latin capital letter O with stroke', // MISSING Ugrave: 'Latin capital letter U with grave accent', // MISSING Uacute: 'Latin capital letter U with acute accent', // MISSING Ucirc: 'Latin capital letter U with circumflex', // MISSING Uuml: 'Latin capital letter U with diaeresis', // MISSING Yacute: 'Latin capital letter Y with acute accent', // MISSING THORN: 'Latin capital letter Thorn', // MISSING szlig: 'Latin small letter sharp s', // MISSING agrave: 'Latin small letter a with grave accent', // MISSING aacute: 'Latin small letter a with acute accent', // MISSING acirc: 'Latin small letter a with circumflex', // MISSING atilde: 'Latin small letter a with tilde', // MISSING auml: 'Latin small letter a with diaeresis', // MISSING aring: 'Latin small letter a with ring above', // MISSING aelig: 'Latin small letter æ', // MISSING ccedil: 'Latin small letter c with cedilla', // MISSING egrave: 'Latin small letter e with grave accent', // MISSING eacute: 'Latin small letter e with acute accent', // MISSING ecirc: 'Latin small letter e with circumflex', // MISSING euml: 'Latin small letter e with diaeresis', // MISSING igrave: 'Latin small letter i with grave accent', // MISSING iacute: 'Latin small letter i with acute accent', // MISSING icirc: 'Latin small letter i with circumflex', // MISSING iuml: 'Latin small letter i with diaeresis', // MISSING eth: 'Latin small letter eth', // MISSING ntilde: 'تىك موللاق سوئال بەلگىسى', ograve: 'Latin small letter o with grave accent', // MISSING oacute: 'Latin small letter o with acute accent', // MISSING ocirc: 'Latin small letter o with circumflex', // MISSING otilde: 'Latin small letter o with tilde', // MISSING ouml: 'Latin small letter o with diaeresis', // MISSING divide: 'Division sign', // MISSING oslash: 'Latin small letter o with stroke', // MISSING ugrave: 'Latin small letter u with grave accent', // MISSING uacute: 'Latin small letter u with acute accent', // MISSING ucirc: 'Latin small letter u with circumflex', // MISSING uuml: 'Latin small letter u with diaeresis', // MISSING yacute: 'Latin small letter y with acute accent', // MISSING thorn: 'Latin small letter thorn', // MISSING yuml: 'Latin small letter y with diaeresis', // MISSING OElig: 'Latin capital ligature OE', // MISSING oelig: 'Latin small ligature oe', // MISSING '372': 'Latin capital letter W with circumflex', // MISSING '374': 'Latin capital letter Y with circumflex', // MISSING '373': 'Latin small letter w with circumflex', // MISSING '375': 'Latin small letter y with circumflex', // MISSING sbquo: 'Single low-9 quotation mark', // MISSING '8219': 'Single high-reversed-9 quotation mark', // MISSING bdquo: 'Double low-9 quotation mark', // MISSING hellip: 'Horizontal ellipsis', // MISSING trade: 'Trade mark sign', // MISSING '9658': 'Black right-pointing pointer', // MISSING bull: 'Bullet', // MISSING rarr: 'ئوڭ يا ئوق', rArr: 'ئوڭ قوش سىزىق يا ئوق', hArr: 'ئوڭ سول قوش سىزىق يا ئوق', diams: 'ئۇيۇل غىچ', asymp: 'تەخمىنەن تەڭ' });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/specialchar/lang/ug.js
JavaScript
gpl3
6,302
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'zh-cn', { euro: '欧元符号', lsquo: '左单引号', rsquo: '右单引号', ldquo: '左双引号', rdquo: '右双引号', ndash: '短划线', mdash: '破折号', iexcl: '竖翻叹号', cent: '分币标记', pound: '英镑标记', curren: '货币标记', yen: '日元标记', brvbar: '间断条', sect: '节标记', uml: '分音符', copy: '版权所有标记', ordf: '阴性顺序指示符', laquo: '左指双尖引号', not: '非标记', reg: '注册标记', macr: '长音符', deg: '度标记', sup2: '上标二', sup3: '上标三', acute: '锐音符', micro: '微符', para: '段落标记', middot: '中间点', cedil: '下加符', sup1: '上标一', ordm: '阳性顺序指示符', raquo: '右指双尖引号', frac14: '普通分数四分之一', frac12: '普通分数二分之一', frac34: '普通分数四分之三', iquest: '竖翻问号', Agrave: '带抑音符的拉丁文大写字母 A', Aacute: '带锐音符的拉丁文大写字母 A', Acirc: '带扬抑符的拉丁文大写字母 A', Atilde: '带颚化符的拉丁文大写字母 A', Auml: '带分音符的拉丁文大写字母 A', Aring: '带上圆圈的拉丁文大写字母 A', AElig: '拉丁文大写字母 Ae', Ccedil: '带下加符的拉丁文大写字母 C', Egrave: '带抑音符的拉丁文大写字母 E', Eacute: '带锐音符的拉丁文大写字母 E', Ecirc: '带扬抑符的拉丁文大写字母 E', Euml: '带分音符的拉丁文大写字母 E', Igrave: '带抑音符的拉丁文大写字母 I', Iacute: '带锐音符的拉丁文大写字母 I', Icirc: '带扬抑符的拉丁文大写字母 I', Iuml: '带分音符的拉丁文大写字母 I', ETH: '拉丁文大写字母 Eth', Ntilde: '带颚化符的拉丁文大写字母 N', Ograve: '带抑音符的拉丁文大写字母 O', Oacute: '带锐音符的拉丁文大写字母 O', Ocirc: '带扬抑符的拉丁文大写字母 O', Otilde: '带颚化符的拉丁文大写字母 O', Ouml: '带分音符的拉丁文大写字母 O', times: '乘号', Oslash: '带粗线的拉丁文大写字母 O', Ugrave: '带抑音符的拉丁文大写字母 U', Uacute: '带锐音符的拉丁文大写字母 U', Ucirc: '带扬抑符的拉丁文大写字母 U', Uuml: '带分音符的拉丁文大写字母 U', Yacute: '带抑音符的拉丁文大写字母 Y', THORN: '拉丁文大写字母 Thorn', szlig: '拉丁文小写字母清音 S', agrave: '带抑音符的拉丁文小写字母 A', aacute: '带锐音符的拉丁文小写字母 A', acirc: '带扬抑符的拉丁文小写字母 A', atilde: '带颚化符的拉丁文小写字母 A', auml: '带分音符的拉丁文小写字母 A', aring: '带上圆圈的拉丁文小写字母 A', aelig: '拉丁文小写字母 Ae', ccedil: '带下加符的拉丁文小写字母 C', egrave: '带抑音符的拉丁文小写字母 E', eacute: '带锐音符的拉丁文小写字母 E', ecirc: '带扬抑符的拉丁文小写字母 E', euml: '带分音符的拉丁文小写字母 E', igrave: '带抑音符的拉丁文小写字母 I', iacute: '带锐音符的拉丁文小写字母 I', icirc: '带扬抑符的拉丁文小写字母 I', iuml: '带分音符的拉丁文小写字母 I', eth: '拉丁文小写字母 Eth', ntilde: '带颚化符的拉丁文小写字母 N', ograve: '带抑音符的拉丁文小写字母 O', oacute: '带锐音符的拉丁文小写字母 O', ocirc: '带扬抑符的拉丁文小写字母 O', otilde: '带颚化符的拉丁文小写字母 O', ouml: '带分音符的拉丁文小写字母 O', divide: '除号', oslash: '带粗线的拉丁文小写字母 O', ugrave: '带抑音符的拉丁文小写字母 U', uacute: '带锐音符的拉丁文小写字母 U', ucirc: '带扬抑符的拉丁文小写字母 U', uuml: '带分音符的拉丁文小写字母 U', yacute: '带抑音符的拉丁文小写字母 Y', thorn: '拉丁文小写字母 Thorn', yuml: '带分音符的拉丁文小写字母 Y', OElig: '拉丁文大写连字 Oe', oelig: '拉丁文小写连字 Oe', '372': '带扬抑符的拉丁文大写字母 W', '374': '带扬抑符的拉丁文大写字母 Y', '373': '带扬抑符的拉丁文小写字母 W', '375': '带扬抑符的拉丁文小写字母 Y', sbquo: '单下 9 形引号', '8219': '单高横翻 9 形引号', bdquo: '双下 9 形引号', hellip: '水平省略号', trade: '商标标志', '9658': '实心右指指针', bull: '加重号', rarr: '向右箭头', rArr: '向右双线箭头', hArr: '左右双线箭头', diams: '实心方块纸牌', asymp: '约等于' });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/specialchar/lang/zh-cn.js
JavaScript
gpl3
4,871
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'en', { euro: 'Euro sign', lsquo: 'Left single quotation mark', rsquo: 'Right single quotation mark', ldquo: 'Left double quotation mark', rdquo: 'Right double quotation mark', ndash: 'En dash', mdash: 'Em dash', iexcl: 'Inverted exclamation mark', cent: 'Cent sign', pound: 'Pound sign', curren: 'Currency sign', yen: 'Yen sign', brvbar: 'Broken bar', sect: 'Section sign', uml: 'Diaeresis', copy: 'Copyright sign', ordf: 'Feminine ordinal indicator', laquo: 'Left-pointing double angle quotation mark', not: 'Not sign', reg: 'Registered sign', macr: 'Macron', deg: 'Degree sign', sup2: 'Superscript two', sup3: 'Superscript three', acute: 'Acute accent', micro: 'Micro sign', para: 'Pilcrow sign', middot: 'Middle dot', cedil: 'Cedilla', sup1: 'Superscript one', ordm: 'Masculine ordinal indicator', raquo: 'Right-pointing double angle quotation mark', frac14: 'Vulgar fraction one quarter', frac12: 'Vulgar fraction one half', frac34: 'Vulgar fraction three quarters', iquest: 'Inverted question mark', Agrave: 'Latin capital letter A with grave accent', Aacute: 'Latin capital letter A with acute accent', Acirc: 'Latin capital letter A with circumflex', Atilde: 'Latin capital letter A with tilde', Auml: 'Latin capital letter A with diaeresis', Aring: 'Latin capital letter A with ring above', AElig: 'Latin Capital letter Æ', Ccedil: 'Latin capital letter C with cedilla', Egrave: 'Latin capital letter E with grave accent', Eacute: 'Latin capital letter E with acute accent', Ecirc: 'Latin capital letter E with circumflex', Euml: 'Latin capital letter E with diaeresis', Igrave: 'Latin capital letter I with grave accent', Iacute: 'Latin capital letter I with acute accent', Icirc: 'Latin capital letter I with circumflex', Iuml: 'Latin capital letter I with diaeresis', ETH: 'Latin capital letter Eth', Ntilde: 'Latin capital letter N with tilde', Ograve: 'Latin capital letter O with grave accent', Oacute: 'Latin capital letter O with acute accent', Ocirc: 'Latin capital letter O with circumflex', Otilde: 'Latin capital letter O with tilde', Ouml: 'Latin capital letter O with diaeresis', times: 'Multiplication sign', Oslash: 'Latin capital letter O with stroke', Ugrave: 'Latin capital letter U with grave accent', Uacute: 'Latin capital letter U with acute accent', Ucirc: 'Latin capital letter U with circumflex', Uuml: 'Latin capital letter U with diaeresis', Yacute: 'Latin capital letter Y with acute accent', THORN: 'Latin capital letter Thorn', szlig: 'Latin small letter sharp s', agrave: 'Latin small letter a with grave accent', aacute: 'Latin small letter a with acute accent', acirc: 'Latin small letter a with circumflex', atilde: 'Latin small letter a with tilde', auml: 'Latin small letter a with diaeresis', aring: 'Latin small letter a with ring above', aelig: 'Latin small letter æ', ccedil: 'Latin small letter c with cedilla', egrave: 'Latin small letter e with grave accent', eacute: 'Latin small letter e with acute accent', ecirc: 'Latin small letter e with circumflex', euml: 'Latin small letter e with diaeresis', igrave: 'Latin small letter i with grave accent', iacute: 'Latin small letter i with acute accent', icirc: 'Latin small letter i with circumflex', iuml: 'Latin small letter i with diaeresis', eth: 'Latin small letter eth', ntilde: 'Latin small letter n with tilde', ograve: 'Latin small letter o with grave accent', oacute: 'Latin small letter o with acute accent', ocirc: 'Latin small letter o with circumflex', otilde: 'Latin small letter o with tilde', ouml: 'Latin small letter o with diaeresis', divide: 'Division sign', oslash: 'Latin small letter o with stroke', ugrave: 'Latin small letter u with grave accent', uacute: 'Latin small letter u with acute accent', ucirc: 'Latin small letter u with circumflex', uuml: 'Latin small letter u with diaeresis', yacute: 'Latin small letter y with acute accent', thorn: 'Latin small letter thorn', yuml: 'Latin small letter y with diaeresis', OElig: 'Latin capital ligature OE', oelig: 'Latin small ligature oe', '372': 'Latin capital letter W with circumflex', '374': 'Latin capital letter Y with circumflex', '373': 'Latin small letter w with circumflex', '375': 'Latin small letter y with circumflex', sbquo: 'Single low-9 quotation mark', '8219': 'Single high-reversed-9 quotation mark', bdquo: 'Double low-9 quotation mark', hellip: 'Horizontal ellipsis', trade: 'Trade mark sign', '9658': 'Black right-pointing pointer', bull: 'Bullet', rarr: 'Rightwards arrow', rArr: 'Rightwards double arrow', hArr: 'Left right double arrow', diams: 'Black diamond suit', asymp: 'Almost equal to' });
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/specialchar/lang/en.js
JavaScript
gpl3
5,033
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'specialchar', function( editor ) { /** * Simulate "this" of a dialog for non-dialog events. * @type {CKEDITOR.dialog} */ var dialog, lang = editor.lang.specialChar; var onChoice = function( evt ) { var target, value; if ( evt.data ) target = evt.data.getTarget(); else target = new CKEDITOR.dom.element( evt ); if ( target.getName() == 'a' && ( value = target.getChild( 0 ).getHtml() ) ) { target.removeClass( "cke_light_background" ); dialog.hide(); // We must use "insertText" here to keep text styled. var span = editor.document.createElement( 'span' ); span.setHtml( value ); editor.insertText( span.getText() ); } }; var onClick = CKEDITOR.tools.addFunction( onChoice ); var focusedNode; var onFocus = function( evt, target ) { var value; target = target || evt.data.getTarget(); if ( target.getName() == 'span' ) target = target.getParent(); if ( target.getName() == 'a' && ( value = target.getChild( 0 ).getHtml() ) ) { // Trigger blur manually if there is focused node. if ( focusedNode ) onBlur( null, focusedNode ); var htmlPreview = dialog.getContentElement( 'info', 'htmlPreview' ).getElement(); dialog.getContentElement( 'info', 'charPreview' ).getElement().setHtml( value ); htmlPreview.setHtml( CKEDITOR.tools.htmlEncode( value ) ); target.getParent().addClass( "cke_light_background" ); // Memorize focused node. focusedNode = target; } }; var onBlur = function( evt, target ) { target = target || evt.data.getTarget(); if ( target.getName() == 'span' ) target = target.getParent(); if ( target.getName() == 'a' ) { dialog.getContentElement( 'info', 'charPreview' ).getElement().setHtml( '&nbsp;' ); dialog.getContentElement( 'info', 'htmlPreview' ).getElement().setHtml( '&nbsp;' ); target.getParent().removeClass( "cke_light_background" ); focusedNode = undefined; } }; var onKeydown = CKEDITOR.tools.addFunction( function( ev ) { ev = new CKEDITOR.dom.event( ev ); // Get an Anchor element. var element = ev.getTarget(); var relative, nodeToMove; var keystroke = ev.getKeystroke(), rtl = editor.lang.dir == 'rtl'; switch ( keystroke ) { // UP-ARROW case 38 : // relative is TR if ( ( relative = element.getParent().getParent().getPrevious() ) ) { nodeToMove = relative.getChild( [element.getParent().getIndex(), 0] ); nodeToMove.focus(); onBlur( null, element ); onFocus( null, nodeToMove ); } ev.preventDefault(); break; // DOWN-ARROW case 40 : // relative is TR if ( ( relative = element.getParent().getParent().getNext() ) ) { nodeToMove = relative.getChild( [ element.getParent().getIndex(), 0 ] ); if ( nodeToMove && nodeToMove.type == 1 ) { nodeToMove.focus(); onBlur( null, element ); onFocus( null, nodeToMove ); } } ev.preventDefault(); break; // SPACE // ENTER is already handled as onClick case 32 : onChoice( { data: ev } ); ev.preventDefault(); break; // RIGHT-ARROW case rtl ? 37 : 39 : // TAB case 9 : // relative is TD if ( ( relative = element.getParent().getNext() ) ) { nodeToMove = relative.getChild( 0 ); if ( nodeToMove.type == 1 ) { nodeToMove.focus(); onBlur( null, element ); onFocus( null, nodeToMove ); ev.preventDefault( true ); } else onBlur( null, element ); } // relative is TR else if ( ( relative = element.getParent().getParent().getNext() ) ) { nodeToMove = relative.getChild( [ 0, 0 ] ); if ( nodeToMove && nodeToMove.type == 1 ) { nodeToMove.focus(); onBlur( null, element ); onFocus( null, nodeToMove ); ev.preventDefault( true ); } else onBlur( null, element ); } break; // LEFT-ARROW case rtl ? 39 : 37 : // SHIFT + TAB case CKEDITOR.SHIFT + 9 : // relative is TD if ( ( relative = element.getParent().getPrevious() ) ) { nodeToMove = relative.getChild( 0 ); nodeToMove.focus(); onBlur( null, element ); onFocus( null, nodeToMove ); ev.preventDefault( true ); } // relative is TR else if ( ( relative = element.getParent().getParent().getPrevious() ) ) { nodeToMove = relative.getLast().getChild( 0 ); nodeToMove.focus(); onBlur( null, element ); onFocus( null, nodeToMove ); ev.preventDefault( true ); } else onBlur( null, element ); break; default : // Do not stop not handled events. return; } }); return { title : lang.title, minWidth : 430, minHeight : 280, buttons : [ CKEDITOR.dialog.cancelButton ], charColumns : 17, onLoad : function() { var columns = this.definition.charColumns, extraChars = editor.config.extraSpecialChars, chars = editor.config.specialChars; var charsTableLabel = CKEDITOR.tools.getNextId() + '_specialchar_table_label'; var html = [ '<table role="listbox" aria-labelledby="' + charsTableLabel + '"' + ' style="width: 320px; height: 100%; border-collapse: separate;"' + ' align="center" cellspacing="2" cellpadding="2" border="0">' ]; var i = 0, size = chars.length, character, charDesc; while ( i < size ) { html.push( '<tr>' ) ; for ( var j = 0 ; j < columns ; j++, i++ ) { if ( ( character = chars[ i ] ) ) { charDesc = ''; if ( character instanceof Array ) { charDesc = character[ 1 ]; character = character[ 0 ]; } else { var _tmpName = character.replace( '&', '' ).replace( ';', '' ).replace( '#', '' ); // Use character in case description unavailable. charDesc = lang[ _tmpName ] || character; } var charLabelId = 'cke_specialchar_label_' + i + '_' + CKEDITOR.tools.getNextNumber(); html.push( '<td class="cke_dark_background" style="cursor: default" role="presentation">' + '<a href="javascript: void(0);" role="option"' + ' aria-posinset="' + ( i +1 ) + '"', ' aria-setsize="' + size + '"', ' aria-labelledby="' + charLabelId + '"', ' style="cursor: inherit; display: block; height: 1.25em; margin-top: 0.25em; text-align: center;" title="', CKEDITOR.tools.htmlEncode( charDesc ), '"' + ' onkeydown="CKEDITOR.tools.callFunction( ' + onKeydown + ', event, this )"' + ' onclick="CKEDITOR.tools.callFunction(' + onClick + ', this); return false;"' + ' tabindex="-1">' + '<span style="margin: 0 auto;cursor: inherit">' + character + '</span>' + '<span class="cke_voice_label" id="' + charLabelId + '">' + charDesc + '</span></a>'); } else html.push( '<td class="cke_dark_background">&nbsp;' ); html.push( '</td>' ); } html.push( '</tr>' ); } html.push( '</tbody></table>', '<span id="' + charsTableLabel + '" class="cke_voice_label">' + lang.options +'</span>' ); this.getContentElement( 'info', 'charContainer' ).getElement().setHtml( html.join( '' ) ); }, contents : [ { id : 'info', label : editor.lang.common.generalTab, title : editor.lang.common.generalTab, padding : 0, align : 'top', elements : [ { type : 'hbox', align : 'top', widths : [ '320px', '90px' ], children : [ { type : 'html', id : 'charContainer', html : '', onMouseover : onFocus, onMouseout : onBlur, focus : function() { var firstChar = this.getElement().getElementsByTag( 'a' ).getItem( 0 ); setTimeout( function() { firstChar.focus(); onFocus( null, firstChar ); }, 0 ); }, onShow : function() { var firstChar = this.getElement().getChild( [ 0, 0, 0, 0, 0 ] ); setTimeout( function() { firstChar.focus(); onFocus( null, firstChar ); }, 0 ); }, onLoad : function( event ) { dialog = event.sender; } }, { type : 'hbox', align : 'top', widths : [ '100%' ], children : [ { type : 'vbox', align : 'top', children : [ { type : 'html', html : '<div></div>' }, { type : 'html', id : 'charPreview', className : 'cke_dark_background', style : 'border:1px solid #eeeeee;font-size:28px;height:40px;width:70px;padding-top:9px;font-family:\'Microsoft Sans Serif\',Arial,Helvetica,Verdana;text-align:center;', html : '<div>&nbsp;</div>' }, { type : 'html', id : 'htmlPreview', className : 'cke_dark_background', style : 'border:1px solid #eeeeee;font-size:14px;height:20px;width:70px;padding-top:2px;font-family:\'Microsoft Sans Serif\',Arial,Helvetica,Verdana;text-align:center;', html : '<div>&nbsp;</div>' } ] } ] } ] } ] } ] }; } );
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/specialchar/dialogs/specialchar.js
JavaScript
gpl3
9,816
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { CKEDITOR.plugins.liststyle = { requires : [ 'dialog' ], init : function( editor ) { editor.addCommand( 'numberedListStyle', new CKEDITOR.dialogCommand( 'numberedListStyle' ) ); CKEDITOR.dialog.add( 'numberedListStyle', this.path + 'dialogs/liststyle.js' ); editor.addCommand( 'bulletedListStyle', new CKEDITOR.dialogCommand( 'bulletedListStyle' ) ); CKEDITOR.dialog.add( 'bulletedListStyle', this.path + 'dialogs/liststyle.js' ); // If the "menu" plugin is loaded, register the menu items. if ( editor.addMenuItems ) { //Register map group; editor.addMenuGroup("list", 108); editor.addMenuItems( { numberedlist : { label : editor.lang.list.numberedTitle, group : 'list', command: 'numberedListStyle' }, bulletedlist : { label : editor.lang.list.bulletedTitle, group : 'list', command: 'bulletedListStyle' } }); } // If the "contextmenu" plugin is loaded, register the listeners. if ( editor.contextMenu ) { editor.contextMenu.addListener( function( element, selection ) { if ( !element || element.isReadOnly() ) return null; while ( element ) { var name = element.getName(); if ( name == 'ol' ) return { numberedlist: CKEDITOR.TRISTATE_OFF }; else if ( name == 'ul' ) return { bulletedlist: CKEDITOR.TRISTATE_OFF }; element = element.getParent(); } return null; }); } } }; CKEDITOR.plugins.add( 'liststyle', CKEDITOR.plugins.liststyle ); })();
10-ptud-v1
trunk/ 10-ptud-v1/admin/includes/ckeditor/_source/plugins/liststyle/plugin.js
JavaScript
gpl3
1,822