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
718c3a47
Commit
718c3a47
authored
May 25, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
强加换行符号(富文本编辑器)
parent
a4710590
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Other/LMNote/LMNoteViewController.m
GeliBusinessPlatform/Other/LMNote/LMNoteViewController.m
+14
-3
GeliBusinessPlatform/Other/LMNote/OtherViews/LMNImageView.m
GeliBusinessPlatform/Other/LMNote/OtherViews/LMNImageView.m
+3
-3
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
718c3a47
No preview for this file type
GeliBusinessPlatform/Other/LMNote/LMNoteViewController.m
View file @
718c3a47
...
...
@@ -185,7 +185,7 @@
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
];
...
...
@@ -196,8 +196,12 @@
}
_htmlStr
=
@""
;
}
// [self.textView insertImage:[UIImage imageNamed:@"banner"] atIndex:0];
// [self.textView insertImage:[UIImage imageNamed:@"banner"] atIndex:1];
// [self.textView insertImage:[UIImage imageNamed:@"banner"] atIndex:2];
// [self.textView insertImage:[UIImage imageNamed:@"banner"] atIndex:3];
// [self.textView insertImage:[UIImage imageNamed:@"banner"] atIndex:4];
// [self.textView insertImage:[UIImage imageNamed:@"banner"] atIndex:5];
}
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
...
...
@@ -275,6 +279,7 @@
TFHpple
*
doc
=
[[
TFHpple
alloc
]
initWithHTMLData
:
data
];
// 搜索XPath寻找标签
NSArray
*
elements
=
[
doc
searchWithXPathQuery
:
@"//p"
];
for
(
TFHppleElement
*
element
in
elements
)
{
NSLog
(
@"content:%@"
,
[
element
content
]);
if
(
content
.
length
==
0
)
{
...
...
@@ -286,6 +291,12 @@
content
=
[
NSString
stringWithFormat
:
@"%@
\n
%@"
,
content
,[
element
content
]];
}
}
NSString
*
tempContent
=
[
element
content
];
if
(
tempContent
.
length
==
0
&&
self
.
imgIndexArr
.
count
!=
0
)
{
content
=
[
NSString
stringWithFormat
:
@"%@
\n
"
,
content
];
}
TFHppleElement
*
imgDic
=
[
element
firstChildWithTagName
:
@"img"
];
if
(
imgDic
)
{
NSString
*
src
=
[[
imgDic
attributes
]
objectForKey
:
@"src"
];
...
...
GeliBusinessPlatform/Other/LMNote/OtherViews/LMNImageView.m
View file @
718c3a47
...
...
@@ -75,8 +75,8 @@ static CGFloat const kVerticalMargin = kVerticalInset + kMargin;
-
(
void
)
setImage
:(
UIImage
*
)
image
{
//
_image = image;
//
self.imageView.image = image;
_image
=
image
;
self
.
imageView
.
image
=
image
;
[
self
setNeedsDisplay
];
}
-
(
void
)
setImageUrl
:(
NSString
*
)
imageUrl
{
...
...
@@ -88,7 +88,7 @@ static CGFloat const kVerticalMargin = kVerticalInset + kMargin;
NSLog
(
@"网络图片大小=%f,%f"
,
size
.
width
,
size
.
height
);
}];
//
[self setNeedsDisplay];
[
self
setNeedsDisplay
];
}
...
...
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