Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
a-doc-editor
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ramdayal Munda
a-doc-editor
Commits
a91248d9
Commit
a91248d9
authored
Dec 07, 2023
by
ramdayalmunda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setting up new data
parent
644d57ce
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
19 deletions
+16
-19
a-doc-editor.js
dist/assets/a-doc-editor.js
+0
-0
idea.js
dist/assets/idea.js
+16
-19
No files found.
dist/assets/a-doc-editor.js
View file @
a91248d9
This diff is collapsed.
Click to expand it.
dist/assets/idea.js
View file @
a91248d9
...
...
@@ -14,7 +14,6 @@ var defaultConfig = {
format
:
{
background
:
"#fff"
,
margin
:
20
,
// mm //
canvasMargin
:
20
,
// px //
border
:
""
,
// could be image or anything
},
style
:
{
...
...
@@ -26,6 +25,16 @@ var defaultConfig = {
},
}
var
caretData
=
{
activeData
:
dataSet
[
0
],
// this holds the active data from the dataSet
index
:
0
,
// this holds the caret index of the character in that activeData
interval
:
null
,
// to store the setInterval for the blinking cursor animation
intervalDuration
:
800
,
// ms // to detemine for how long the caret is blinked before reappearing again
blink
:
false
,
// this will keep alternating to to show the caret or not
canvasIndex
:
0
,
// to store index of the canvas which isBeing edited right now.
caretSize
:
config
.
style
.
fontSize
,
}
var
dataType
=
[
"plainText"
,
// plain text, normal text in a pdf or doc text
"list"
,
// items displayed in a list format
...
...
@@ -40,28 +49,16 @@ var dataSet = [
},
{
type
:
1
,
// type 1, denotes it is a list,
item
Type
:
""
,
list
Type
:
""
,
tabNumber
:
0
,
// tab number by default is zero
items
:
[
{
plainText
:
"This is the first item in the list. it can be wrapped around the line if necessary"
},
{
plainText
:
"Second item is here."
},
{
plainText
:
"The list can be nested like this"
,
items
:
[
{
plainText
:
"First nested item is here"
},
{
plainText
:
"This is the second nested item"
}
]
}
]
// this is the second item on the list because the prvious item is also a list and has the same tabNumber
type
:
1
,
// type 1, denotes it is a list,
itemType
:
""
,
tabNumber
:
0
,
// tab number by default is zero
plainText
:
"The second item on the list is here."
},
{
type
:
0
,
// this is just a blank line that is added
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment