Changeset 2334
- Timestamp:
- 2008-08-05 18:25:41 (5 months ago)
- Location:
- CKEditor/branches/prototype
- Files:
-
- 11 added
- 9 modified
-
_dev/docs_build/docs_build.bat (modified) (1 diff)
-
_dev/docs_build/docs_build.conf (modified) (1 diff)
-
_dev/packager/fckpackager.php (modified) (6 diffs)
-
fckpackager.xml (modified) (3 diffs)
-
_source/core/config.js (modified) (1 diff)
-
_source/core/dom/node.js (modified) (2 diffs)
-
_source/core/htmlparser (added)
-
_source/core/htmlparser/comment.js (added)
-
_source/core/htmlparser/element.js (added)
-
_source/core/htmlparser/fragment.js (added)
-
_source/core/htmlparser.js (added)
-
_source/core/htmlparser/text.js (added)
-
_source/core/loader.js (modified) (3 diffs)
-
_source/core/tools.js (modified) (3 diffs)
-
_source/dtd (added)
-
_source/dtd/dtd_test.html (added)
-
_source/dtd/xhtml1-transitional.js (added)
-
_source/plugins/htmldataprocessor/plugin.js (modified) (1 diff)
-
_source/plugins/htmlwriter (added)
-
_source/plugins/htmlwriter/plugin.js (added)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/branches/prototype/_dev/docs_build/docs_build.bat
r2131 r2334 29 29 java -jar ../_thirdparty/jsdoc-toolkit/jsrun.jar ../_thirdparty/jsdoc-toolkit/app/run.js -c=docs_build.conf 30 30 31 php ../fixlineends/fixlineends.php --eolstripwhite --eofnewline --eofstripwhite --nohidden --nosystem ../../_docs/api/31 :: php ../fixlineends/fixlineends.php --eolstripwhite --eofnewline --eofstripwhite --nohidden --nosystem ../../_docs/api/ 32 32 33 33 ECHO Finished! -
CKEditor/branches/prototype/_dev/docs_build/docs_build.conf
r2180 r2334 17 17 '../../_source/core/', 18 18 '../../_source/plugins/', 19 '../../_source/dtd/xhtml1-transitional.js', 19 20 '../../_source/lang/en.js' 20 21 ], -
CKEditor/branches/prototype/_dev/packager/fckpackager.php
r2278 r2334 234 234 { 235 235 $varsMatch = $varsMatches[1][$i]; 236 236 237 237 // Removed all (...), [...] and {...} blocks from the var 238 238 // statement to avoid problems with commas inside them. … … 240 240 $varsMatch = preg_replace( '/(\[(?:(?>[^\[\]]*)|(?1))*\])+/', '', $varsMatch ) ; 241 241 $varsMatch = preg_replace( '/({(?:(?>[^{}]*)|(?1))*})+/', '', $varsMatch ) ; 242 242 243 243 $numVarNameMatches = preg_match_all( '/(?:^|,)\s*([^\s=,]+)/', $varsMatch, $varNameMatches ) ; 244 244 245 245 for ( $j = 0 ; $j < $numVarNameMatches ; $j++ ) 246 246 { … … 260 260 { 261 261 if ( strlen( $var) > 1 ) 262 $source = preg_replace( '/(?<!\w|\d|\.)' . preg_quote( $var ) . '(?!\w|\d)/', $this->_GetVarName(), $source ) ; 262 { 263 $varName = $this->_GetVarName(); 264 $source = preg_replace( '/(?<!\w|\d|\.)' . preg_quote( $var ) . '(?!\w|\d|:)/', $varName, $source ) ; 265 266 // The above regex exclude names placed before ":", but it is not true for ternary operators. 267 $source = preg_replace( '/(?<=\?)' . preg_quote( $var ) . '(?=:)/', $varName, $source ) ; 268 } 263 269 } 264 270 … … 331 337 '/\/\/.*$/m', 332 338 '', $script ) ; 333 339 334 340 // Remove spaces before the ";" at the end of the lines 335 341 $script = preg_replace( … … 431 437 432 438 $processed = $GLOBALS['funcProcessor']->Process() ; 433 439 434 440 $processed = substr_replace( $processed, '', 0, 8 ) ; 435 441 … … 438 444 if ( $hasfuncProcessor != TRUE ) 439 445 unset( $GLOBALS['funcProcessor'] ) ; 440 446 441 447 return 'function'. $processed ; 442 448 } -
CKEditor/branches/prototype/fckpackager.xml
r2278 r2334 45 45 46 46 <Constants removeDeclaration="false"> 47 <Constant name="CKEDITOR.NODE_ELEMENT" value="1" /> 48 <Constant name="CKEDITOR.NODE_TEXT" value="3" /> 49 <Constant name="CKEDITOR.NODE_COMMENT" value="8" /> 47 50 <Constant name="CKEDITOR.UI_BUTTON" value="1" /> 48 51 <Constant name="CKEDITOR.SELECTION_NONE" value="1" /> … … 82 85 <File path="_source/core/ui.js" /> 83 86 <File path="_source/core/editor.js" /> 87 <File path="_source/core/htmlparser.js" /> 88 <File path="_source/core/htmlparser/comment.js" /> 89 <File path="_source/core/htmlparser/text.js" /> 90 <File path="_source/core/htmlparser/fragment.js" /> 91 <File path="_source/core/htmlparser/element.js" /> 92 <File path="_source/dtd/xhtml1-transitional.js" /> 84 93 <File path="_source/core/ckeditor.js" /> 85 94 <File path="_source/core/dom/text.js" /> … … 90 99 <File path="_source/plugins/elementspath/plugin.js" /> 91 100 <File path="_source/plugins/htmldataprocessor/plugin.js" /> 101 <File path="_source/plugins/htmlwriter/plugin.js" /> 92 102 <File path="_source/plugins/selection/plugin.js" /> 93 103 <File path="_source/plugins/sourcearea/plugin.js" /> -
CKEditor/branches/prototype/_source/core/config.js
r2278 r2334 136 136 * config.plugins = 'editingblock,toolbar,wysiwygarea'; 137 137 */ 138 plugins : 'basicstyles,button,editingblock,elementspath,htmldataprocessor, selection,sourcearea,toolbar,wysiwygarea',138 plugins : 'basicstyles,button,editingblock,elementspath,htmldataprocessor,htmlwriter,selection,sourcearea,toolbar,wysiwygarea', 139 139 140 140 /** -
CKEditor/branches/prototype/_source/core/dom/node.js
r2262 r2334 42 42 switch ( domNode.nodeType ) 43 43 { 44 case 1 : // ELEMENT_NODE44 case CKEDITOR.NODE_ELEMENT : 45 45 return new CKEDITOR.dom.element( domNode ); 46 46 47 case 3 : // TEXT_NODE47 case CKEDITOR.NODE_TEXT : 48 48 return new CKEDITOR.dom.text( domNode ); 49 49 } … … 63 63 64 64 CKEDITOR.dom.node.prototype = new CKEDITOR.dom.domObject(); 65 66 /** 67 * Element node type. 68 * @constant 69 * @example 70 */ 71 CKEDITOR.NODE_ELEMENT = 1; 72 73 /** 74 * Text node type. 75 * @constant 76 * @example 77 */ 78 CKEDITOR.NODE_TEXT = 3; 79 80 /** 81 * Comment node type. 82 * @constant 83 * @example 84 */ 85 CKEDITOR.NODE_COMMENT = 8; 65 86 66 87 CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, -
CKEditor/branches/prototype/_source/core/loader.js
r2278 r2334 38 38 var scripts = 39 39 { 40 'lang/en' : [], // TODO: Remove me 40 'lang/en' : [], // TODO: Remove me. This should be handled by the localization code. 41 41 42 42 'core/_bootstrap' : [ 'core/config', 'core/ckeditor', 'core/plugins', 'core/scriptLoader', 'core/tools', /* The following are entries that we wnat to force loading to at the end to avoid dependence recursion */ 'core/dom/text' ], 43 43 'core/ajax' : [ 'core/xml' ], 44 'core/ckeditor' : [ 'core/ajax', 'core/ckeditor_basic', 'core/dom', 'core/dom/document', 'core/dom/element', 'core/editor', 'core/event', 'core/ tools' ],44 'core/ckeditor' : [ 'core/ajax', 'core/ckeditor_basic', 'core/dom', 'core/dom/document', 'core/dom/element', 'core/editor', 'core/event', 'core/htmlparser', 'core/htmlparser/element', 'core/htmlparser/fragment', 'core/tools', 'dtd/xhtml1-transitional' ], 45 45 'core/ckeditor_base' : [], 46 46 'core/ckeditor_basic' : [ 'core/env', 'core/event' ], … … 57 57 'core/env' : [], 58 58 'core/event' : [], 59 'core/htmlparser' : [], 60 'core/htmlparser/comment' : [ 'core/htmlparser' ], 61 'core/htmlparser/element' : [ 'core/htmlparser', 'core/htmlparser/fragment' ], 62 'core/htmlparser/fragment' : [ 'core/htmlparser', 'core/htmlparser/comment', 'core/htmlparser/text' ], 63 'core/htmlparser/text' : [ 'core/htmlparser' ], 59 64 'core/plugins' : [ 'core/resourceManager' ], 60 65 'core/resourceManager' : [ 'core/scriptLoader', 'core/tools' ], … … 64 69 'core/tools' : [ 'core/env' ], 65 70 'core/ui' : [], 66 'core/xml' : [ 'core/env' ] 71 'core/xml' : [ 'core/env' ], 72 73 'dtd/xhtml1-transitional' : [] 67 74 }; 68 75 -
CKEditor/branches/prototype/_source/core/tools.js
r2262 r2334 73 73 * already present in the target object <strong>are not</strong> overwritten. 74 74 * @param {Object} target The object to be extended. 75 * @param {Object} source The object from which copy properties. 75 * @param {Object} source[,souce(n)] The objects from which copy 76 * properties. Any number of objects can be passed to this function. 76 77 * @param {Boolean} [overwrite] Indicates that properties already present 77 * in the target object must be overwritten. 78 * in the target object must be overwritten. This must be the last 79 * parameter in the function call. 78 80 * @returns {Object} the extended object (target). 79 81 * @example … … 95 97 * alert( p ); 96 98 */ 97 extend : function( target, source, overwrite ) 98 { 99 for ( var propertyName in source ) 100 { 101 if ( overwrite || target[ propertyName ] == undefined ) 102 target[ propertyName ] = source[ propertyName ]; 99 extend : function( target ) 100 { 101 var argsLength = arguments.length, 102 overwrite = arguments[ argsLength - 1 ]; 103 104 if ( typeof overwrite == 'boolean' ) 105 argsLength--; 106 else 107 overwrite = false; 108 109 for ( var i = 1 ; i < argsLength ; i++ ) 110 { 111 var source = arguments[ i ]; 112 113 for ( var propertyName in source ) 114 { 115 if ( overwrite || target[ propertyName ] == undefined ) 116 target[ propertyName ] = source[ propertyName ]; 117 } 103 118 } 119 104 120 return target; 105 121 }, … … 223 239 }, 224 240 milliseconds || 0 ); 225 } 241 }, 242 243 /** 244 * Remove spaces from the start and the end of a string. The following 245 * characters are removed: space, tab, line break, line feed. 246 * @param {String} str The text from which remove the spaces. 247 * @returns {String} The modified string without the boundary spaces. 248 * @example 249 * alert( CKEDITOR.tools.trim( ' example ' ); // "example" 250 */ 251 trim : (function() 252 { 253 // We are not using \s because we don't want "non-breaking spaces" to be caught. 254 var trimRegex = /(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g; 255 return function( str ) 256 { 257 return str.replace( trimRegex, '' ) ; 258 }; 259 })(), 260 261 /** 262 * Remove spaces from the start (left) of a string. The following 263 * characters are removed: space, tab, line break, line feed. 264 * @param {String} str The text from which remove the spaces. 265 * @returns {String} The modified string excluding the removed spaces. 266 * @example 267 * alert( CKEDITOR.tools.ltrim( ' example ' ); // "example " 268 */ 269 ltrim : (function() 270 { 271 // We are not using \s because we don't want "non-breaking spaces" to be caught. 272 var trimRegex = /(?:^[ \t\n\r]+)/g; 273 return function( str ) 274 { 275 return str.replace( trimRegex, '' ) ; 276 }; 277 })(), 278 279 /** 280 * Remove spaces from the end (right) of a string. The following 281 * characters are removed: space, tab, line break, line feed. 282 * @param {String} str The text from which remove the spaces. 283 * @returns {String} The modified string excluding the removed spaces. 284 * @example 285 * alert( CKEDITOR.tools.ltrim( ' example ' ); // " example" 286 */ 287 rtrim : (function() 288 { 289 // We are not using \s because we don't want "non-breaking spaces" to be caught. 290 var trimRegex = /(?:[ \t\n\r]+$)/g; 291 return function( str ) 292 { 293 return str.replace( trimRegex, '' ) ; 294 }; 295 })() 226 296 }; -
CKEditor/branches/prototype/_source/plugins/htmldataprocessor/plugin.js
r2180 r2334 32 32 }, 33 33 34 toDataFormat : function( node)34 toDataFormat : function( element ) 35 35 { 36 // For now, there is no processing of the HTML. 37 return node.getHtml(); 38 } 36 var writer = this.writer, 37 fragment = CKEDITOR.htmlParser.fragment.fromHtml( element.getHtml() ); 38 39 writer.reset(); 40 41 fragment.writeHtml( writer ); 42 43 return writer.getHtml( true ); 44 }, 45 46 writer : new CKEDITOR.htmlWriter() 39 47 }; 40 48 }