Skip to content

Commit

Permalink
feat: #379 通过引入第三方组件cm-search-replace实现左侧编辑器搜索、替换功能
Browse files Browse the repository at this point in the history
  • Loading branch information
sunsonliu committed Jan 12, 2023
1 parent 266a5f1 commit 3b7d17d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
"dependencies": {
"@types/codemirror": "^0.0.108",
"@types/dompurify": "^2.2.3",
"cm-search-replace": "^1.0.0",
"jsdom": "~19.0.0",
"mitt": "^3.0.0"
},
Expand Down
4 changes: 4 additions & 0 deletions src/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ import 'codemirror/addon/edit/matchtags';
import 'codemirror/addon/search/searchcursor';
import 'codemirror/addon/display/placeholder';
import 'codemirror/keymap/sublime';

import 'cm-search-replace/src/search';
import 'codemirror/addon/scroll/annotatescrollbar';
import 'codemirror/addon/search/matchesonscrollbar';
// import 'codemirror/addon/selection/active-line';
// import 'codemirror/addon/edit/matchbrackets';
import htmlParser from '@/utils/htmlparser';
Expand Down
7 changes: 7 additions & 0 deletions src/sass/cherry.scss
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,13 @@
}
}


.cherry {
.ace_search {
background: #FFF;
}
}

.cherry-sidebar {
width: 30px;
position: absolute;
Expand Down

0 comments on commit 3b7d17d

Please sign in to comment.