Skip to content
New issue

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

Add CodeMirror 6 field #13

Merged
merged 7 commits into from
Mar 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/is-dist-up-to-date.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
Verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: install
run: npm ci || npm install
- run: npm run ${{ env.SCRIPT_NAME }}
- name: verify that distribution/index.js is up to date
- name: verify that built files are up to date
run: git diff --exit-code
1 change: 1 addition & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ textarea,
border: solid 3px silver;
border-radius: 4px;
min-height: 100px;
background: white;
}
field textarea {
font: inherit;
Expand Down
114 changes: 0 additions & 114 deletions test/csp.md

This file was deleted.

26 changes: 23 additions & 3 deletions test/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ title: Testing GhostText 👻

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.32.0/codemirror.min.css" />
<style>

#monaco-field,
.CodeMirror {
height: 120px;
Expand Down Expand Up @@ -42,12 +41,33 @@ title: Testing GhostText 👻

<div contenteditable class="field">This is a <em>contenteditable</em> div</div>

## CodeMirror
## CodeMirror 6

<div id="codemirror-6-field" class="field"></div>

<script type="importmap">
{
"imports": {
"codemirror/": "https://deno.land/x/[email protected]/esm/"
}
}
</script>
<script async type="module">
import { basicSetup, EditorView } from "https://deno.land/x/[email protected]/esm/codemirror/dist/index.js"

new EditorView({
doc: "This is a CodeMirror 6 field\n\n\n\n\n",
extensions: [basicSetup],
parent: document.querySelector('#codemirror-6-field'),
})
</script>

## CodeMirror 5

<!-- prettier-ignore-start -->

<textarea id="codemirror-field" class="field">
This is a CodeMirror field
This is a CodeMirror 5 field



Expand Down
5 changes: 5 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"github": {
"silent": true
}
}