Index: _source/core/dom/domobject.js
===================================================================
--- _source/core/dom/domobject.js (revision 6095)
+++ _source/core/dom/domobject.js (working copy)
@@ -203,7 +203,7 @@
*/
domObjectProto.getCustomData = function( key )
{
- var expandoNumber = this.$._cke_expando,
+ var expandoNumber = this.$[ 'data-cke-expando' ],
dataSlot = expandoNumber && customData[ expandoNumber ];
return dataSlot && dataSlot[ key ];
@@ -214,7 +214,7 @@
*/
domObjectProto.removeCustomData = function( key )
{
- var expandoNumber = this.$._cke_expando,
+ var expandoNumber = this.$[ 'data-cke-expando' ],
dataSlot = expandoNumber && customData[ expandoNumber ],
retval = dataSlot && dataSlot[ key ];
@@ -236,7 +236,7 @@
// Clear all event listeners
this.removeAllListeners();
- var expandoNumber = this.$._cke_expando;
+ var expandoNumber = this.$[ 'data-cke-expando' ];
expandoNumber && delete customData[ expandoNumber ];
};
@@ -249,7 +249,7 @@
*/
domObjectProto.getUniqueId = function()
{
- return this.$._cke_expando || ( this.$._cke_expando = CKEDITOR.tools.getNextNumber() );
+ return this.$[ 'data-cke-expando' ] || ( this.$[ 'data-cke-expando' ] = CKEDITOR.tools.getNextNumber() );
};
// Implement CKEDITOR.event.
Index: _source/core/dom/element.js
===================================================================
--- _source/core/dom/element.js (revision 6095)
+++ _source/core/dom/element.js (working copy)
@@ -728,7 +728,7 @@
{
var attribute = thisAttribs[ i ];
- if ( ( !CKEDITOR.env.ie || ( attribute.specified && attribute.nodeName != '_cke_expando' ) ) && attribute.nodeValue != otherElement.getAttribute( attribute.nodeName ) )
+ if ( ( !CKEDITOR.env.ie || ( attribute.specified && attribute.nodeName != 'data-cke-expando' ) ) && attribute.nodeValue != otherElement.getAttribute( attribute.nodeName ) )
return false;
}
@@ -739,7 +739,7 @@
for ( i = 0 ; i < otherLength ; i++ )
{
attribute = otherAttribs[ i ];
- if ( attribute.specified && attribute.nodeName != '_cke_expando'
+ if ( attribute.specified && attribute.nodeName != 'data-cke-expando'
&& attribute.nodeValue != this.getAttribute( attribute.nodeName ) )
return false;
}
@@ -789,7 +789,7 @@
{
var child = children.getItem( i );
- if ( child.type == CKEDITOR.NODE_ELEMENT && child.getAttribute( '_cke_bookmark' ) )
+ if ( child.type == CKEDITOR.NODE_ELEMENT && child.data( 'cke-bookmark' ) )
continue;
if ( child.type == CKEDITOR.NODE_ELEMENT && !child.isEmptyInlineRemoveable()
@@ -834,7 +834,7 @@
return true;
// Attributes to be ignored.
- case '_cke_expando' :
+ case 'data-cke-expando' :
continue;
/*jsl:fallthru*/
@@ -854,7 +854,7 @@
attrsNum = attrs.length;
// The _moz_dirty attribute might get into the element after pasting (#5455)
- var execludeAttrs = { _cke_expando : 1, _moz_dirty : 1 };
+ var execludeAttrs = { 'data-cke-expando' : 1, _moz_dirty : 1 };
return attrsNum > 0 &&
( attrsNum > 2 ||
@@ -917,7 +917,7 @@
// queuing them to be moved later. (#5567)
var pendingNodes = [];
- while ( sibling.getAttribute( '_cke_bookmark' )
+ while ( sibling.data( 'cke-bookmark' )
|| sibling.isEmptyInlineRemoveable() )
{
pendingNodes.push( sibling );
@@ -1483,7 +1483,7 @@
// Replace the node.
this.getParent() && this.$.parentNode.replaceChild( newNode.$, this.$ );
- newNode.$._cke_expando = this.$._cke_expando;
+ newNode.$[ 'data-cke-expando' ] = this.$[ 'data-cke-expando' ];
this.$ = newNode.$;
},
@@ -1560,5 +1560,22 @@
getDirection : function( useComputed )
{
return useComputed ? this.getComputedStyle( 'direction' ) : this.getStyle( 'direction' ) || this.getAttribute( 'dir' );
+ },
+
+ /**
+ * Gets, sets and removes custom data to be stored as HTML5 data-* attributes.
+ * @name CKEDITOR.dom.element.data
+ * @param {String} name The name of the attribute, execluding the 'data-' part.
+ * @param {String} [value] The value to set. If set to false, the attribute will be removed.
+ */
+ data : function ( name, value )
+ {
+ name = 'data-' + name;
+ if ( value === undefined )
+ return this.getAttribute( name );
+ else if ( value === false )
+ this.removeAttribute( name );
+ else
+ this.setAttribute( name, value );
}
});
Index: _source/core/dom/node.js
===================================================================
--- _source/core/dom/node.js (revision 6095)
+++ _source/core/dom/node.js (working copy)
@@ -114,7 +114,7 @@
if ( !cloneId )
node.removeAttribute( 'id', false );
- node.removeAttribute( '_cke_expando', false );
+ node.removeAttribute( 'data-cke-expando', false );
if ( includeChildren )
{
Index: _source/core/dom/range.js
===================================================================
--- _source/core/dom/range.js (revision 6095)
+++ _source/core/dom/range.js (working copy)
@@ -308,7 +308,7 @@
return node.type != CKEDITOR.NODE_TEXT
&& node.getName() in CKEDITOR.dtd.$removeEmpty
|| !CKEDITOR.tools.trim( node.getText() )
- || node.getParent().hasAttribute( '_cke_bookmark' );
+ || node.getParent().data( 'cke-bookmark' );
}
var whitespaceEval = new CKEDITOR.dom.walker.whitespaces(),
@@ -403,7 +403,7 @@
var collapsed = this.collapsed;
startNode = this.document.createElement( 'span' );
- startNode.setAttribute( '_cke_bookmark', 1 );
+ startNode.data( 'cke-bookmark', 1 );
startNode.setStyle( 'display', 'none' );
// For IE, it must have something inside, otherwise it may be
@@ -713,10 +713,10 @@
endNode = this.endContainer;
if ( startNode.is && startNode.is( 'span' )
- && startNode.hasAttribute( '_cke_bookmark' ) )
+ && startNode.data( 'cke-bookmark' ) )
this.setStartAt( startNode, CKEDITOR.POSITION_BEFORE_START );
if ( endNode && endNode.is && endNode.is( 'span' )
- && endNode.hasAttribute( '_cke_bookmark' ) )
+ && endNode.data( 'cke-bookmark' ) )
this.setEndAt( endNode, CKEDITOR.POSITION_AFTER_END );
},
@@ -922,7 +922,7 @@
// If this is a visible element.
// We need to check for the bookmark attribute because IE insists on
// rendering the display:none nodes we use for bookmarks. (#3363)
- if ( sibling.$.offsetWidth > 0 && !sibling.getAttribute( '_cke_bookmark' ) )
+ if ( sibling.$.offsetWidth > 0 && !sibling.data( 'cke-bookmark' ) )
{
// We'll accept it only if we need
// whitespace, and this is an inline
@@ -1081,7 +1081,7 @@
// If this is a visible element.
// We need to check for the bookmark attribute because IE insists on
// rendering the display:none nodes we use for bookmarks. (#3363)
- if ( sibling.$.offsetWidth > 0 && !sibling.getAttribute( '_cke_bookmark' ) )
+ if ( sibling.$.offsetWidth > 0 && !sibling.data( 'cke-bookmark' ) )
{
// We'll accept it only if we need
// whitespace, and this is an inline
Index: _source/core/dom/walker.js
===================================================================
--- _source/core/dom/walker.js (revision 6095)
+++ _source/core/dom/walker.js (working copy)
@@ -374,7 +374,7 @@
{
return ( node && node.getName
&& node.getName() == 'span'
- && node.hasAttribute( '_cke_bookmark' ) );
+ && node.data( 'cke-bookmark' ) );
}
return function( node )
Index: _source/core/htmlparser/element.js
===================================================================
--- _source/core/htmlparser/element.js (revision 6095)
+++ _source/core/htmlparser/element.js (working copy)
@@ -34,7 +34,7 @@
*/
this.children = [];
- var tagName = attributes._cke_real_element_type || name;
+ var tagName = attributes[ 'data-cke-real-element-type' ] || name;
var dtd = CKEDITOR.dtd,
isBlockLike = !!( dtd.$nonBodyContent[ tagName ] || dtd.$block[ tagName ] || dtd.$listItem[ tagName ] || dtd.$tableContent[ tagName ] || dtd.$nonEditable[ tagName ] || tagName == 'br' ),
Index: _source/core/htmlparser/fragment.js
===================================================================
--- _source/core/htmlparser/fragment.js (revision 6095)
+++ _source/core/htmlparser/fragment.js (working copy)
@@ -125,7 +125,7 @@
var elementName, realElementName;
if ( element.attributes
&& ( realElementName =
- element.attributes[ '_cke_real_element_type' ] ) )
+ element.attributes[ 'data-cke-real-element-type' ] ) )
elementName = realElementName;
else
elementName = element.name;
Index: _source/plugins/div/plugin.js
===================================================================
--- _source/plugins/div/plugin.js (revision 6095)
+++ _source/plugins/div/plugin.js (working copy)
@@ -37,10 +37,10 @@
blockLimit = path.blockLimit,
div = blockLimit.is( 'div' ) && blockLimit;
- if ( div && !div.getAttribute( '_cke_div_added' ) )
+ if ( div && !div.data( 'cke-div-added' ) )
{
toRemove.push( div );
- div.setAttribute( '_cke_div_added' );
+ div.data( 'cke-div-added' );
}
}
Index: _source/plugins/elementspath/plugin.js
===================================================================
--- _source/plugins/elementspath/plugin.js (revision 6095)
+++ _source/plugins/elementspath/plugin.js (working copy)
@@ -82,8 +82,8 @@
{
var index = elementsList.push( element ) - 1;
var name;
- if ( element.getAttribute( '_cke_real_element_type' ) )
- name = element.getAttribute( '_cke_real_element_type' );
+ if ( element.data( 'cke-real-element-type' ) )
+ name = element.data( 'cke-real-element-type' );
else
name = element.getName();
Index: _source/plugins/fakeobjects/plugin.js
===================================================================
--- _source/plugins/fakeobjects/plugin.js (revision 6095)
+++ _source/plugins/fakeobjects/plugin.js (working copy)
@@ -12,13 +12,13 @@
$ : function( element )
{
var attributes = element.attributes,
- realHtml = attributes && attributes._cke_realelement,
+ realHtml = attributes && attributes[ 'data-cke-realelement' ],
realFragment = realHtml && new CKEDITOR.htmlParser.fragment.fromHtml( decodeURIComponent( realHtml ) ),
realElement = realFragment && realFragment.children[ 0 ];
// If we have width/height in the element, we must move it into
// the real element.
- if ( realElement && element.attributes._cke_resizable )
+ if ( realElement && element.attributes[ 'data-cke-resizable' ] )
{
var style = element.attributes.style;
@@ -68,17 +68,17 @@
{
'class' : className,
src : CKEDITOR.getUrl( 'images/spacer.gif' ),
- _cke_realelement : encodeURIComponent( realElement.getOuterHtml() ),
- _cke_real_node_type : realElement.type,
+ 'data-cke-realelement' : encodeURIComponent( realElement.getOuterHtml() ),
+ 'data-cke-real-node-type' : realElement.type,
alt : lang[ realElementType ] || lang.unknown,
align : realElement.getAttribute( 'align' ) || ''
};
if ( realElementType )
- attributes._cke_real_element_type = realElementType;
+ attributes[ 'data-cke-real-element-type' ] = realElementType;
if ( isResizable )
- attributes._cke_resizable = isResizable;
+ attributes[ 'data-cke-resizable' ] = isResizable;
return this.document.createElement( 'img', { attributes : attributes } );
};
@@ -96,27 +96,27 @@
{
'class' : className,
src : CKEDITOR.getUrl( 'images/spacer.gif' ),
- _cke_realelement : encodeURIComponent( html ),
- _cke_real_node_type : realElement.type,
+ 'data-cke-realelement' : encodeURIComponent( html ),
+ 'data-cke-real-node-type' : realElement.type,
alt : lang[ realElementType ] || lang.unknown,
align : realElement.attributes.align || ''
};
if ( realElementType )
- attributes._cke_real_element_type = realElementType;
+ attributes[ 'data-cke-real-element-type' ] = realElementType;
if ( isResizable )
- attributes._cke_resizable = isResizable;
+ attributes[ 'data-cke-resizable' ] = isResizable;
return new CKEDITOR.htmlParser.element( 'img', attributes );
};
CKEDITOR.editor.prototype.restoreRealElement = function( fakeElement )
{
- if ( fakeElement.getAttribute( '_cke_real_node_type' ) != CKEDITOR.NODE_ELEMENT )
+ if ( fakeElement.data( 'cke-real-node-type' ) != CKEDITOR.NODE_ELEMENT )
return null;
return CKEDITOR.dom.element.createFromHtml(
- decodeURIComponent( fakeElement.getAttribute( '_cke_realelement' ) ),
+ decodeURIComponent( fakeElement.data( 'cke-realelement' ) ),
this.document );
};
Index: _source/plugins/flash/dialogs/flash.js
===================================================================
--- _source/plugins/flash/dialogs/flash.js (revision 6095)
+++ _source/plugins/flash/dialogs/flash.js (working copy)
@@ -190,7 +190,7 @@
// Try to detect any embed or object tag that has Flash parameters.
var fakeImage = this.getSelectedElement();
- if ( fakeImage && fakeImage.getAttribute( '_cke_real_element_type' ) && fakeImage.getAttribute( '_cke_real_element_type' ) == 'flash' )
+ if ( fakeImage && fakeImage.data( 'cke-real-element-type' ) && fakeImage.data( 'cke-real-element-type' ) == 'flash' )
{
this.fakeImage = fakeImage;
Index: _source/plugins/flash/plugin.js
===================================================================
--- _source/plugins/flash/plugin.js (revision 6095)
+++ _source/plugins/flash/plugin.js (working copy)
@@ -75,7 +75,7 @@
{
var element = evt.data.element;
- if ( element.is( 'img' ) && element.getAttribute( '_cke_real_element_type' ) == 'flash' )
+ if ( element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'flash' )
evt.data.dialog = 'flash';
});
@@ -85,7 +85,7 @@
editor.contextMenu.addListener( function( element, selection )
{
if ( element && element.is( 'img' ) && !element.isReadOnly()
- && element.getAttribute( '_cke_real_element_type' ) == 'flash' )
+ && element.data( 'cke-real-element-type' ) == 'flash' )
return { flash : CKEDITOR.TRISTATE_OFF };
});
}
Index: _source/plugins/forms/dialogs/button.js
===================================================================
--- _source/plugins/forms/dialogs/button.js (revision 6095)
+++ _source/plugins/forms/dialogs/button.js (working copy)
@@ -52,7 +52,7 @@
setup : function( element )
{
this.setValue(
- element.getAttribute( '_cke_saved_name' ) ||
+ element.data( 'cke-saved-name' ) ||
element.getAttribute( 'name' ) ||
'' );
},
@@ -61,10 +61,10 @@
var element = data.element;
if ( this.getValue() )
- element.setAttribute( '_cke_saved_name', this.getValue() );
+ element.data( 'cke-saved-name', this.getValue() );
else
{
- element.removeAttribute( '_cke_saved_name' );
+ element.data( 'cke-saved-name', false );
element.removeAttribute( 'name' );
}
}
Index: _source/plugins/forms/dialogs/checkbox.js
===================================================================
--- _source/plugins/forms/dialogs/checkbox.js (revision 6095)
+++ _source/plugins/forms/dialogs/checkbox.js (working copy)
@@ -51,7 +51,7 @@
setup : function( element )
{
this.setValue(
- element.getAttribute( '_cke_saved_name' ) ||
+ element.data( 'cke-saved-name' ) ||
element.getAttribute( 'name' ) ||
'' );
},
@@ -61,10 +61,10 @@
// IE failed to update 'name' property on input elements, protect it now.
if ( this.getValue() )
- element.setAttribute( '_cke_saved_name', this.getValue() );
+ element.data( 'cke-saved-name', this.getValue() );
else
{
- element.removeAttribute( '_cke_saved_name' );
+ element.data( 'cke-saved-name', false );
element.removeAttribute( 'name' );
}
}
Index: _source/plugins/forms/dialogs/form.js
===================================================================
--- _source/plugins/forms/dialogs/form.js (revision 6095)
+++ _source/plugins/forms/dialogs/form.js (working copy)
@@ -84,17 +84,17 @@
accessKey : 'N',
setup : function( element )
{
- this.setValue( element.getAttribute( '_cke_saved_name' ) ||
+ this.setValue( element.data( 'cke-saved-name' ) ||
element.getAttribute( 'name' ) ||
'' );
},
commit : function( element )
{
if ( this.getValue() )
- element.setAttribute( '_cke_saved_name', this.getValue() );
+ element.data( 'cke-saved-name', this.getValue() );
else
{
- element.removeAttribute( '_cke_saved_name' );
+ element.data( 'cke-saved-name', false );
element.removeAttribute( 'name' );
}
}
Index: _source/plugins/forms/dialogs/hiddenfield.js
===================================================================
--- _source/plugins/forms/dialogs/hiddenfield.js (revision 6095)
+++ _source/plugins/forms/dialogs/hiddenfield.js (working copy)
@@ -17,7 +17,7 @@
selection = editor.getSelection(),
element = selection.getSelectedElement();
- if ( element && element.getAttribute( '_cke_real_element_type' ) && element.getAttribute( '_cke_real_element_type' ) == 'hiddenfield' )
+ if ( element && element.data( 'cke-real-element-type' ) && element.data( 'cke-real-element-type' ) == 'hiddenfield' )
{
this.hiddenField = element;
element = editor.restoreRealElement( this.hiddenField );
@@ -59,7 +59,7 @@
setup : function( element )
{
this.setValue(
- element.getAttribute( '_cke_saved_name' ) ||
+ element.data( 'cke-saved-name' ) ||
element.getAttribute( 'name' ) ||
'' );
},
Index: _source/plugins/forms/dialogs/radio.js
===================================================================
--- _source/plugins/forms/dialogs/radio.js (revision 6095)
+++ _source/plugins/forms/dialogs/radio.js (working copy)
@@ -51,7 +51,7 @@
setup : function( element )
{
this.setValue(
- element.getAttribute( '_cke_saved_name' ) ||
+ element.data( 'cke-saved-name' ) ||
element.getAttribute( 'name' ) ||
'' );
},
@@ -60,10 +60,10 @@
var element = data.element;
if ( this.getValue() )
- element.setAttribute( '_cke_saved_name', this.getValue() );
+ element.data( 'cke-saved-name', this.getValue() );
else
{
- element.removeAttribute( '_cke_saved_name' );
+ element.data( 'cke-saved-name', false );
element.removeAttribute( 'name' );
}
}
Index: _source/plugins/forms/dialogs/select.js
===================================================================
--- _source/plugins/forms/dialogs/select.js (revision 6095)
+++ _source/plugins/forms/dialogs/select.js (working copy)
@@ -193,11 +193,11 @@
setup : function( name, element )
{
if ( name == 'clear' )
- this.setValue( this['default'] || '' );
+ this.setValue( this[ 'default' ] || '' );
else if ( name == 'select' )
{
this.setValue(
- element.getAttribute( '_cke_saved_name' ) ||
+ element.data( 'cke-saved-name' ) ||
element.getAttribute( 'name' ) ||
'' );
}
@@ -205,10 +205,10 @@
commit : function( element )
{
if ( this.getValue() )
- element.setAttribute( '_cke_saved_name', this.getValue() );
+ element.data( 'cke-saved-name', this.getValue() );
else
{
- element.removeAttribute( '_cke_saved_name' ) ;
+ element.data( 'cke-saved-name', false );
element.removeAttribute( 'name' );
}
}
Index: _source/plugins/forms/dialogs/textarea.js
===================================================================
--- _source/plugins/forms/dialogs/textarea.js (revision 6095)
+++ _source/plugins/forms/dialogs/textarea.js (working copy)
@@ -50,17 +50,17 @@
setup : function( element )
{
this.setValue(
- element.getAttribute( '_cke_saved_name' ) ||
+ element.data( 'cke-saved-name' ) ||
element.getAttribute( 'name' ) ||
'' );
},
commit : function( element )
{
if ( this.getValue() )
- element.setAttribute( '_cke_saved_name', this.getValue() );
+ element.data( 'cke-saved-name', this.getValue() );
else
{
- element.removeAttribute( '_cke_saved_name' );
+ element.data( 'cke-saved-name', false );
element.removeAttribute( 'name' );
}
}
Index: _source/plugins/forms/dialogs/textfield.js
===================================================================
--- _source/plugins/forms/dialogs/textfield.js (revision 6095)
+++ _source/plugins/forms/dialogs/textfield.js (working copy)
@@ -98,7 +98,7 @@
setup : function( element )
{
this.setValue(
- element.getAttribute( '_cke_saved_name' ) ||
+ element.data( 'cke-saved-name' ) ||
element.getAttribute( 'name' ) ||
'' );
},
@@ -107,10 +107,10 @@
var element = data.element;
if ( this.getValue() )
- element.setAttribute( '_cke_saved_name', this.getValue() );
+ element.data( 'cke-saved-name', this.getValue() );
else
{
- element.removeAttribute( '_cke_saved_name' );
+ element.data( 'cke-saved-name', false );
element.removeAttribute( 'name' );
}
}
Index: _source/plugins/forms/plugin.js
===================================================================
--- _source/plugins/forms/plugin.js (revision 6095)
+++ _source/plugins/forms/plugin.js (working copy)
@@ -167,7 +167,7 @@
return { imagebutton : CKEDITOR.TRISTATE_OFF };
}
- if ( name == 'img' && element.getAttribute( '_cke_real_element_type' ) == 'hiddenfield' )
+ if ( name == 'img' && element.data( 'cke-real-element-type' ) == 'hiddenfield' )
return { hiddenfield : CKEDITOR.TRISTATE_OFF };
}
});
@@ -183,7 +183,7 @@
evt.data.dialog = 'select';
else if ( element.is( 'textarea' ) )
evt.data.dialog = 'textarea';
- else if ( element.is( 'img' ) && element.getAttribute( '_cke_real_element_type' ) == 'hiddenfield' )
+ else if ( element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'hiddenfield' )
evt.data.dialog = 'hiddenfield';
else if ( element.is( 'input' ) )
{
Index: _source/plugins/htmldataprocessor/plugin.js
===================================================================
--- _source/plugins/htmldataprocessor/plugin.js (revision 6095)
+++ _source/plugins/htmldataprocessor/plugin.js (working copy)
@@ -98,7 +98,7 @@
[
// Event attributes (onXYZ) must not be directly set. They can become
// active in the editing area (IE|WebKit).
- [ ( /^on/ ), '_cke_pa_on' ]
+ [ ( /^on/ ), 'data-cke-pa-on' ]
]
};
@@ -121,10 +121,10 @@
attributeNames :
[
// Attributes saved for changes and protected attributes.
- [ ( /^_cke_(saved|pa)_/ ), '' ],
+ [ ( /^data-cke-(saved|pa)-/ ), '' ],
- // All "_cke" attributes are to be ignored.
- [ ( /^_cke.*/ ), '' ],
+ // All "data-cke" attributes are to be ignored.
+ [ ( /^data-cke.*/ ), '' ],
[ 'hidefocus', '' ]
],
@@ -138,7 +138,7 @@
if ( attribs )
{
// Elements marked as temporary are to be ignored.
- if ( attribs.cke_temp )
+ if ( attribs[ 'data-cke-temp' ] )
return false;
// Remove duplicated attributes - #3789.
@@ -146,7 +146,7 @@
savedAttributeName;
for ( var i = 0 ; i < attributeNames.length ; i++ )
{
- savedAttributeName = '_cke_saved_' + attributeNames[ i ];
+ savedAttributeName = 'data-cke-saved-' + attributeNames[ i ];
savedAttributeName in attribs && ( delete attribs[ attributeNames[ i ] ] );
}
}
@@ -181,7 +181,7 @@
{
if ( !( element.children.length ||
element.attributes.name ||
- element.attributes._cke_saved_name ) )
+ element.attributes[ 'data-cke-saved-name' ] ) )
{
return false;
}
@@ -211,7 +211,7 @@
title : function( element )
{
var titleText = element.children[ 0 ];
- titleText && ( titleText.value = element.attributes[ '_cke_title' ] || '' );
+ titleText && ( titleText.value = element.attributes[ 'data-cke-title' ] || '' );
}
},
@@ -273,7 +273,7 @@
}
var protectAttributeRegex = /<((?:a|area|img|input)[\s\S]*?\s)((href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+)))([^>]*)>/gi,
- findSavedSrcRegex = /\s_cke_saved_src\s*=/;
+ findSavedSrcRegex = /\sdata-cke-saved-src\s*=/;
var protectElementsRegex = /(?:';
@@ -799,7 +799,7 @@
CKEDITOR.tools.buildStyleHtml( editor.config.contentsCss ) +
headExtra );
- var baseTag = config.baseHref ? '' : '';
+ var baseTag = config.baseHref ? '' : '';
if ( fullPage )
{
@@ -971,7 +971,7 @@
editor.on( 'contentDom', function()
{
var title = editor.document.getElementsByTag( 'title' ).getItem( 0 );
- title.setAttribute( '_cke_title', editor.document.$.title );
+ title.data( 'cke-title', editor.document.$.title );
editor.document.$.title = frameLabel;
});