Linetrace from mouse cursor in editor mode

I have an EUW plugin which currently does a line trace on the center of the play area using the camera center coordinates. Instead of this I want to do line trace using the mouse cursor’s coordinates, but I am unable to get the mouse coordinates in the editor mode.
I only want to use the blueprint and python. My UE version is 5.3.
I tried using PlayerController but it seems it only works during the Play mode.
I tried asking AI but none of them was able to provide a solution to my problem. I am super beginner so any help would be highly appreciated.