3

I am working on Skype Integration With SPFx React webpart in Office 365. I tried to refer below URL

http://www.sharepointcolumn.com/lync-presence-indicators-code-snippets-in-sharepoint-2013/

but some of the HTML attributes is not supporting in React Component and IMNImageOnClick function is also undefined in Workbench, may be some reference JS need to load explicitly in SPFx webpart.

any kind of suggestion will be helpful

Thanks

0

you can use dangerouslySetInnerHTML

render() {
    return (<span dangerouslySetInnerHTML={{__html: `<span class='ms-imnSpan'>
                   <a href='#' onclick='IMNImageOnClick(event);return false;' class='ms-imnlink ms-spimn-presenceLink' >
                    <span class='ms-spimn-presenceWrapper ms-imnImg ms-spimn-imgSize-10x10'>
                        <img name='imnmark'
                        title=''
                        ShowOfflinePawn='1'
                        class='ms-spimn-img ms-spimn-presence-disconnected-10x10x32'
                        src='/_layouts/15/images/spimn.png?rev=23'
                        alt='User Presence'
                        sip='${decodeURIComponent(this.props.accountName)}'
                        id='imn_1,type=sip' />
                   </span>
                  </a>
               </span>`}}>
            </span>);
}

Dangerously Set innerHTML

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.