The code couldn’t be directly ported due to license differences. Joplin’s MIT license is more permissible and flexible while Zettlr is under GPL. If Joplin used that code, it would be in violation of Zettlr’s license due to same license requirement of GPL and Joplin going under GPL would be a bad thing for its current goals. GPL forces all projects built from a GPL project to be under the same license with major difficulties in changing to anything else and Joplin is much about freedom to choose how to use the app while also being as secure as can be.
I also stand corrected, Joplin apparently could be dual licensed with GPL but it still wouldn’t be good for the reasons I’ve listed above.