Guest User

Untitled

a guest
Jan 6th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. else if ( tagName == 'img' ) {
  2. element.isEmpty = 0;
  3.  
  4. // Translate smiley (image) to text emotion.
  5. var src = attributes[ 'data-cke-saved-src' ] || attributes.src, alt = attributes.alt;
  6.  
  7. if ( src && src.indexOf( editor.config.smiley_path ) != -1 && alt )
  8. return new CKEDITOR.htmlParser.text( smileyMap[ alt ] );
  9. else
  10. element.children = [ new CKEDITOR.htmlParser.text( src ) ];
  11. // I ADDED THIS LINE
  12. attributes.alt && (element.attributes.imagealt = attributes.alt);
  13.  
  14. }
  15.  
  16. attribute: function( name, val ) {
  17. if ( name == 'option' ) {
  18. this.write( '=', val );
  19. }
  20. else if (name == 'imagealt') {
  21. this.write(' alt=', val);
  22. }
  23. }
Add Comment
Please, Sign In to add comment