Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GeliBusinessPlatform
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ljy
GeliBusinessPlatform
Commits
6448b431
Commit
6448b431
authored
May 25, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
已完成富文本编辑器
parent
c7c6e7fe
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
15 deletions
+47
-15
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Other/LMNote/LMNoteViewController.m
GeliBusinessPlatform/Other/LMNote/LMNoteViewController.m
+45
-14
GeliBusinessPlatform/Other/LMNote/OtherViews/LMNImageView.m
GeliBusinessPlatform/Other/LMNote/OtherViews/LMNImageView.m
+1
-1
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
...orm/ViewController/商品详情/ProductDetailViewController.swift
+1
-0
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
6448b431
No preview for this file type
GeliBusinessPlatform/Other/LMNote/LMNoteViewController.m
View file @
6448b431
...
...
@@ -120,9 +120,11 @@
self
.
navigationItem
.
leftBarButtonItem
=
[[
UIBarButtonItem
alloc
]
initWithCustomView
:
containerView
];
NSString
*
content
=
[
self
getStingByData
:
_htmlStr
];
self
.
textView
.
text
=
content
;
[
self
.
textView
updateExclusionPaths
];
// self.textView.text = @"ugh\nCccc\nThe new kJt";
// [self.textView updateExclusionPaths];
// [self.textView insertImage:[UIImage imageNamed:@"banner"] atIndex:4];
// [self.textView insertImage:[UIImage imageNamed:@"banner"] atIndex:9];
}
-
(
void
)
setHtmlStr
:(
NSString
*
)
htmlStr
{
...
...
@@ -130,15 +132,12 @@
}
-
(
void
)
outVC
{
NSLog
(
@"outvc====outvc"
);
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
// [self.navigationController popViewControllerAnimated:YES];
// [self.textView insertImage:[UIImage imageNamed:@"lmn_tool_image"] atIndex:self.cursorIndex];
//
// [self.textView
.imgArr addObject:url
];
//
imageView.imageUrl = url
;
//
self.textView.text = @"ugh\nCccc\nThe new kJt";
// [self.textView
updateExclusionPaths
];
//
[self.textView insertImage:[UIImage imageNamed:@"banner"] atIndex:4]
;
// [self.textView insertImage:[UIImage imageNamed:@"banner"] atIndex:9];
}
-
(
void
)
layoutTextView
{
...
...
@@ -180,6 +179,25 @@
rect
.
size
.
height
=
44
.
f
;
rect
;
});
//展示旧数据
if
(
_htmlStr
.
length
>
0
)
{
NSString
*
content
=
[
self
getStingByData
:
_htmlStr
];
self
.
textView
.
text
=
content
;
[
self
.
textView
updateExclusionPaths
];
for
(
int
i
=
0
;
i
<
self
.
imgIndexArr
.
count
;
i
++
)
{
NSString
*
indexStr
=
self
.
imgIndexArr
[
i
];
LMNImageView
*
imageView
=
[
self
.
textView
insertImage
:[
UIImage
imageNamed
:
@"lmn_tool_image"
]
atIndex
:
indexStr
.
integerValue
];
NSLog
(
@"图片index==%@"
,
indexStr
);
NSString
*
url
=
self
.
imgUrlArr
[
i
];
[
self
.
textView
.
imgArr
addObject
:
url
];
imageView
.
imageUrl
=
url
;
}
_htmlStr
=
@""
;
}
}
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
...
...
@@ -262,16 +280,28 @@
if
(
content
.
length
==
0
)
{
content
=
[
element
content
];
}
else
{
NSString
*
tempC
=
[
element
content
];
if
(
tempC
.
length
>
0
)
{
content
=
[
NSString
stringWithFormat
:
@"%@
\n
%@"
,
content
,[
element
content
]];
}
}
TFHppleElement
*
imgDic
=
[
element
firstChildWithTagName
:
@"img"
];
if
(
imgDic
)
{
NSString
*
src
=
[[
imgDic
attributes
]
objectForKey
:
@"src"
];
NSLog
(
@"src:%@"
,
src
);
if
(
content
.
length
==
0
)
{
if
(
self
.
imgIndexArr
.
count
==
0
)
{
[
self
.
imgIndexArr
addObject
:
@"0"
];
}
else
{
NSString
*
index
=
[
NSString
stringWithFormat
:
@"%ld"
,(
content
.
length
+
self
.
imgIndexArr
.
count
)];
[
self
.
imgIndexArr
addObject
:
index
];
}
}
else
{
NSString
*
index
=
[
NSString
stringWithFormat
:
@"%ld"
,(
content
.
length
+
1
+
self
.
imgIndexArr
.
count
)];
NSString
*
index
=
[
NSString
stringWithFormat
:
@"%ld"
,(
content
.
length
+
self
.
imgIndexArr
.
count
)];
[
self
.
imgIndexArr
addObject
:
index
];
}
NSString
*
imgSrc
=
@"https://c.gelifood.com/"
;
...
...
@@ -485,6 +515,7 @@
if
(
!
imageView
)
{
// imageView = [self.textView insertImage:result atIndex:self.cursorIndex];
imageView
=
[
self
.
textView
insertImage
:[
UIImage
imageNamed
:
@"lmn_tool_image"
]
atIndex
:
self
.
cursorIndex
];
NSLog
(
@"原图片indexd===%ld"
,
self
.
cursorIndex
);
}
else
{
...
...
GeliBusinessPlatform/Other/LMNote/OtherViews/LMNImageView.m
View file @
6448b431
...
...
@@ -88,7 +88,7 @@ static CGFloat const kVerticalMargin = kVerticalInset + kMargin;
NSLog
(
@"网络图片大小=%f,%f"
,
size
.
width
,
size
.
height
);
}];
[
self
setNeedsDisplay
];
//
[self setNeedsDisplay];
}
...
...
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
View file @
6448b431
...
...
@@ -480,6 +480,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
func
AddGuiGeCellClick
(
cell
:
AddGuiGeCell
)
{
print
(
"底部广告软文跳转"
)
let
vc
=
LMNoteViewController
()
vc
.
htmlStr
=
goodsDesc
;
vc
.
delegatedata
=
self
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
...
...
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