function showMenu($trigger) {
		menuActive = true;
		const rect = $trigger?.getBoundingClientRect();
		const { bottom, left } = rect;
		const readOnly = editor.getReadOnly();
		const [x, y] = relativePosition(left, bottom);
		if (readOnly) {
			populateMenuItems("read-only");
		} else {
			populateMenuItems();
		}

		$menu.style.left = `${x}px`;
		$menu.style.top = `${y}px`;

		if (!$menu.isConnected) $el.parentElement.append($menu);
		if ($trigger) positionMenu($trigger);

		editor.selection.on("changeCursor", hideMenu);
		editor.selection.on("changeSelection", hideMenu);
	}
Shows the edit context menu
@param {HTMLElement} [$trigger] A trigger element that triggered the menu, if not provided, menu will be shown at the current cursor position