Looking for a library or WYSIWYG editor for making rich text

Is there a library or WYSIWYG editor for adding tags to a string?, like

text

If it’s a library, then i hope the text can be dynamic based on a variable too.

Asking here because this would be for the TextCore engine in UI toolkit. I’d also like to hear about ones not specific to TextCore.

Hi, unfortunately we don’t have this in the editor. It would be an interesting addition. In the meantime, maybe there is an online tool to help with that? Also, what did you mean by Library? Did you mean a package or something from the asset store?

By library i mean someone else’s C# code.
Here is the C# code i came up with to simplify adding tags to a string from code.
This is not completely addressing all the tags that there are.
Has someone made this already?

using UnityEngine;
public enum RichTextTag
{
    alpha,
    color,
    mark,
    rotate,
    size,
    sprite,
    allcaps,
    b,
    i,
    lowercase,
    noparse,
    smallcaps,
    s,
    sup,
    sub,
    u,
}

public enum RichTextTagArg
{
    alpha,
    color,
    mark,
    rotate,
    size,
    sprite,
}

public enum RichTextTagNoArg
{
    allcaps,
    b,
    i,
    lowercase,
    noparse,
    smallcaps,
    s,
    sup,
    sub,
    u,
}

public enum RichTextTagCloseable
{
    allcaps,
    color,
}

public static class RichTextBuilder
{
    public static string WithColor(string text, string color)
    {
        return OpenColor(color) + text + CloseTag(RichTextTagCloseable.color);
    }
    public static string OpenColor(string color)
    {
        // Color should be in the format: #RRGGBB
        Debug.Assert(color.Length == 7);
        Debug.Assert(color[0] == '#');
        return $"<color={color}>";
    }
    public static string ColorToString(Color color)
    {
        return "#" + ColorUtility.ToHtmlStringRGB(color);
    }
    public static string OpenColor(Color color)
    {
        // Convert to format "RRGGBB" from UnityEngine.Color
        return OpenColor(ColorToString(color));
    }
    public static string Sprite(int sprite)
    {
        return $"<sprite={sprite}>";
    }
    public static string Alpha(string alphaAA)
    {
        Debug.Assert(alphaAA.Length == 3);
        Debug.Assert(alphaAA[0] == '#');
        return $"<alpha={alphaAA}>";
    }
    public static string IntToHexString(int integer)
    {
        return "#" + integer.ToString("X2");
    }
    public static string Alpha(int alpha)
    {
        Debug.Assert(alpha < 256 && alpha >= 0);
        return $"<alpha={IntToHexString(alpha)}>";
    }
    public static string CloseTag(RichTextTagCloseable tag)
    {
        return $"</{tag}>";
    }
    public static string OpenTag(RichTextTagNoArg tag)
    {
        return $"<{tag}>";
    }
}
}

Somewhat related to this idea, is there a more complete doc of which tags can be closed, can be opened, what the arguments should look like etc., than the one below?