Opened 16 years ago
Closed 16 years ago
#2905 closed Task (fixed)
plugin:find and replace move to trunk
Reported by: | Garry Yao | Owned by: | Martin Kou |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.0 |
Component: | General | Version: | SVN (FCKeditor) - Retired |
Keywords: | Confirmed Review+ | Cc: |
Description
Find and replace plugin is required to move to trunk.
Attachments (6)
Change History (19)
comment:1 Changed 16 years ago by
Keywords: | Confirmed added |
---|---|
Owner: | set to Garry Yao |
Status: | new → assigned |
Changed 16 years ago by
Attachment: | 2905.patch added |
---|
Changed 16 years ago by
Attachment: | 2905_2.patch added |
---|
comment:2 Changed 16 years ago by
Keywords: | HasPatch added |
---|
This patch make the following changes to Martin's initial codes:
- Simplify the CharacterWalker by avoid using events internally, same reason as #2876.
- Make the pattern matchable on inline elements edge, e.g. <span>
- Introduce replace and replaceAll feature.
- Make search start right from pre-selected position.
- Add WholeWord match pattern validation based on find text pattern.
- Make find and search tabs share same values on common fields when switching between them.
- Fix a minor bug in _source/core/dom/document.js about createText
Martin, please give comments on it.
Changed 16 years ago by
Attachment: | 2905_3.patch added |
---|
comment:4 Changed 16 years ago by
Keywords: | Review- added; Review? removed |
---|
This patch is proposing changes to "_source/plugins/find/dialogs/find.js", which is not available. I think this is not a patch for trunk.
Changed 16 years ago by
Attachment: | 2905_4.patch added |
---|
comment:5 Changed 16 years ago by
Keywords: | Review? added; Review- removed |
---|
Yes,I've aligned the patch with trunk, please go ahead with the reviewing.
comment:6 Changed 16 years ago by
Keywords: | Review- added; Review? removed |
---|---|
Owner: | changed from Garry Yao to Martin Kou |
Status: | assigned → new |
Still a number of problems:
- The dialog crashes in IE at opening.
- editor.lang.findAndReplace.replaceSuccMsg is missing in the language file.
- The dialog currently uses selectRanges() to highlight find results. This is not acceptable because it does not work in IE - sure the selection would still be visible in IE, but IE only allows one selection in each browser window so as soon as the user clicks on the dialog the highlight would be lost. I understand that such highlight logic would depend on #2768, which is not committed yet. But #2768's proposed patch is already working to some degree and it should be possible to propose a patch for the find dialog in conjunction with #2768's changes.
- The editor window does not scroll to the find results.
Since this feature is urgently needed, and I don't see you on Skype today, I'm taking over this ticket.
Changed 16 years ago by
Attachment: | 2905_5.patch added |
---|
comment:7 Changed 16 years ago by
Keywords: | Review? added; Review- removed |
---|
comment:8 Changed 16 years ago by
The replace function in the new patch crashes in IE, but after some investigations it's found to be a bug in the CKEDITOR.dom.range::extractContents() function.
Other features should be fully working.
comment:9 Changed 16 years ago by
The patch includes the changes in #2768 for making the find results highlight work. To remove those changes, simply remove all the changes in _source/plugins/styles/plugin.js.
comment:10 Changed 16 years ago by
Keywords: | Review- added; Review? removed |
---|
- The following case is not working:
- Open the replace dialog.
- Type "a" into the find field.
- Type "AAA" into the replace field.
- Click "Replace" several times.
Note that when clicking replace, the editor correctly selects the next "a" occurrence, but it incorrectly starts this search at the previous selection position, instead of after the replacement text. It results in a endless replacement inside the replaced text.
- Please change the alert message from "Successfully replaced %1 finds." to "%1 occurrence(s) replaced".
- Is it possible to disable the "Match whole word" checkbox, instead of removing it when typing non words? Actually, I would leave it always available, because it makes sense to match "Chapter 3" and not "Chapter 30".
- deleteContents should be used instead of extractContents. But it's still broken in IE. It's quite a serious break (content lost) so a fix for it must be included into the patch.
Changed 16 years ago by
Attachment: | 2905_6.patch added |
---|
comment:11 Changed 16 years ago by
Keywords: | Review? added; Review- removed |
---|
comment:12 Changed 16 years ago by
Keywords: | Review+ added; Review? removed |
---|
Remove some unnecessary lines of change