Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
77f59a2a
Commit
77f59a2a
authored
Jul 28, 2017
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug #35298
parent
33f39927
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
word/Editor/Run.js
word/Editor/Run.js
+32
-0
No files found.
word/Editor/Run.js
View file @
77f59a2a
...
@@ -427,6 +427,38 @@ ParaRun.prototype.Add = function(Item, bMath)
...
@@ -427,6 +427,38 @@ ParaRun.prototype.Add = function(Item, bMath)
return
;
return
;
}
}
}
}
// Специальный код с обработкой выделения (highlight)
// Текст, который пишем до или после выделенного текста делаем без выделения.
if
(
!
this
.
Is_Empty
()
&&
(
0
===
this
.
State
.
ContentPos
||
this
.
Content
.
length
===
this
.
State
.
ContentPos
)
&&
highlight_None
!==
this
.
Get_CompiledPr
(
false
).
HighLight
)
{
var
Parent
=
this
.
Get_Parent
();
var
RunPos
=
this
.
private_GetPosInParent
(
Parent
);
if
(
null
!==
Parent
&&
-
1
!==
RunPos
)
{
if
((
0
===
this
.
State
.
ContentPos
&&
(
0
===
RunPos
||
Parent
.
Content
[
RunPos
-
1
].
Type
!==
para_Run
||
highlight_None
===
Parent
.
Content
[
RunPos
-
1
].
Get_CompiledPr
(
false
).
HighLight
))
||
(
this
.
Content
.
length
===
this
.
State
.
ContentPos
&&
(
RunPos
===
Parent
.
Content
.
length
-
1
||
para_Run
!==
Parent
.
Content
[
RunPos
+
1
].
Type
||
highlight_None
===
Parent
.
Content
[
RunPos
+
1
].
Get_CompiledPr
(
false
).
HighLight
)
||
(
RunPos
===
Parent
.
Content
.
length
-
2
&&
Parent
instanceof
Paragraph
)))
{
var
NewRun
=
this
.
private_SplitRunInCurPos
();
if
(
NewRun
)
{
NewRun
.
Set_HighLight
(
highlight_None
);
NewRun
.
MoveCursorToStartPos
();
NewRun
.
Add
(
Item
,
bMath
);
NewRun
.
Make_ThisElementCurrent
();
return
;
}
}
}
}
}
}
var
TrackRevisions
=
false
;
var
TrackRevisions
=
false
;
...
...
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