Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
fa2653b6
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
fa2653b6
编写于
8月 01, 2023
作者:
“
“huangdong57”
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
richeditor修改
Signed-off-by:
N
“huangdong57”
<
huangdong57@huawei.com
>
上级
f91eb299
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
258 addition
and
67 deletion
+258
-67
arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/ets/TestAbility/pages/richeditor.ets
...eCompletion/src/main/ets/TestAbility/pages/richeditor.ets
+55
-3
arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/ets/test/richeditor.test.ets
...ent_wholeCompletion/src/main/ets/test/richeditor.test.ets
+203
-64
未找到文件。
arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/ets/TestAbility/pages/richeditor.ets
浏览文件 @
fa2653b6
...
...
@@ -15,11 +15,15 @@
@Entry
@Component
struct RichEditorExample {
@State spanStart: number = -1;
@State spanEnd: number = -1;
@State spanNum: number = -1;
@State text1: string = '';
@State text2: string = '';
@State current: number = 5
@State Richdelete: Boolean = false;
controller1:RichEditorController = new RichEditorController();
RichEditorInsertValue: RichEditorInsertValue = { insertOffset:10, insertValue:"aaaaaa" }
controller: RichEditorController = new RichEditorController()
build() {
Column() {
...
...
@@ -109,24 +113,60 @@ struct RichEditorExample {
Column() {
RichEditor({ controller: this.controller })
.key('Stage_RichEditor_Test_2100')
.key('Stage_RichEditor_Test_2200')
.aboutToIMEInput((RichEditorInsertValue) => {
let InsertValue: RichEditorInsertValue = { insertOffset:10, insertValue:"aaaaaa" }
InsertValue.insertValue.toString()
RichEditorInsertValue.insertValue.toString()
InsertValue.insertOffset.toString()
RichEditorInsertValue.insertOffset.toString()
console.log("wxh test app aboutToIMEInput")
return true
})
.key('Stage_RichEditor_Test_2300')
.onIMEInputComplete((RichEditorTextSpanResult) => {
let TextSpanResult: RichEditorTextSpanResult = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",textStyle:(null),offsetInSpan:[10,100]}
let SpanPosition: RichEditorSpanPosition = { spanIndex:20, spanRange:[20,20]}
SpanPosition.spanRange.toString()
SpanPosition.spanIndex.toString()
TextSpanResult.spanPosition.toString()
RichEditorTextSpanResult.spanPosition.toString()
TextSpanResult.offsetInSpan.toString()
RichEditorTextSpanResult.offsetInSpan.toString()
console.log("wxh test app onIMEInputComplete")
return ({ spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",textStyle:(null),offsetInSpan:[10,100]})
})
.key('Stage_RichEditor_Test_2400')
.aboutToDelete((RichEditorDeleteValue) => {
let DeleteValue: RichEditorDeleteValue = { offset:10,direction:(RichEditorDeleteDirection.BACKWARD),length:10,richEditorDeleteSpans:(null)}
let DeleteValue1: RichEditorDeleteValue = { offset:10,direction:(RichEditorDeleteDirection.FORWARD),length:10,richEditorDeleteSpans:(null)}
DeleteValue.richEditorDeleteSpans.toString()
DeleteValue1.richEditorDeleteSpans.toString()
RichEditorDeleteValue.richEditorDeleteSpans.toString()
console.log("wxh test app aboutToDelete")
return true
})
})
.key('Stage_RichEditor_Test_2600')
.onDeleteComplete(() => {
let DeleteValue: RichEditorDeleteValue = { offset:10,direction:(RichEditorDeleteDirection.BACKWARD),length:10,richEditorDeleteSpans:(null)}
let DeleteValue1: RichEditorDeleteValue = { offset:10,direction:(RichEditorDeleteDirection.FORWARD),length:10,richEditorDeleteSpans:(null)}
let ImageSpanResult: RichEditorImageSpanResult = { spanPosition:{ spanIndex:10, spanRange:[10,10]},valuePixelMap:(null),valueResourceStr:("aaa"),imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.TOP),objectFit:(ImageFit.Auto)},offsetInSpan:[10,100]}
ImageSpanResult.offsetInSpan.toString()
ImageSpanResult.spanPosition.spanIndex.toString()
ImageSpanResult.spanPosition.spanRange.toString()
ImageSpanResult.valuePixelMap.isEditable.valueOf()
ImageSpanResult.valueResourceStr.toString()
ImageSpanResult.imageStyle.size.toString()
ImageSpanResult.imageStyle.verticalAlign.toString()
ImageSpanResult.imageStyle.objectFit.toString()
this.Richdelete = true;
console.log("wxh test app onDeleteComplete")
}).key('Stage_RichEditor_Test_2
1
00')
}).key('Stage_RichEditor_Test_2
7
00')
.onReady(() => {
let TextSpan: RichEditorTextSpan = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",textStyle:{ }}
let ImageSpan: RichEditorImageSpan = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}}
TextSpan.spanPosition.spanRange.toString()
TextSpan.spanPosition.spanIndex.toString()
for (let i = 0; i < 10; i++) {
this.controller.addTextSpan("实例文字", {
offset: 6,
...
...
@@ -139,7 +179,6 @@ struct RichEditorExample {
decoration: { type: TextDecorationType.Underline, color: Color.Red }
}
})
this.controller.addImageSpan($r('app.media.icon'), {
offset: 0,
imageStyle: {
...
...
@@ -148,6 +187,19 @@ struct RichEditorExample {
})
}
})
.key('Stage_RichEditor_Test_2500')
.onSelect((value: RichEditorSelection) => {
let Selection: RichEditorSelection = { selection:[10,10],spans:(null)}
Selection.selection.toString()
Selection.spans.toString()
this.spanStart = value.selection[0]
this.spanEnd = value.selection[1]
this.spanNum = value.spans.length
console.log("mim_log: onSelect selection start: " + value.selection[0])
console.log("mim_log: onSelect selection end: " + value.selection[1])
console.log("mim_log: onSelect spans length: " + value.spans.length);
return { selection:[10,10],spans:(null)}
})
.borderWidth(1).borderColor(Color.Green)
}
...
...
arkui/ace_ets_component_completion/ace_ets_component_wholeCompletion/src/main/ets/test/richeditor.test.ets
浏览文件 @
fa2653b6
...
...
@@ -398,45 +398,45 @@ export default function ActsRichEditorTest() {
console.info('Stage_RichEditor_Test_2100 START');
setTimeout(()=>{
try{
let
InsertValue: RichEditorInsertValue = { insertOffset:10, insertValue:"aaaaaa" }
let
SpanPosition: RichEditorSpanPosition = { spanIndex:10, spanRange:[10,10]}
let
TextSpan: RichEditorTextSpan = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",textStyle:{ }}
let
ImageSpanStyle: RichEditorImageSpanStyle = { size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}
let
TextSpanResult: RichEditorTextSpanResult = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",textStyle:(null),offsetInSpan:[10,100]}
let
ImageSpanStyleResult: RichEditorImageSpanStyleResult = { size:[10,10],verticalAlign:(ImageSpanAlignment.BASELINE),objectFit:(ImageFit.Cover)}
let
ImageSpanResult: RichEditorImageSpanResult = { spanPosition:{ spanIndex:10, spanRange:[10,10]},valuePixelMap:(null),valueResourceStr:("aaa"),imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.TOP),objectFit:(ImageFit.Auto)},offsetInSpan:[10,100]}
let
ImageSpan: RichEditorImageSpan = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}}
let
ImageSpanOptions: RichEditorImageSpanOptions = { offset:10,imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}}
let
ImageSpanStyleOptions: RichEditorUpdateImageSpanStyleOptions = { imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}}
let
Selection: RichEditorSelection = { selection:[10,10],spans:(null)}
let
DeleteValue: RichEditorDeleteValue = { offset:10,direction:(0),length:10,richEditorDeleteSpans:(null)}
let
DeleteValue1: RichEditorDeleteValue = { offset:10,direction:(1),length:10,richEditorDeleteSpans:(null)}
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(
InsertValue))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(
SpanPosition))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(
TextSpan))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(
ImageSpanStyle))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(
TextSpanResult))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(
ImageSpanStyleResult))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(
ImageSpanResult))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(
ImageSpan))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(
ImageSpanOptions))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(
ImageSpanStyleOptions))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(
Selection))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(
DeleteValue))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(
DeleteValue1))
expect(typeof
InsertValue).assertEqual("object")
expect(typeof
SpanPosition).assertEqual("object")
expect(typeof
TextSpan).assertEqual("object")
expect(typeof
ImageSpanStyle).assertEqual("object")
expect(typeof
TextSpanResult).assertEqual("object")
expect(typeof
ImageSpanStyleResult).assertEqual("object")
expect(typeof
ImageSpanResult).assertEqual("object")
expect(typeof
ImageSpan).assertEqual("object")
expect(typeof
ImageSpanOptions).assertEqual("object")
expect(typeof
ImageSpanStyleOptions).assertEqual("object")
expect(typeof
Selection).assertEqual("object")
expect(typeof
DeleteValue).assertEqual("object")
expect(typeof
DeleteValue1).assertEqual("object")
let RichEditor
InsertValue: RichEditorInsertValue = { insertOffset:10, insertValue:"aaaaaa" }
let RichEditor
SpanPosition: RichEditorSpanPosition = { spanIndex:10, spanRange:[10,10]}
let RichEditor
TextSpan: RichEditorTextSpan = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",textStyle:{ }}
let RichEditor
ImageSpanStyle: RichEditorImageSpanStyle = { size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}
let RichEditor
TextSpanResult: RichEditorTextSpanResult = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",textStyle:(null),offsetInSpan:[10,100]}
let RichEditor
ImageSpanStyleResult: RichEditorImageSpanStyleResult = { size:[10,10],verticalAlign:(ImageSpanAlignment.BASELINE),objectFit:(ImageFit.Cover)}
let RichEditor
ImageSpanResult: RichEditorImageSpanResult = { spanPosition:{ spanIndex:10, spanRange:[10,10]},valuePixelMap:(null),valueResourceStr:("aaa"),imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.TOP),objectFit:(ImageFit.Auto)},offsetInSpan:[10,100]}
let RichEditor
ImageSpan: RichEditorImageSpan = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}}
let RichEditor
ImageSpanOptions: RichEditorImageSpanOptions = { offset:10,imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}}
let RichEditorUpdate
ImageSpanStyleOptions: RichEditorUpdateImageSpanStyleOptions = { imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}}
let RichEditor
Selection: RichEditorSelection = { selection:[10,10],spans:(null)}
let RichEditor
DeleteValue: RichEditorDeleteValue = { offset:10,direction:(0),length:10,richEditorDeleteSpans:(null)}
let RichEditor
DeleteValue1: RichEditorDeleteValue = { offset:10,direction:(1),length:10,richEditorDeleteSpans:(null)}
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditor
InsertValue))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditor
SpanPosition))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditor
TextSpan))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditor
ImageSpanStyle))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditor
TextSpanResult))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditor
ImageSpanStyleResult))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditor
ImageSpanResult))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditor
ImageSpan))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditor
ImageSpanOptions))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditorUpdate
ImageSpanStyleOptions))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditor
Selection))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditor
DeleteValue))
console.info("Stage_RichEditor_Test_2100 InsertValue is: " + JSON.stringify(RichEditor
DeleteValue1))
expect(typeof RichEditor
InsertValue).assertEqual("object")
expect(typeof RichEditor
SpanPosition).assertEqual("object")
expect(typeof RichEditor
TextSpan).assertEqual("object")
expect(typeof RichEditor
ImageSpanStyle).assertEqual("object")
expect(typeof RichEditor
TextSpanResult).assertEqual("object")
expect(typeof RichEditor
ImageSpanStyleResult).assertEqual("object")
expect(typeof RichEditor
ImageSpanResult).assertEqual("object")
expect(typeof RichEditor
ImageSpan).assertEqual("object")
expect(typeof RichEditor
ImageSpanOptions).assertEqual("object")
expect(typeof RichEditorUpdate
ImageSpanStyleOptions).assertEqual("object")
expect(typeof RichEditor
Selection).assertEqual("object")
expect(typeof RichEditor
DeleteValue).assertEqual("object")
expect(typeof RichEditor
DeleteValue1).assertEqual("object")
console.info('Stage_RichEditor_Test_2100 END ');
} catch(err) {
...
...
@@ -447,6 +447,145 @@ export default function ActsRichEditorTest() {
},500)
});
it('Stage_RichEditor_Test_2200', 0, async function (done) {
console.info('Stage_RichEditor_Test_2200 START');
setTimeout(()=>{
try{
let RichEditorInsertValue: RichEditorInsertValue = { insertOffset:10, insertValue:"aaaaaa" }
console.info("Stage_RichEditor_Test_2200 InsertValue is: " + JSON.stringify(RichEditorInsertValue))
expect(typeof RichEditorInsertValue).assertEqual("object")
expect(RichEditorInsertValue.insertOffset).assertEqual(10)
expect(RichEditorInsertValue.insertValue).assertEqual("aaaaaa")
console.info('Stage_RichEditor_Test_2200 END ');
} catch(err) {
expect().assertFail()
console.info('Stage_RichEditor_Test_2200 ERR '+ JSON.stringify(err));
}
done();
},500)
});
it('Stage_RichEditor_Test_2300', 0, async function (done) {
console.info('Stage_RichEditor_Test_2300 START');
setTimeout(()=>{
try{
let RichEditorTextSpanResult: RichEditorTextSpanResult = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",textStyle:(null),offsetInSpan:[10,100]}
let RichEditorSpanPosition: RichEditorSpanPosition = { spanIndex:20, spanRange:[20,20]}
console.info("Stage_RichEditor_Test_2300 InsertValue is: " + JSON.stringify(RichEditorTextSpanResult))
console.info("Stage_RichEditor_Test_2300 InsertValue is: " + JSON.stringify(RichEditorSpanPosition))
expect(typeof RichEditorTextSpanResult).assertEqual("object")
expect(typeof RichEditorSpanPosition).assertEqual("object")
expect(RichEditorTextSpanResult.spanPosition.spanIndex).assertEqual(10)
expect(RichEditorTextSpanResult.spanPosition.spanRange[0]).assertEqual(10)
expect(RichEditorTextSpanResult.spanPosition.spanRange[1]).assertEqual(10)
expect(RichEditorSpanPosition.spanIndex).assertEqual(20)
expect(RichEditorSpanPosition.spanRange[0]).assertEqual(20)
expect(RichEditorSpanPosition.spanRange[1]).assertEqual(20)
expect(RichEditorTextSpanResult.offsetInSpan[0]).assertEqual(10)
expect(RichEditorTextSpanResult.offsetInSpan[1]).assertEqual(100)
console.info('Stage_RichEditor_Test_2300 END ');
} catch(err) {
expect().assertFail()
console.info('Stage_RichEditor_Test_2300 ERR '+ JSON.stringify(err));
}
done();
},500)
});
it('Stage_RichEditor_Test_2400', 0, async function (done) {
console.info('Stage_RichEditor_Test_2400 START');
setTimeout(()=>{
try{
let RichEditorDeleteValue: RichEditorDeleteValue = { offset:10,direction:(0),length:10,richEditorDeleteSpans:(null)}
let RichEditorDeleteValue1: RichEditorDeleteValue = { offset:10,direction:(1),length:10,richEditorDeleteSpans:(null)}
console.info("Stage_RichEditor_Test_2400 InsertValue is: " + JSON.stringify(RichEditorDeleteValue))
console.info("Stage_RichEditor_Test_2400 InsertValue is: " + JSON.stringify(RichEditorDeleteValue1))
expect(typeof RichEditorDeleteValue).assertEqual("object")
expect(typeof RichEditorDeleteValue1).assertEqual("object")
expect(RichEditorDeleteValue.richEditorDeleteSpans).assertEqual(null)
expect(RichEditorDeleteValue1.richEditorDeleteSpans).assertEqual(null)
console.info('Stage_RichEditor_Test_2400 END ');
} catch(err) {
expect().assertFail()
console.info('Stage_RichEditor_Test_2400 ERR '+ JSON.stringify(err));
}
done();
},500)
});
it('Stage_RichEditor_Test_2500', 0, async function (done) {
console.info('Stage_RichEditor_Test_2500 START');
setTimeout(()=>{
try{
let RichEditorSelection: RichEditorSelection = { selection:[10,10],spans:(null)}
console.info("Stage_RichEditor_Test_2500 InsertValue is: " + JSON.stringify(RichEditorSelection))
expect(typeof RichEditorSelection).assertEqual("object")
expect(RichEditorSelection.selection[0]).assertEqual(10)
expect(RichEditorSelection.selection[1]).assertEqual(10)
expect(RichEditorSelection.spans).assertEqual(null)
console.info('Stage_RichEditor_Test_2500 END ');
} catch(err) {
expect().assertFail()
console.info('Stage_RichEditor_Test_2500 ERR '+ JSON.stringify(err));
}
done();
},500)
});
it('Stage_RichEditor_Test_2600', 0, async function (done) {
console.info('Stage_RichEditor_Test_2600 START');
setTimeout(()=>{
try{
let RichEditorImageSpanResult: RichEditorImageSpanResult = { spanPosition:{ spanIndex:10, spanRange:[10,10]},valuePixelMap:(null),valueResourceStr:("aaa"),imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.TOP),objectFit:(ImageFit.Auto)},offsetInSpan:[10,100]}
console.info("Stage_RichEditor_Test_2600 InsertValue is: " + JSON.stringify(RichEditorImageSpanResult))
expect(typeof RichEditorImageSpanResult).assertEqual("object")
expect(RichEditorImageSpanResult.spanPosition.spanRange[0]).assertEqual(10)
expect(RichEditorImageSpanResult.spanPosition.spanRange[1]).assertEqual(10)
expect(RichEditorImageSpanResult.spanPosition.spanIndex).assertEqual(10)
expect(RichEditorImageSpanResult.valuePixelMap).assertEqual(null)
expect(RichEditorImageSpanResult.valueResourceStr).assertEqual("aaa")
expect(RichEditorImageSpanResult.imageStyle.size[0]).assertEqual(10)
expect(RichEditorImageSpanResult.imageStyle.size[1]).assertEqual(10)
expect(RichEditorImageSpanResult.imageStyle.verticalAlign).assertEqual(ImageSpanAlignment.TOP)
expect(RichEditorImageSpanResult.imageStyle.objectFit).assertEqual(ImageFit.Auto)
expect(RichEditorImageSpanResult.offsetInSpan[0]).assertEqual(10)
expect(RichEditorImageSpanResult.offsetInSpan[1]).assertEqual(100)
console.info('Stage_RichEditor_Test_2600 END ');
} catch(err) {
expect().assertFail()
console.info('Stage_RichEditor_Test_2600 ERR '+ JSON.stringify(err));
}
done();
},500)
});
it('Stage_RichEditor_Test_2700', 0, async function (done) {
console.info('Stage_RichEditor_Test_2700 START');
setTimeout(()=>{
try{
let RichEditorTextSpan: RichEditorTextSpan = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",textStyle:{ }}
let RichEditorImageSpan: RichEditorImageSpan = { spanPosition:{ spanIndex:10, spanRange:[10,10]},value:"aaaaa",imageStyle:{ size:[10,10],verticalAlign:(ImageSpanAlignment.CENTER),objectFit:(ImageFit.Contain)}}
console.info("Stage_RichEditor_Test_2700 InsertValue is: " + JSON.stringify(RichEditorTextSpan))
console.info("Stage_RichEditor_Test_2700 InsertValue is: " + JSON.stringify(RichEditorImageSpan))
expect(typeof RichEditorTextSpan).assertEqual("object")
expect(typeof RichEditorImageSpan).assertEqual("object")
expect(RichEditorTextSpan.spanPosition.spanIndex).assertEqual(10)
expect(RichEditorTextSpan.spanPosition.spanRange[0]).assertEqual(10)
expect(RichEditorTextSpan.spanPosition.spanRange[1]).assertEqual(10)
expect(RichEditorImageSpan.spanPosition.spanIndex).assertEqual(10)
expect(RichEditorImageSpan.spanPosition.spanRange[0]).assertEqual(10)
expect(RichEditorImageSpan.spanPosition.spanRange[1]).assertEqual(10)
console.info('Stage_RichEditor_Test_2700 END ');
} catch(err) {
expect().assertFail()
console.info('Stage_RichEditor_Test_2700 ERR '+ JSON.stringify(err));
}
done();
},500)
});
})
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录