-
Notifications
You must be signed in to change notification settings - Fork 0
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
Bilal/list support #13
Open
Billalkhn
wants to merge
23
commits into
develop
Choose a base branch
from
bilal/ListSupport
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 15 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
6f5c21a
listing icons added
Billalkhn 94ac40d
number and bullet listing added
Billalkhn 7012291
serialization added
Billalkhn 0604666
ordered children issue resolved
Billalkhn b54054e
serialization complete
Billalkhn e49c9ef
fix serialize list item
Hamzaalam a6b4a43
fetched nested array
Billalkhn 53085ac
list item serialization
Hamzaalam 8509891
fix
Hamzaalam 7edf00d
serialize general lisitng function added
Billalkhn 2b5b6bb
deserialize formatting
Billalkhn cc7fc42
deserialized properties(bold,itlaic etc) logic implementation
Billalkhn a5a2b5c
issue resolved _id
Billalkhn a73017f
issue resolved list block id
Billalkhn 4fad5f4
deserialization completed
Billalkhn f97ab2d
Minor changes
Billalkhn 5454ab6
build issue resolved
Billalkhn 4d7812c
build issue resolved
Billalkhn 4a2e2ad
Changes Updated
Billalkhn da7795d
v1.1.1
Hamzaalam 2799fe0
Merge branch 'develop' into bilal/ListSupport
Billalkhn 55081b6
Merge branch 'develop' into bilal/ListSupport
Hamzaalam 62fc86f
resolved merging issues
Hamzaalam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[1130/192337.441:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,141 @@ | ||
import React, { useState } from 'react' | ||
import { Editor } from "editor"; | ||
import React, { useState } from 'react'; | ||
import { Editor } from 'editor'; | ||
|
||
const App = () => { | ||
const [document, setDocument] = useState<any>(blockInitalValue); | ||
const setContent = (content: any) => { | ||
setDocument(content); | ||
}; | ||
console.log(document); | ||
setDocument(content); | ||
}; | ||
console.log(document); | ||
return ( | ||
<> | ||
<Editor data={blockInitalValue} setContent={setContent} readOnly={false} /> | ||
|
||
</> | ||
) | ||
} | ||
|
||
</> | ||
); | ||
}; | ||
|
||
const blockInitalValue = [ | ||
|
||
{ | ||
block: { | ||
_id: "1", | ||
type: "heading-one", | ||
properties: { | ||
document: [ | ||
{ | ||
text: " Heading One", | ||
properties: [] | ||
} | ||
] | ||
} | ||
} | ||
_id: '0', | ||
type: 'heading-one', | ||
properties: { | ||
document: [ | ||
{ | ||
text: ' Heading One', | ||
properties: [], | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
{ | ||
block: { | ||
_id: "2", | ||
type: "heading-two", | ||
properties: { | ||
document: [ | ||
{ | ||
text: " Heading Two", | ||
properties: [] | ||
} | ||
] | ||
} | ||
} | ||
_id: '1', | ||
type: 'heading-two', | ||
properties: { | ||
document: [ | ||
{ | ||
text: ' Heading Two', | ||
properties: [], | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
{ | ||
block: { | ||
_id: "3", | ||
type: "block-quote", | ||
properties: { | ||
document: [ | ||
{ | ||
text: "What Goes Around Comes Around", | ||
properties: [] | ||
} | ||
] | ||
} | ||
} | ||
_id: '2', | ||
type: 'block-quote', | ||
properties: { | ||
document: [ | ||
{ | ||
text: 'What Goes Around Comes Around', | ||
properties: [], | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
{ | ||
block: { | ||
_id: "4", | ||
type: "text", | ||
_id: '3', | ||
type: 'text', | ||
properties: { | ||
document: [ | ||
{text: " This is editable, ", properties: []}, | ||
{text: "rich ", properties: ['b']}, | ||
{text: "text", properties: ['b', 'u']}, | ||
{text: ", much ", properties: ['b', 'i']}, | ||
{text: "better than a", properties: []}, | ||
{text: "Hello World", properties: ['code']}, | ||
] | ||
} | ||
} | ||
} | ||
{ text: ' This is editable, ', properties: [] }, | ||
{ text: 'rich ', properties: ['b'] }, | ||
{ text: 'text', properties: ['b', 'u'] }, | ||
{ text: ', much ', properties: ['b', 'i'] }, | ||
{ text: 'better than a', properties: [] }, | ||
{ text: 'Hello World', properties: ['code'] }, | ||
], | ||
}, | ||
}, | ||
}, | ||
{ | ||
block: { | ||
_id: '4', | ||
type: 'numbered-list', | ||
children: [ | ||
{ | ||
block: { | ||
_id: '1', | ||
type: 'list-item', | ||
properties: { | ||
document: [ | ||
{ text: 'This is editable, ', properties: [] }, | ||
{ text: 'rich ', properties: ['b'] }, | ||
{ text: 'text', properties: ['b', 'u'] }, | ||
{ text: ', much ', properties: ['b', 'i'] }, | ||
{ text: 'better than a', properties: [] }, | ||
{ text: 'Hello World', properties: ['code'] }, | ||
], | ||
}, | ||
}, | ||
}, | ||
{ | ||
block: { | ||
_id: '2', | ||
type: 'list-item', | ||
properties: { | ||
document: [ | ||
{ text: 'This is editable, ', properties: [] }, | ||
{ text: 'rich ', properties: ['b'] }, | ||
{ text: 'text', properties: ['b', 'u'] }, | ||
{ text: ', much ', properties: ['b', 'i'] }, | ||
{ text: 'better than a', properties: [] }, | ||
{ text: 'Hello World', properties: ['code'] }, | ||
], | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
block: { | ||
_id: '5', | ||
type: 'bulleted-list', | ||
children: [ | ||
{ | ||
block: { | ||
_id: '4', | ||
type: 'list-item', | ||
properties: { | ||
document: [ | ||
{ text: 'This is editable, ', properties: [] }, | ||
{ text: 'rich ', properties: ['b'] }, | ||
{ text: 'text', properties: ['b', 'u'] }, | ||
{ text: ', much ', properties: ['b', 'i'] }, | ||
{ text: 'better than a', properties: [] }, | ||
{ text: 'Hello World', properties: ['code'] }, | ||
], | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
]; | ||
export default App | ||
export default App; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be removed.