function stringToNumber ( value ) { return parseInt ( value , 10 ) ; } export function isPositionInBox ( style , offsetX , offsetY ) { const left = stringToNumber ( style . left ) ; const top = stringToNumber ( style . top ) ; const width = stringToNumber ( style . width ) + stringToNumber ( style . paddingLeft ) + stringToNumber ( style . paddingRight ) ; const height = stringToNumber ( style . height ) + stringToNumber ( style . paddingTop ) + stringToNumber ( style . paddingBottom ) ; return offsetX >= left && offsetX <= left + width && offsetY >= top && offsetY <= top + height ; } export function removeNode ( node ) { if ( node . parentNode ) { node . parentNode . removeChild ( node ) ; } } const CLS_PREFIX = 'toastui-editor-' ; export function cls ( ... names ) { return names . map ( ( className ) => `${ CLS_PREFIX }${ className }` ) . join ( ' ' ) ; }