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
beb1dba0
Commit
beb1dba0
authored
7 years ago
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug with paste paragraph with line_height from html(ms word)
parent
69bf28fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
common/wordcopypaste.js
common/wordcopypaste.js
+16
-3
No files found.
common/wordcopypaste.js
View file @
beb1dba0
...
...
@@ -4717,9 +4717,22 @@ PasteProcessor.prototype =
var
margin_bottom
=
computedStyle
.
getPropertyValue
(
"
margin-bottom
"
);
if
(
margin_bottom
&&
null
!=
(
margin_bottom
=
this
.
_ValueToMm
(
margin_bottom
))
&&
margin_bottom
>=
0
)
Spacing
.
After
=
margin_bottom
;
var
line_height
=
computedStyle
.
getPropertyValue
(
"
line-height
"
);
if
(
line_height
&&
null
!=
(
line_height
=
this
.
_ValueToMm
(
line_height
))
&&
line_height
>=
0
)
Spacing
.
After
=
line_height
;
//line height
//computedStyle возвращает значение в px. мне нужны %(ms записывает именно % в html)
var
line_height
=
node
.
style
&&
node
.
style
.
lineHeight
?
node
.
style
.
lineHeight
:
computedStyle
.
getPropertyValue
(
"
line-height
"
);
if
(
line_height
)
{
var
oLineHeight
=
this
.
_ValueToMmType
(
line_height
);
if
(
oLineHeight
&&
"
%
"
===
oLineHeight
.
type
)
{
Spacing
.
Line
=
oLineHeight
.
val
;
}
else
if
(
line_height
&&
null
!=
(
line_height
=
this
.
_ValueToMm
(
line_height
))
&&
line_height
>=
0
)
{
Spacing
.
Line
=
line_height
;
Spacing
.
LineRule
=
Asc
.
linerule_Exact
;
}
}
if
(
false
==
this
.
_isEmptyProperty
(
Spacing
))
Para
.
Set_Spacing
(
Spacing
);
//Shd
...
...
This diff is collapsed.
Click to expand it.
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