Skip to content

Commit

Permalink
fixup! fixup! fixup! Supports expanded/collapsed signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
dab246 committed Sep 12, 2023
1 parent b5083f2 commit dc1f0e7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/src/editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,9 @@ class HtmlEditorState extends State<HtmlEditor> {
window.flutter_inappwebview.callHandler('InternalUpdateCursorCoordinates', result);
}
$jsHandleSignature
$jsFindingInnerHtmlTags
==scriptSignature==
==scriptFindingHtmlTags==
</script>
</head>
<body onload="onLoaded();">
Expand Down Expand Up @@ -540,7 +541,12 @@ pre {
if (widget.splitBlockquotes) {
buffer.write(_templateBlockquote);
}
buffer.write(_templateContinuation.replaceFirst('==content==', content));
final newLatestContent = _templateContinuation
.replaceFirst('==scriptSignature==', jsHandleSignature)
.replaceFirst('==scriptFindingHtmlTags==', jsFindingInnerHtmlTags)
.replaceFirst('==content==', content);

buffer.write(newLatestContent);
final html = buffer.toString();

return html;
Expand Down

0 comments on commit dc1f0e7

Please sign in to comment.