> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: getSelection() ## Article: getSelection() ## Article Link: https://dev.wix.com/docs/sdk/host-modules/editor/elements/get-selection.md ## Article Content: # getSelection() Gets a list of elements selected on the editor canvas. ## Syntax ```ts function getSelection(): Promise ``` ## Returns `Promise` Array containing [Element](https://dev.wix.com/docs/sdk/host-modules/editor/elements/element/introduction.md) objects. ## Example ```javascript import { editor, elements } from '@wix/editor'; import { createClient } from '@wix/sdk'; const client = createClient({ host: editor.host(), modules: { elements } }); async function getSelectedElements(propName) { const selectedElements = await client.elements.getSelection(); } ```