﻿//Solve the problem of Publishing Hyperlink fields becoming unclickable once you've deleted the link. This replaces the empty
//link text with the URL so there is something you to click so the ribbon options come up.
$(document).ready(function () {
    $("a.ms-rtestate-write").each(function () {
        var innerText = $(this).text();
        if (innerText.trim() == "") {
            $(this).text($(this).attr("href"));
        }
    });
});
