function populateMenuItems(mode = "regular") {
		$menu.innerHTML = "";
		const copyText = editor.getCopyText();
		const items = [];

		selectionMenu().forEach((item) => {
			if (mode === "read-only" && !item.readOnly) return;
			if (copyText && !["selected", "all"].includes(item.mode)) return;
			if (!copyText && item.mode === "selected") return;

			items.push(item);
		});

		items.forEach(({ onclick, text }) => {
			$menu.append(<div onclick={onclick}>{text}</div>);
		});
	}
Populates the menu items
@param {'regular'|'read-only'|'select'} mode