You can do this using a router table and split fence if the left side is adjusted forward to precisely match the exposure of the router bit. The idea is to provide outfeed support exactly corresponding to the material removed, just like on a jointer, and similar methodology can be used.
The same can be be done using a single-piece fence too simply by clamping on or applying some material (which can even be tape, in one or two layers, for the ghetto version) to the left side of the fence as described in Make your router think it's a jointer on the Wood Magazine site. I think it's worth noting that this probably under-sells the ease of setup and you will need to run a couple of test pieces to really dial in the accuracy, as covered in the WWGOA's article Edge Joint on a Router Table.
But the method that I think is best overall matches the functionality of the following jig:
It's not immediately obvious what the advantage of this setup is, but in addition to ensuring a dead-straight result it doesn't rely on the edge already being very straight. If necessary this could even be used to straighten a live/waney edge (in multiple passes!) if for some reason you can't saw the uneven edge off beforehand.
Image used previously in Methods of jointing without a jointer which is worth a look for anyone who doesn't have a jointer.