How to temporarily enchant weapons with magic effects?

In Final Fantasy series there’s a job called Mystic Knight (a.k.a. Spell Fencer, Rune Fencer), where you can temporarily enchant your weapon with a Spell you know (from Black Mage spell table) called Spellblade.

In Final Fantasy 5 for e.g., a Spellblade takes a turn (it’s an action) and after that, those are the effects:

  • Fire/Blizzard/Thunder/Poison: 2x damage when striking an elemental weakness
  • Fira/Blizzara/Thundara: 3x damage when striking an elemental weakness

…and so on.

In practical 5e, looks a multi class of Fighter/Paladin and Wizard/Warlock. I’d like to know if there’s any way of recreating this kind of effect on 5e without Homebrew.

The only spell I found which looks like it is Magic Weapon (2nd-level transmutation, for Paladins and Wizards):

You touch a nonmagical weapon. Until the spell ends that weapon becomes a magic weapon with a +1 bonus to attack and damage rolls.

You can’t add any element (nor do any extra damage based off that), only plusses. It’s a basic version of what a Mystic Knight would do. All other enchanting spells are meant for permanent enchant.

Is there any other Spell which fits this behavior in any other book other than PHB/DMG?

If not, how to Homebrew it in a balanced way? (Example: Adds 1d4 magical damage of an element? Doesn’t add but does critical damage only on who has weakness? What could be replacement for Fire/Blizzard/Thunder/Poison in 5e? etc)