Which version of Godot are you using?
The following works for me (Godot 3.0.2, Windows 10):
BBCode: [url="https://www.google.com]link[/url]
GDScript:
extends RichTextLabel
func _ready():
connect("meta_clicked", self, "meta_clicked");
func meta_clicked(meta):
OS.shell_open(meta);
You can pass an additional argument(s) in the url as using BBCode like this: [url=,here]Link[/url]
. Then you need to do something like this in your RichTextLabel to parse it:
extends RichTextLabel
func _ready():
connect("meta_clicked", self, "meta_clicked");
func meta_clicked(meta):
var data = meta.split(",", true);
if (str(data[1]) == "here"):
OS.shell_open("https://google.com");