We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unfortunately, I can't see the highlightedLines field in the input component in studio but I assume it should be there by default?
"@portabletext/react": "^1.0.6", "@sanity/client": "^3.4.1", "@sanity/code-input": "^3.0.0-v3-studio.9", "@sanity/dashboard": "^3.0.0-v3-studio.3", "@sanity/image-url": "^1.0.1", "@sanity/vision": "^3.0.0-dev-preview.17", "next": "12.3.1", "next-pwa": "^5.6.0", "next-sanity": "^0.8.4", "next-themes": "^0.2.1", "prismjs": "^1.29.0", "react": "18.2.0", "react-dom": "18.2.0", "sanity": "^3.0.0-dev-preview.17", "sharp": "^0.31.0", "slugify": "^1.6.5", "styled-components": "^5.3.5"
import dynamic from 'next/dynamic' import { CodeSchemaType } from '@sanity/code-input' // @sanity/code-input dependencies dynamic(() => import('ace-builds/src-noconflict/ace'), { ssr: false }) dynamic(() => import('ace-builds/src-noconflict/mode-swift'), { ssr: false }) dynamic(() => import('ace-builds/src-noconflict/mode-graphqlschema'), { ssr: false }) const CodeBlock: CodeSchemaType = { name: 'codeBlock', title: 'Code Block', type: 'code', options: { theme: 'tomorrow', darkTheme: 'monokai', withFilename: true, language: 'typescript', languageAlternatives: [ { title: 'Batch file', value: 'batchfile' }, { title: 'C#', value: 'csharp' }, { title: 'CSS', value: 'css' }, { title: 'Go', value: 'golang' }, { title: 'GROQ', value: 'groq' }, { title: 'HTML', value: 'html' }, { title: 'Java', value: 'java' }, { title: 'JavaScript', value: 'javascript' }, { title: 'JSON', value: 'json' }, { title: 'JSX', value: 'jsx' }, { title: 'Markdown', value: 'markdown' }, { title: 'MySQL', value: 'mysql' }, { title: 'PHP', value: 'php' }, { title: 'Plain text', value: 'text' }, { title: 'Python', value: 'python' }, { title: 'Ruby', value: 'ruby' }, { title: 'SASS', value: 'sass' }, { title: 'SCSS', value: 'scss' }, { title: 'sh', value: 'sh' }, { title: 'TSX', value: 'tsx' }, { title: 'TypeScript', value: 'typescript' }, { title: 'XML', value: 'xml' }, { title: 'YAML', value: 'yaml' }, { title: 'GraphQL', value: 'graphql', mode: 'graphqlschema' }, { title: 'Swift', value: 'swift', mode: 'swift' } ] } } export default CodeBlock
PS. How to type the field definition correctly? CodeSchemaType seems wrong there because TS complains about type: 'code',
CodeSchemaType
type: 'code',
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello!
Unfortunately, I can't see the highlightedLines field in the input component in studio but I assume it should be there by default?
Usage
PS. How to type the field definition correctly?
CodeSchemaType
seems wrong there because TS complains abouttype: 'code',
The text was updated successfully, but these errors were encountered: