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

Refactor to upgrade tiptap #103

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ testem.log
# System Files
.DS_Store
Thumbs.db

43 changes: 7 additions & 36 deletions apps/test/src/app/app.js
Original file line number Diff line number Diff line change
@@ -1,47 +1,20 @@
import { ScooterCore } from "@factly/scooter-core";
import React, { useState, useEffect } from "react";
import React from "react";
import { SSE } from "sse";
import axios from "axios";
import { FactCheck } from "@factly/scooter-claim";
import { Image } from "@factly/scooter-image";
import { Embed } from "@factly/scooter-embed";
import { ScooterTable } from "@factly/scooter-table";
import { CodeBlock } from "@factly/scooter-code-block";
import { TagoreAI } from "@factly/scooter-tagore";

import { EditorView as ScooterEditorView } from "@factly/scooter-react";
export function App() {
//<div data-type='embed' class='embed-wrapper'><div style='left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.5%;'><iframe src='https://www.youtube.com/embed/7OO5uGvNZpM?feature=oembed' style='border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;' allowfullscreen='' scrolling='no' allow='encrypted-media; accelerometer; clipboard-write; gyroscope; picture-in-picture'></iframe></div></div><p>hello</p><img src='https://pbs.twimg.com/media/FqAnDvEWAAIXd6l?format=jpg&name=medium' style='background: red;' /><ol class='yo'><li>1.</li><li>hello</li><li>hello</li></ol>
const [value, setValue] = useState(
`
<p></p>
`
// <tagore-component>hello</tagore-component>`
//<table><tbody > <tr class='classsss'> <th>Name</th> <th colspan='3'>Description</th> </tr> <tr> <td>Cyndi Lauper</td> <td>singer</td> <td>songwriter</td> <td>actress</td> </tr></tbody></table> "
);

return (
<>
<h1 className="">Scooter demo</h1>
<ScooterCore
initialValue={value}
<div style={{ width: "80%", margin: "0 auto" }}>
<ScooterEditorView
menuType="bubble"
heightStrategy="flexible"
rows={20}
onChange={data => {
setValue(data.html);
}}
editorInstance={editor => {
const { from, to } = editor.state.selection;
editorInstance={() => {
return;
}}
extensions={[
FactCheck,
Image,
Embed,
ScooterTable,
TagoreAI,
CodeBlock,
]}
extensions={[Embed, TagoreAI]}
meta={{
claims: {
1: { id: 1, claim: "Claim 1", fact: "Fact 1" },
Expand Down Expand Up @@ -248,9 +221,7 @@ export function App() {
// },
// }}
/>

{value.toString()}
</>
</div>
);
}
export default App;
Expand Down
7 changes: 0 additions & 7 deletions libs/scooter-bubble-menu/src/index.js

This file was deleted.

16 changes: 0 additions & 16 deletions libs/scooter-bubble-menu/src/lib/TableColOptions.jsx

This file was deleted.

16 changes: 0 additions & 16 deletions libs/scooter-bubble-menu/src/lib/TableOptions.jsx

This file was deleted.

16 changes: 0 additions & 16 deletions libs/scooter-bubble-menu/src/lib/TableRowOptions.jsx

This file was deleted.

10 changes: 0 additions & 10 deletions libs/scooter-claim/src/FactCheck.js

This file was deleted.

6 changes: 0 additions & 6 deletions libs/scooter-claim/src/index.js

This file was deleted.

23 changes: 0 additions & 23 deletions libs/scooter-claim/src/lib/AddExistingClaim.jsx

This file was deleted.

Loading