@mdxeditor/editor
Version:
React component for rich text markdown editing
14 lines (13 loc) • 348 B
JavaScript
const CAN_USE_DOM = typeof window !== "undefined" && typeof window.document.createElement !== "undefined";
const IS_APPLE = CAN_USE_DOM && /Mac|iPod|iPhone|iPad/.test(navigator.platform);
function controlOrMeta(metaKey, ctrlKey) {
if (IS_APPLE) {
return metaKey;
}
return ctrlKey;
}
export {
CAN_USE_DOM,
IS_APPLE,
controlOrMeta
};