File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -263,6 +263,13 @@ UE.plugins["font"] = function () {
263263 }
264264 }
265265
266+ var father = span . parentElement ;
267+ try {
268+ if ( father . style . textIndent && span . style . fontSize !== father . style . fontSize ) {
269+ father . style . fontSize = span . style . fontSize
270+ }
271+ } catch ( error ) {
272+ }
266273 mergeWithParent ( span ) ;
267274 if ( browser . ie && browser . version > 8 ) {
268275 //拷贝父亲们的特别的属性,这里只做背景颜色的处理
Original file line number Diff line number Diff line change @@ -20,7 +20,18 @@ UE.commands["indent"] = {
2020 value = me . queryCommandState ( "indent" )
2121 ? "0em"
2222 : me . options . indentValue || "2em" ;
23- me . execCommand ( "Paragraph" , "p" , { style : "text-indent:" + value } ) ;
23+ // 首行缩进不准确
24+ // https://gitee.com/modstart-lib/ueditor-plus/issues/IAW75Z
25+ var pN = domUtils . filterNodeList (
26+ this . selection . getStartElementPath ( ) ,
27+ "p h1 h2 h3 h4 h5 h6"
28+ )
29+ try {
30+ me . execCommand ( "Paragraph" , "p" , { style : "text-indent:" + value + ';font-size:' + pN . firstChild . style . fontSize } ) ;
31+ } catch ( error ) {
32+ me . execCommand ( "Paragraph" , "p" , { style : "text-indent:" + value } ) ;
33+ }
34+ // me.execCommand("Paragraph", "p", {style: "text-indent:" + value});
2435 } ,
2536 queryCommandState : function ( ) {
2637 var pN = domUtils . filterNodeList (
You can’t perform that action at this time.
0 commit comments