Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
王士厅
2024-09-11 14:46:55 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
892f2131c3be13cbf7dfe167377d0bd24e5aebb1
892f2131
2 parents
242c4dec
0e927e10
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
sight_harmony/features/wdComponent/src/main/resources/rawfile/apph5/js/hooks/useEditorContent.js
sight_harmony/features/wdComponent/src/main/resources/rawfile/apph5/js/hooks/useEditorContent.js
View file @
892f213
...
...
@@ -181,13 +181,14 @@ function useEditorContent(details, netstutas, audioState, loadlmageOnlyWifiSwitc
// .diff(recordTime.value, 'millisecond')} - ${dayjs()
// .diff(dayjs(firstTime), 'millisecond')}`)
recordTime
.
value
=
dayjs
()
// TODO 这里是把给到的内容格式化-兼容早晚报
// TODO 这里是把给到的内容格式化-兼容早晚报
,?x-oss-process=image/resize,w_650
let
str
=
details
.
value
.
newsContent
.
replace
(
/<img
(
.*
?)
src="
(
.*
?)
"
(
.*
?)
>/g
,
'<img$1src="" data-src="$2"$3>'
)
str
=
str
.
replace
(
/<IMG
(
.*
?)
src="
(
.*
?)
"
(
.*
?)
>/g
,
'<IMG$1src="" data-src="$2"$3>'
)
str
=
str
.
replace
(
/<video
(
.*
?)
poster="
(
.*
?)
"
(
.*
?)
>/g
,
'<video$1poster="" data-poster="$2"$3>'
)
str
=
str
.
replace
(
/<VIDEO
(
.*
?)
poster="
(
.*
?)
"
(
.*
?)
>/g
,
'<VIDEO$1poster="" data-poster="$2"$3>'
)
str
=
str
.
replace
(
/<p>
\s
*<
\/
p>/g
,
''
)
str
=
str
.
replace
(
/
[\u
200B-
\u
200D
\u
FEFF
]
/g
,
''
)
str
=
str
.
replace
(
/‘/g
,
'\''
)
str
=
htmlDecode
(
str
)
// 这一步去除元素与元素之间的空格
str
=
str
.
replace
(
/>
\s
+</g
,
'><'
)
...
...
@@ -215,6 +216,7 @@ function useEditorContent(details, netstutas, audioState, loadlmageOnlyWifiSwitc
})
}
}
// console.log('>>>>>>>>newsContent:',str)
document
.
querySelector
(
'#newsContent'
).
innerHTML
=
str
const
realHtml
=
document
.
querySelector
(
'#newsContent'
).
innerHTML
document
.
querySelector
(
'#newsContent'
).
innerHTML
=
''
...
...
Please
register
or
login
to post a comment