X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=_source%2Fplugins%2Fhtmldataprocessor%2Fplugin.js;h=264f5044265fef2ae8cddfe6e18dfe6e6d0dc3a3;hb=refs%2Ftags%2Fv3.2.2;hp=47bdb7c5bf1122b0130643bc4375a88bbd10b56c;hpb=941b0a9ba4e673e292510d80a5a86806994b8ea6;p=ckeditor.git diff --git a/_source/plugins/htmldataprocessor/plugin.js b/_source/plugins/htmldataprocessor/plugin.js index 47bdb7c..264f504 100644 --- a/_source/plugins/htmldataprocessor/plugin.js +++ b/_source/plugins/htmldataprocessor/plugin.js @@ -16,7 +16,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { var lastIndex = block.children.length, last = block.children[ lastIndex - 1 ]; - while( last && last.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.trim( last.value ) ) + while ( last && last.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.trim( last.value ) ) last = block.children[ --lastIndex ]; return last; } @@ -41,7 +41,12 @@ For licensing, see LICENSE.html or http://ckeditor.com/license function blockNeedsExtension( block ) { var lastChild = lastNoneSpaceChild( block ); - return !lastChild || lastChild.type == CKEDITOR.NODE_ELEMENT && lastChild.name == 'br'; + + return !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 extendBlockForDisplay( block ) @@ -185,6 +190,11 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( !element.attributes.type ) element.attributes.type = 'text/css'; + }, + + title : function( element ) + { + element.children[ 0 ].value = element.attributes[ '_cke_title' ]; } },