Skip to content

Commit

Permalink
refactor: rewrite editor with vanilla js (#136)
Browse files Browse the repository at this point in the history
* refactor: rewrite editor with vanilla js

* chore: delete editor vue file

* chore: add new line and rename editor file

* fix: editor for new page not opening on `?newWiki`

* fix: searchParams not updating while switching editor from `?newWiki` or `?editWiki`
  • Loading branch information
BreadGenie authored Apr 10, 2023
1 parent 635ea3c commit ec39f14
Show file tree
Hide file tree
Showing 27 changed files with 735 additions and 932 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ wiki/public/node_modules
.cypress-coverage
cypress/screenshots
cypress/videos
__pycache__/
2 changes: 1 addition & 1 deletion cypress/e2e/wiki.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ context("Wiki", () => {
it("creates a new wiki page", () => {
cy.get(".edit-wiki-btn .icon").click();
cy.get(".doc-sidebar .sidebar-group:first-child .add-sidebar-page").click();
cy.get(".new-wiki-editor .ProseMirror")
cy.get(".wiki-editor .ProseMirror")
.clear()
.type("Test Wiki Page{enter}New Wiki Page");
cy.get('.btn:contains("Save"):visible').click();
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/wiki_sidebar.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ context("Wiki Sidebar", () => {
cy.contains("Submit").click();

cy.get(".doc-sidebar .sidebar-group:last-child .add-sidebar-page").click();
cy.get(".new-wiki-editor .ProseMirror")
cy.get(".wiki-editor .ProseMirror")
.clear()
.type("Test Wiki Page{enter}New Wiki Page");
cy.get('.btn:contains("Save"):visible').click();
Expand Down
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
"@cypress/code-coverage": "^3",
"@testing-library/cypress": "^8",
"@testing-library/dom": "8.17.1",
"@tiptap/extension-code-block-lowlight": "^2.0.0-beta.220",
"@tiptap/extension-document": "^2.0.0-beta.218",
"@tiptap/extension-image": "^2.0.0-beta.218",
"@tiptap/extension-link": "^2.0.0-beta.218",
"@tiptap/extension-placeholder": "^2.0.0-beta.218",
"@tiptap/extension-table": "^2.0.0-beta.218",
"@tiptap/extension-table-cell": "^2.0.0-beta.218",
"@tiptap/extension-table-header": "^2.0.0-beta.218",
"@tiptap/extension-table-row": "^2.0.0-beta.218",
"@tiptap/extension-text-align": "^2.0.0-beta.218",
"@tiptap/pm": "^2.0.0-beta.218",
"@tiptap/starter-kit": "^2.0.0-beta.218",
"@tiptap/vue-3": "^2.0.0-beta.218",
"@tiptap/core": "^2.0.2",
"@tiptap/extension-code-block": "^2.0.2",
"@tiptap/extension-code-block-lowlight": "^2.0.2",
"@tiptap/extension-document": "^2.0.2",
"@tiptap/extension-image": "^2.0.2",
"@tiptap/extension-link": "^2.0.2",
"@tiptap/extension-placeholder": "^2.0.2",
"@tiptap/extension-table": "^2.0.2",
"@tiptap/extension-table-cell": "^2.0.2",
"@tiptap/extension-table-header": "^2.0.2",
"@tiptap/extension-table-row": "^2.0.2",
"@tiptap/extension-text-align": "^2.0.2",
"@tiptap/pm": "^2.0.2",
"@tiptap/starter-kit": "^2.0.2",
"cypress-real-events": "^1.7.6",
"lowlight": "^2.8.1",
"vue": "^3.2.47"
"lowlight": "^2.8.1"
},
"devDependencies": {
"cypress": "11"
Expand Down
Loading

0 comments on commit ec39f14

Please sign in to comment.