How to get the highlighted/selected element in ckeditor for MAC Safari?

32 views Asked by At

I am trying to get the selected element and check if it is img tag or any other tag. I am using below code to get the selected/highlighted element in ckeditor.

var selectedElement = editor.getSelection().getStartElement();

It is working fine in chrome, firefox and edge browser but returns null in safari browser.

Is there any alternative way to get this in safari browser?

0

There are 0 answers