Help with a sentence in Bacon's Historia Henrici VII

I’m after some help with a shamefully simple sentence in the Latin translation of Francis Bacon’s History of the Reign of King Henry VII. He has just been telling us how the king attracted hatred by postponing his queen’s coronation:

Neque enim secuta est coronatio reginae, nisi post duos annos, postquam scilicet pericula regi pro praeceptis fuerunt quid agendum sibi esset edocentia.

It’s from postquam onwards that I’m a bit puzzled, particularly about what exactly regī and prō praeceptīs might mean. Here’s my attempt to render it in something approaching readable English:

And in fact the queen’s coronation didn’t come about until two years later, when the king had dangers to guide him, clearly teaching him what he had to do.

That is, I take regī to be a possessive use of the dative, and prō to mean something like ‘in place of’. So, in translationese: ‘for the king there were dangers in place of instructions’. But for some reason this seems to me an eccentric reading. Could prō have one of its myriad other meanings here? Could they be ‘dangers to the king’ (i.e., ‘to his life’)? Or is regī instead the indirect object of the participle ēdocentia? And can scīlicet go with ēdocentia, as I have it, or does it mean ‘namely’ here?

I’m not sure what to make of Bacon’s very terse English version, which goes as follows:

…for the coronation of her was not till almost two years after, when danger had taught him what to do.

The real problem is that I’m supposed to be guiding a beginning student through this text, and so ambiguity, which I’m usually comfortable with, is unwelcome; I don’t want to present her with six possible interpretations of the sentence unless it’s absolutely necessary.

Thanks in advance.

Sic puto

Nor. indeed. did the queen’s coronation follow until two years later, after, of course, there were challenges/dangers to the king regarding his plans seeking/attempting [A&G490.2] to teach him what he must do [but didn’t, i.e., contrary to fact, so imperfect subjunctive // > quae res contraria est, ergo subjunctivus modus imperfecto tempore> ].

postquam scilicet pericula…
but only after it was evident that there were dangers to the king regarding his plans, teaching him what he must do /dicam.

Gratias tibi ago, adriane.