Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function parseNode( node ) {
let selection, bookmark;
if ( node && twemoji.test( node.textContent || node.innerText ) ) {
if ( env.webkit ) {
selection = editor.selection;
bookmark = selection.getBookmark();
}
replaceEmoji( node );
if ( env.webkit ) {
selection.moveToBookmark( bookmark );
}
}
}
tinymce.each( editor.dom.$( 'img.emoji', event.node ), function( image ) {
if ( image.alt && twemoji.test( image.alt ) ) {
setImgAttr( image );
}
} );
} );