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
6c92f472
Commit
6c92f472
authored
Dec 01, 2023
by
ramdayalmunda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caret display when blur
parent
3390b13d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
a-doc-editor.css
dist/assets/a-doc-editor.css
+3
-1
a-doc-editor.js
dist/assets/a-doc-editor.js
+6
-4
No files found.
dist/assets/a-doc-editor.css
View file @
6c92f472
...
...
@@ -6,6 +6,7 @@
.a-doc-editor
canvas
:focus-visible
{
/* outline: auto rgb(0, 68, 255, 50%); */
outline
:
none
;
background
:
#fff
;
}
...
...
@@ -52,6 +53,7 @@
.a-doc-editor
.body
.right-sidebar
{
position
:
absolute
;
padding
:
8px
;
height
:
100%
;
right
:
0
;
width
:
17%
;
...
...
@@ -61,7 +63,7 @@
}
.a-doc-editor
.body
.right-sidebar.hide
{
right
:
-1
4
%
;
right
:
-1
6
%
;
transition
:
300ms
;
}
...
...
dist/assets/a-doc-editor.js
View file @
6c92f472
...
...
@@ -86,14 +86,16 @@ var ADocEditor = function (customConfig) {
<div class="scrolling-area" id="
${
scrollingAreaId
}
"></div>
<div class="left-sidebar hide" id="
${
leftSidebarId
}
">
<div class="toggle-sidebar">
<span></span>
<span>Summary</span>
<span>
X
</span>
<span>
⇆
</span>
</div>
</div>
<div class="right-sidebar hide" id="
${
rightSidebarId
}
">
<div class="toggle-sidebar">
<span>
X
</span>
<span>
⇆
</span>
<span>Comments</span>
<span></span>
</div>
</div>
</div>
...
...
@@ -223,7 +225,7 @@ var ADocEditor = function (customConfig) {
return
true
}
if
(
!
caretData
.
blink
&&
focusedCanvas
&&
caretData
.
activeData
)
renderCaret
()
if
(
!
caretData
.
blink
&&
caretData
.
activeData
)
renderCaret
()
// to render caret
function
renderCaret
()
{
let
ctx
=
canvasList
[
caretData
.
canvasIndex
].
getContext
(
'2d'
,
{
willReadFrequently
:
true
})
...
...
@@ -273,7 +275,7 @@ var ADocEditor = function (customConfig) {
}
function
onBlurHandler
(
e
)
{
focusedCanvas
=
null
caretData
.
blink
=
tru
e
caretData
.
blink
=
fals
e
reRenderPages
(
dataSet
)
clearInterval
(
caretData
.
interval
)
}
...
...
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