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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
21 deletions
+18
-21
a-doc-editor.js
dist/assets/a-doc-editor.js
+0
-0
idea.js
dist/assets/idea.js
+18
-21
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 = {
...
@@ -14,7 +14,6 @@ var defaultConfig = {
format
:
{
format
:
{
background
:
"#fff"
,
background
:
"#fff"
,
margin
:
20
,
// mm //
margin
:
20
,
// mm //
canvasMargin
:
20
,
// px //
border
:
""
,
// could be image or anything
border
:
""
,
// could be image or anything
},
},
style
:
{
style
:
{
...
@@ -26,6 +25,16 @@ var defaultConfig = {
...
@@ -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
=
[
var
dataType
=
[
"plainText"
,
// plain text, normal text in a pdf or doc text
"plainText"
,
// plain text, normal text in a pdf or doc text
"list"
,
// items displayed in a list format
"list"
,
// items displayed in a list format
...
@@ -40,28 +49,16 @@ var dataSet = [
...
@@ -40,28 +49,16 @@ var dataSet = [
},
},
{
{
type
:
1
,
// type 1, denotes it is a list,
type
:
1
,
// type 1, denotes it is a list,
listType
:
""
,
tabNumber
:
0
,
// tab number by default is zero
plainText
:
"This is the first item in the list. it can be wrapped around the line if necessary"
},
{
// 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
:
""
,
itemType
:
""
,
tabNumber
:
0
,
// tab number by default is zero
tabNumber
:
0
,
// tab number by default is zero
items
:
[
plainText
:
"The second item on the list is here."
{
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"
}
]
}
]
},
},
{
{
type
:
0
,
// this is just a blank line that is added
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