The Knot Code Editor gives you full control over your store’s source code with a powerful, professional editing experience. Whether you’re making quick tweaks or implementing complex features, the editor provides all the tools you need to work efficiently.
The Code Editor interface with syntax highlighting, file explorer, and live preview
Wait a moment for the language server to initialize
Ensure your file has the correct extension
Check for errors in imported modules
Need Help? The editor includes built-in documentation. Hover over any function or component to see its documentation, or press Cmd/Ctrl + Click to jump to its definition.
⌘I
{"docsConfig":{"theme":"maple","$schema":"https://mintlify.com/docs.json","name":"Knot - Knowledge center","colors":{"primary":"#FFC382","light":"#FFC382","dark":"#FFC382"},"logo":{"light":"https://mintcdn.com/knot-6961b7be/USocuheQiB6OVesj/logo/light.svg?fit=max\u0026auto=format\u0026n=USocuheQiB6OVesj\u0026q=85\u0026s=93bf159116b4b75271d8cced5e5bda3a","dark":"https://mintcdn.com/knot-6961b7be/USocuheQiB6OVesj/logo/dark.svg?fit=max\u0026auto=format\u0026n=USocuheQiB6OVesj\u0026q=85\u0026s=16062d373d181e1500fbec1971cdcfad"},"favicon":"/favicon.png","navbar":{"links":[{"label":"Discord","href":"https://discord.gg/gxc6yrsc"}],"primary":{"type":"button","label":"Dashboard","href":"https://dashboard.mintlify.com"}},"footer":{"socials":{"x":"https://x.com/BenKobiB","linkedin":"https://linkedin.com/company/knot"}},"navigation":{"global":{"anchors":[{"anchor":"Changelog","icon":"newspaper","href":"https://knot.featurebase.app/changelog"},{"anchor":"Community","icon":"discord","href":"https://discord.gg/gxc6yrsc"},{"anchor":"Feature Requests","icon":"Lightbulb","href":"https://knot.featurebase.app"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"knot-6961b7be","hasAudioNarration":false,"actualSubdomain":"knot-6961b7be","customDomains":["docs.knot.dev"],"gitSource":{"type":"github","owner":"project-headless","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a20c9d25ba58cae093df370","collectionId":"4f710ba5-ba8e-4f55-b568-a76f7d1c753c","schemaVersion":"v2"},"entitlements":{},"buildId":"6a20c9d25ba58cae093df370:success","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"The Instant Editor","count":7},{"language":"default","tag":"Getting Started","count":4},{"language":"default","tag":"Integrations \u0026 Addons","count":2}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"features/code-editor","slug":"/features/code-editor","pageMetadata":{"title":"Code Editor","description":"View \u0026 Edit your project's code directly in Knot","href":"/features/code-editor"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"View \u0026 Edit your project’s code directly in Knot\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,ol:`ol`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Frame,Heading,Info,Note,OptimizedImage,Step,Steps,Table,Tip,Warning}=_components;if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`The Knot Code Editor gives you full control over your store’s source code with a powerful, professional editing experience. Whether you’re making quick tweaks or implementing complex features, the editor provides all the tools you need to work efficiently.`}),`\n`,_jsx(Frame,{caption:`The Code Editor interface with syntax highlighting, file explorer, and live preview`,children:_jsx(OptimizedImage,{src:`https://mintlify.s3.us-west-1.amazonaws.com/knot-6961b7be/images/code-editor-overview.png`,alt:`Code Editor Overview`,style:{width:`100%`,maxWidth:`900px`,margin:`20px 0`}})}),`\n`,_jsx(Heading,{level:`2`,id:`key-features`,children:`Key Features`}),`\n`,_jsx(Heading,{level:`3`,id:`intelligent-code-editing`,children:`Intelligent Code Editing`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax Highlighting`}),`: Automatic language detection and color coding`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Auto-completion`}),`: Smart suggestions as you type`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Error Detection`}),`: Real-time error highlighting and diagnostics`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Code Formatting`}),`: Automatic formatting with customizable rules`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`advanced-navigation`,children:`Advanced Navigation`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`File Explorer`}),`: Browse and manage your project files`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Quick Open`}),`: Fast file switching with `,_jsx(_components.code,{children:`Cmd/Ctrl + P`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Go to Definition`}),`: Jump to function and variable definitions`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Find \u0026 Replace`}),`: Powerful search across files with regex support`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`getting-started`,children:`Getting Started`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Access the Code Editor`,children:_jsxs(_components.p,{children:[`Click the code icon `,_jsxs(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{display:`inline-block`,verticalAlign:`middle`},children:[_jsx(`polyline`,{points:`16 18 22 12 16 6`}),_jsx(`polyline`,{points:`8 6 2 12 8 18`})]}),` in the top navigation to open the editor`]})}),_jsx(Step,{title:`Navigate your files`,children:_jsx(_components.p,{children:`Use the file explorer on the left to browse your project structure. Click any file to open it in the editor.`})}),_jsx(Step,{title:`Make your changes`,children:_jsx(_components.p,{children:`Edit code with full syntax highlighting and auto-completion support. Changes are tracked automatically.`})}),_jsx(Step,{title:`Save your work`,children:_jsxs(_components.p,{children:[`Press `,_jsx(_components.code,{children:`Cmd/Ctrl + S`}),` to save the current file, or use auto-save to save changes automatically.`]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`file-management`,children:`File Management`}),`\n`,_jsx(Heading,{level:`3`,id:`file-explorer`,children:`File Explorer`}),`\n`,_jsx(_components.p,{children:`The file explorer panel shows your entire project structure:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Create new files`}),`: Right-click in the explorer and select “New File”`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Rename files`}),`: Right-click and select “Rename” or press `,_jsx(_components.code,{children:`F2`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Delete files`}),`: Right-click and select “Delete” (with confirmation)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Move files`}),`: Drag and drop to reorganize your project`]}),`\n`]}),`\n`,_jsx(Frame,{caption:`File explorer showing project structure with context menu options`,children:_jsx(OptimizedImage,{src:`https://mintlify.s3.us-west-1.amazonaws.com/knot-6961b7be/images/file-explorer.png`,alt:`File Explorer`,style:{width:`100%`,maxWidth:`400px`,margin:`20px 0`}})}),`\n`,_jsx(Heading,{level:`3`,id:`supported-file-types`,children:`Supported File Types`}),`\n`,_jsx(_components.p,{children:`The editor provides specialized support for:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`React/JSX`}),`: Component editing with JSX syntax support`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`TypeScript`}),`: Full type checking and IntelliSense`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`CSS/SCSS`}),`: Style editing with color previews`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`JSON`}),`: Configuration files with schema validation`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Markdown`}),`: Documentation with live preview`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`editor-features`,children:`Editor Features`}),`\n`,_jsx(Heading,{level:`3`,id:`multi-cursor-editing`,children:`Multi-Cursor Editing`}),`\n`,_jsxs(_components.p,{children:[`Hold `,_jsx(_components.code,{children:`Alt/Option`}),` and click to add multiple cursors, allowing you to edit multiple locations simultaneously.`]}),`\n`,_jsx(Heading,{level:`3`,id:`code-folding`,children:`Code Folding`}),`\n`,_jsx(_components.p,{children:`Click the arrow icons in the gutter to collapse/expand code blocks, making it easier to navigate large files.`}),`\n`,_jsx(Heading,{level:`3`,id:`split-view`,children:`Split View`}),`\n`,_jsxs(_components.p,{children:[`Open multiple files side-by-side by dragging tabs or using `,_jsx(_components.code,{children:`Cmd/Ctrl + \\\\`}),` to split the editor.`]}),`\n`,_jsx(Frame,{caption:`Split view showing HTML and CSS files side-by-side`,children:_jsx(OptimizedImage,{src:`https://mintlify.s3.us-west-1.amazonaws.com/knot-6961b7be/images/split-view.png`,alt:`Split View Editor`,style:{width:`100%`,maxWidth:`900px`,margin:`20px 0`}})}),`\n`,_jsx(Heading,{level:`2`,id:`keyboard-shortcuts`,children:`Keyboard Shortcuts`}),`\n`,_jsx(Heading,{level:`3`,id:`essential-shortcuts`,children:`Essential Shortcuts`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Action`}),_jsx(_components.th,{children:`Windows/Linux`}),_jsx(_components.th,{children:`Mac`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Save file`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Ctrl + S`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Cmd + S`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Open file`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Ctrl + P`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Cmd + P`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Find in file`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Ctrl + F`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Cmd + F`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Find \u0026 Replace`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Ctrl + H`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Cmd + H`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Comment line`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Ctrl + /`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Cmd + /`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Duplicate line`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Ctrl + D`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Cmd + D`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Move line up/down`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Alt + ↑/↓`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Option + ↑/↓`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Multi-cursor`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Alt + Click`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Option + Click`})})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`advanced-shortcuts`,children:`Advanced Shortcuts`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Action`}),_jsx(_components.th,{children:`Windows/Linux`}),_jsx(_components.th,{children:`Mac`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Go to definition`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`F12`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`F12`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Find all references`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Shift + F12`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Shift + F12`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Rename symbol`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`F2`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`F2`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Format document`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Shift + Alt + F`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Shift + Option + F`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Toggle terminal`}),_jsx(_components.td,{children:_jsx(_components.code,{children:\"Ctrl + `` \"})}),_jsx(_components.td,{children:_jsx(_components.code,{children:\"Cmd + `` \"})})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`working-with-git`,children:`Working with Git`}),`\n`,_jsx(_components.p,{children:`The Code Editor includes Git integration:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`View changes`}),`: Modified files are marked in the explorer`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Diff view`}),`: See what changed in each file`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Stage changes`}),`: Select which changes to include`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Commit`}),`: Write commit messages and push changes`]}),`\n`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Version Control`}),`: All changes are automatically tracked. You can view file history and revert changes at any time.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`tips-for-efficient-coding`,children:`Tips for Efficient Coding`}),`\n`,_jsxs(Tip,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Pro Tips:`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Use `,_jsx(_components.code,{children:`Cmd/Ctrl + Shift + P`}),` to open the command palette for quick access to all editor commands`]}),`\n`,_jsx(_components.li,{children:`Enable auto-save in settings to never lose your work`}),`\n`,_jsx(_components.li,{children:`Use the minimap on the right for quick navigation in large files`}),`\n`,_jsx(_components.li,{children:`Customize your theme and font size in editor settings`}),`\n`]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Important`}),`: While the Code Editor gives you full control, be careful when modifying core files. Always test your changes in preview before publishing.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`common-use-cases`,children:`Common Use Cases`}),`\n`,_jsx(Heading,{level:`3`,id:`customizing-components`,children:`Customizing Components`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Locate the component file in the explorer`}),`\n`,_jsx(_components.li,{children:`Make your modifications`}),`\n`,_jsx(_components.li,{children:`Preview changes in real-time`}),`\n`,_jsx(_components.li,{children:`Save when satisfied`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`adding-custom-css`,children:`Adding Custom CSS`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Open your stylesheet file`}),`\n`,_jsx(_components.li,{children:`Add new styles or modify existing ones`}),`\n`,_jsx(_components.li,{children:`Use the color picker for easy color selection`}),`\n`,_jsx(_components.li,{children:`See changes reflected immediately in preview`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`implementing-new-features`,children:`Implementing New Features`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Create new component files`}),`\n`,_jsx(_components.li,{children:`Import necessary dependencies`}),`\n`,_jsx(_components.li,{children:`Write your implementation`}),`\n`,_jsx(_components.li,{children:`Test thoroughly before publishing`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`troubleshooting`,children:`Troubleshooting`}),`\n`,_jsx(Heading,{level:`3`,id:`code-not-updating`,children:`Code Not Updating`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Ensure you’ve saved your changes (`,_jsx(_components.code,{children:`Cmd/Ctrl + S`}),`)`]}),`\n`,_jsx(_components.li,{children:`Check for syntax errors in the problems panel`}),`\n`,_jsx(_components.li,{children:`Refresh the preview window if needed`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`intellisense-not-working`,children:`IntelliSense Not Working`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Wait a moment for the language server to initialize`}),`\n`,_jsx(_components.li,{children:`Ensure your file has the correct extension`}),`\n`,_jsx(_components.li,{children:`Check for errors in imported modules`}),`\n`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Need Help?`}),` The editor includes built-in documentation. Hover over any function or component to see its documentation, or press `,_jsx(_components.code,{children:`Cmd/Ctrl + Click`}),` to jump to its definition.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Code Editor","description":"View \u0026 Edit your project's code directly in Knot","href":"/features/code-editor"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Key Features","slug":"key-features","depth":2,"children":[{"title":"Intelligent Code Editing","slug":"intelligent-code-editing","depth":3,"children":[]},{"title":"Advanced Navigation","slug":"advanced-navigation","depth":3,"children":[]}]},{"title":"Getting Started","slug":"getting-started","depth":2,"children":[]},{"title":"File Management","slug":"file-management","depth":2,"children":[{"title":"File Explorer","slug":"file-explorer","depth":3,"children":[]},{"title":"Supported File Types","slug":"supported-file-types","depth":3,"children":[]}]},{"title":"Editor Features","slug":"editor-features","depth":2,"children":[{"title":"Multi-Cursor Editing","slug":"multi-cursor-editing","depth":3,"children":[]},{"title":"Code Folding","slug":"code-folding","depth":3,"children":[]},{"title":"Split View","slug":"split-view","depth":3,"children":[]}]},{"title":"Keyboard Shortcuts","slug":"keyboard-shortcuts","depth":2,"children":[{"title":"Essential Shortcuts","slug":"essential-shortcuts","depth":3,"children":[]},{"title":"Advanced Shortcuts","slug":"advanced-shortcuts","depth":3,"children":[]}]},{"title":"Working with Git","slug":"working-with-git","depth":2,"children":[]},{"title":"Tips for Efficient Coding","slug":"tips-for-efficient-coding","depth":2,"children":[]},{"title":"Common Use Cases","slug":"common-use-cases","depth":2,"children":[{"title":"Customizing Components","slug":"customizing-components","depth":3,"children":[]},{"title":"Adding Custom CSS","slug":"adding-custom-css","depth":3,"children":[]},{"title":"Implementing New Features","slug":"implementing-new-features","depth":3,"children":[]}]},{"title":"Troubleshooting","slug":"troubleshooting","depth":2,"children":[{"title":"Code Not Updating","slug":"code-not-updating","depth":3,"children":[]},{"title":"IntelliSense Not Working","slug":"intellisense-not-working","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"knot-6961b7be","siteName":"Knot - Knowledge center","title":"Code Editor - Knot - Knowledge center","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2025-08-17T21:24:33.200Z","originalFileLocation":"features/code-editor.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"View \u0026amp; Edit your project\u0026#x27;s code directly in Knot\">\u003cmeta data-mint-head name=\"application-name\" content=\"Knot - Knowledge center\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/knot-6961b7be/cYbrmAzXScqO-Gtl/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/knot-6961b7be/cYbrmAzXScqO-Gtl/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/knot-6961b7be/cYbrmAzXScqO-Gtl/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/knot-6961b7be/cYbrmAzXScqO-Gtl/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/knot-6961b7be/cYbrmAzXScqO-Gtl/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/knot-6961b7be/cYbrmAzXScqO-Gtl/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/knot-6961b7be/cYbrmAzXScqO-Gtl/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/knot-6961b7be/cYbrmAzXScqO-Gtl/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/knot-6961b7be/cYbrmAzXScqO-Gtl/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Code Editor - Knot - Knowledge center\">\u003cmeta data-mint-head property=\"og:description\" content=\"View \u0026amp; Edit your project\u0026#x27;s code directly in Knot\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Knot - Knowledge center\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.knot.dev/features/code-editor\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://knot-6961b7be.mintlify.app/_mintlify/api/og/v2?division=The+Studio+Editor\u0026amp;title=Code+Editor\u0026amp;description=View+%26+Edit+your+project%27s+code+directly+in+Knot\u0026amp;theme=6f9cba8f4760454032ed7180\u0026amp;signature=dae2db67127b321d46d1c67ee87aaf6e8a6ebe9c7d5bd2be70c1dbfa7a23b213\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Code Editor - Knot - Knowledge center\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"View \u0026amp; Edit your project\u0026#x27;s code directly in Knot\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://knot-6961b7be.mintlify.app/_mintlify/api/og/v2?division=The+Studio+Editor\u0026amp;title=Code+Editor\u0026amp;description=View+%26+Edit+your+project%27s+code+directly+in+Knot\u0026amp;theme=6f9cba8f4760454032ed7180\u0026amp;signature=dae2db67127b321d46d1c67ee87aaf6e8a6ebe9c7d5bd2be70c1dbfa7a23b213\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/knot-6961b7be/cYbrmAzXScqO-Gtl/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Knot - Knowledge center\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FFC382\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.knot.dev/features/code-editor\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/features/code-editor.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.knot.dev/#organization\",\"name\":\"Knot - Knowledge center\",\"url\":\"https://docs.knot.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/knot-6961b7be/USocuheQiB6OVesj/logo/light.svg?fit=max\u0026auto=format\u0026n=USocuheQiB6OVesj\u0026q=85\u0026s=93bf159116b4b75271d8cced5e5bda3a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.knot.dev#website\",\"name\":\"Knot - Knowledge center\",\"url\":\"https://docs.knot.dev\",\"publisher\":{\"@id\":\"https://docs.knot.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.knot.dev/features/code-editor#webpage\",\"url\":\"https://docs.knot.dev/features/code-editor\",\"name\":\"Code Editor\",\"description\":\"View \u0026 Edit your project's code directly in Knot\",\"dateModified\":\"2025-08-17T21:24:33.200Z\",\"isPartOf\":{\"@id\":\"https://docs.knot.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.knot.dev/features/code-editor#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.knot.dev/features/code-editor#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"The Studio Editor\",\"item\":\"https://docs.knot.dev/features/chat-modes\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Code Editor\",\"item\":\"https://docs.knot.dev/features/code-editor\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.knot.dev/features/code-editor#article\",\"headline\":\"Code Editor\",\"name\":\"Code Editor\",\"description\":\"View \u0026 Edit your project's code directly in Knot\",\"url\":\"https://docs.knot.dev/features/code-editor\",\"mainEntityOfPage\":{\"@id\":\"https://docs.knot.dev/features/code-editor#webpage\"},\"dateModified\":\"2025-08-17T21:24:33.200Z\",\"publisher\":{\"@id\":\"https://docs.knot.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.knot.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Knot - Knowledge center\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Knot - Knowledge center","nav":{"global":{"anchors":[{"anchor":"Changelog","icon":"newspaper","href":"https://knot.featurebase.app/changelog"},{"anchor":"Community","icon":"discord","href":"https://discord.gg/gxc6yrsc"},{"anchor":"Feature Requests","icon":"Lightbulb","href":"https://knot.featurebase.app"}]},"groups":[{"group":"Getting Started","icon":"compass","pages":[{"title":"Getting Started","href":"/index"},{"title":"Create a new project","href":"/create-project"},{"title":"Studio project","href":"/create-studio-project"},{"title":"Instant project","href":"/create-instant-project"}]},{"group":"The Studio Editor","icon":"star","pages":[{"title":"Chat Interface","href":"/features/chat-modes"},{"title":"Visual Editor","description":"Design your store visually with point-and-click editing","href":"/features/visual-editor"},{"title":"Code Editor","href":"/features/code-editor"},{"title":"Media \u0026 Media Generation","description":"Upload, manage, and generate images and videos for your store","href":"/features/media"},{"title":"Custom Project Knowledge","href":"/features/custom-knowledge"},{"title":"Custom Domain","icon":"earth-africa","href":"/features/custom-domain"},{"title":"Project Deployment","icon":"rocket","href":"/features/deploy"}]},{"group":"The Instant Editor","icon":"bolt","pages":[{"title":"Chat Interface","href":"/features/chat-modes"},{"title":"Visual Editor","description":"Design your store visually with point-and-click editing","href":"/features/visual-editor"},{"title":"Code Editor","href":"/features/code-editor"},{"title":"Media \u0026 Media Generation","description":"Upload, manage, and generate images and videos for your store","href":"/features/media"},{"title":"Custom Project Knowledge","href":"/features/custom-knowledge"},{"title":"Custom Domain","icon":"earth-africa","href":"/features/custom-domain"},{"title":"Project Deployment","icon":"rocket","href":"/features/deploy"}]},{"group":"Integrations \u0026 Addons","icon":"plug","pages":[{"title":"Introduction to Integrations \u0026 Addons","href":"/integrations/introduction"},{"title":"Analytics \u0026 Tracking Pixels","href":"/integrations/pixels"}]}]},"basePath":"","title":"Code Editor - Knot - Knowledge center","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-DXXFP6nH.js","DynamicMarkdown-B54_zNBF.js","zoom-image-lightbox-BG6oD64b.js","lightbox-handle-r17bVUz3.js"]}