yuzai / base-editor Goto Github PK
View Code? Open in Web Editor NEWwebide based monaco-editor
Home Page: https://blog.maxiaobo.com.cn/base-editor/build/index.html
License: MIT License
webide based monaco-editor
Home Page: https://blog.maxiaobo.com.cn/base-editor/build/index.html
License: MIT License
function App() {
const defaultFiles = {
'/src/app.jsx': `
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
(async () => {
const {Button} = await import('./Button.jsx');
const root = document.getElementById('root');
ReactDOM.render((
const App = () => {
console.log(add(1, 2));
};
export default App;
, '/src/@index/cc.ts':
export function add(a, b) {
return a + b;
}
export function minus(a, b) {
return a - b;
}
`
}
return (
<div style={{ width: '800px', height: '600px' }}>
<MultiEditor
defaultFiles={defaultFiles}
options={{
fontSize: 14,
automaticLayout: true,
}} />
</div>
)
}
export default App;
Scenario:
File1.js -
<line:10> export const isOdd(n: number) : boolean {
return n%2 ===1;
}
File2.js -
<line:1> export {isOdd} from ./File1.js;
<line:2> const repsonse = isOdd(5);
Current behavior - Clicking on line:2 in File2.js takes us to line 1 in the same file i.e. File2.js
Expected/Right behavior - Clicking on line:2 in File2.js leads us to File1.js line:10. This is identical to the Visual Studio editor or any online multi-file editor, such as codesandbox, stackblitz, etc.
We are planning to use your repo in our organization code so can you please fix this asap?
Many thanks in advance!!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.