[add] window/logMessage
This commit is contained in:
parent
7369f33b5e
commit
ab88b9139e
7 changed files with 62 additions and 9 deletions
|
|
@ -34,7 +34,7 @@
|
|||
<div class="col-2">
|
||||
something
|
||||
</div>
|
||||
<div class="col flex-grow-1" style="background-color:gainsboro">
|
||||
<div class="col flex-grow-1" >
|
||||
<div class="row" >
|
||||
<div >
|
||||
<label for="file">File:</label><input id="iFile" type="url" value="file:///some/file.xml" />
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
<script src="./lsp.bundle.js"></script>
|
||||
<script>
|
||||
|
||||
let doc = `<foo at=42><bar>test</bar></foo>`;
|
||||
let doc = `3+1`;
|
||||
// Load saved content from localStorage when the page loads
|
||||
window.addEventListener('load', () => {
|
||||
const savedText = localStorage.getItem('code');
|
||||
|
|
@ -90,6 +90,7 @@
|
|||
lsp.simpleWebSocketTransport(server)
|
||||
.then(transport => {
|
||||
let link = lsp.lsp(transport, file);
|
||||
const doc=view.state.doc.toString();
|
||||
const state = lsp.createEditorState(doc, [...lsp.baseExts, link]);
|
||||
view.setState(state);
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue