Opened 18 years ago
Last modified 14 years ago
#158 review New Feature
Enable find in source view mode
Reported by: | Owned by: | Garry Yao | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | UI : Source View | Version: | |
Keywords: | IBM | Cc: | predecess@…, Garry Yao, satya_minnekanti@… |
Description
We would like to have the 'find' button enabled in the source view mode of the editor.
Attachments (2)
Change History (24)
comment:1 Changed 18 years ago by
Component: | UI : Toolbar → UI : Source View |
---|---|
Keywords: | source find removed |
comment:2 follow-up: 3 Changed 18 years ago by
I've implemented this by implementing source view to run as <pre> inside of the main editing panel, and escaping ampersand and tags -- that way, the same Find/Replace code will work irrespective of mode. I'll check this into /branches/mjk when I get around to merging my changes into 2.4.
comment:3 Changed 18 years ago by
Replying to mjk:
I've implemented this by implementing source view to run as <pre> inside of the main editing panel, and escaping ampersand and tags
This thing needs a lot of discussion. I would recommend you to create a specific branch for this feature (FCKeditor/branches/features/richsource) and open a ticket to discussion it. There are other related features (like source coloring) and mainly a lot of issues to be workaround for it.
comment:4 Changed 18 years ago by
I've made a solid first cut at this as part of [244]. I've patched this in from my local changes to 2.3, so the new enter key behaviour needs to be dealt with. This also opens up the possibility of implementing syntax colouring.
comment:5 Changed 18 years ago by
Now when switching modes in Firefox I get this error all the time
oRange.Select is not a function http://localhost/fckdev/editor/_source/internals/fck.js Line 278
comment:7 Changed 18 years ago by
Cc: | predecess@… added |
---|
https://sourceforge.net/tracker/index.php?func=detail&aid=1446578&group_id=75348&atid=543656 has been marked as dup.
comment:8 Changed 17 years ago by
Keywords: | Discussion added |
---|
comment:9 Changed 17 years ago by
Here is what I have discovered in v2.6.3:
When I allow Find/Replace toolbar button in source mode, I get a javascript error when trying to find text in source mode.
The code to enable the Find button that I am using is this:
FCKToolbarItems.RegisterItem('Find', new FCKToolbarButton('Find', FCKLang.Find, null, null, true, null, 16));
When I enter source mode, then click the find icon, type in text in the dialog and click the Find button, I get a javascript error. This happens in both IE 7 and Firefox 3.0.1.
IE 7 reports this error:
Line: 68 Error: 'nodeType' is null or not an object
The problem appears to be that the fck_replace.html dialog is trying to search the content of oEditor.FCK.EditorDocument. While in source mode, this object is null.
comment:10 follow-up: 12 Changed 16 years ago by
Milestone: | → CKEditor 3.x |
---|
#2842 has been marked as dup
comment:11 Changed 16 years ago by
Cc: | Garry Yao added |
---|
comment:12 Changed 16 years ago by
comment:15 Changed 14 years ago by
Keywords: | Discussion removed |
---|---|
Status: | new → confirmed |
Features like like source coloring mentioned in comment:3 should be handled by another ticket as it is a separate feature.
I guess the only possible thing to discuss here is whether "replace" should also replace content inside of HTML tags or not (e.g whether replacing "div" into "xyz" should result in <div>div</div>
being changed into <xyz>xyz<xyz>
or only into <div>xyz</div>
).
I'd say we should not complicate things here as it could be quite hard to implement, so it looks like it'd be definitely better to treat source code just like text and produce <xyz>xyz<xyz>
.
This way it will be possible to correct change/attributes quickly, change HTML elements into other elements etc.
comment:17 Changed 14 years ago by
Cc: | satya_minnekanti@… added |
---|
comment:18 Changed 14 years ago by
We'll certainly not consider tags here. The entire contents will be handled in a whole, just like a normal plain text field.
Changed 14 years ago by
comment:19 Changed 14 years ago by
Owner: | set to Garry Yao |
---|---|
Status: | confirmed → review |
comment:21 Changed 14 years ago by
Status: | review → review_failed |
---|
At this stage, I would ask to please not add code into core for this feature. Everything should be done directly from the dialog code.
If we see that this feature can be used for other parts of the code, we may then decide to migrate it to core.
Changed 14 years ago by
Attachment: | 158_2.patch added |
---|
comment:22 Changed 14 years ago by
Status: | review_failed → review |
---|
text selection range stuff moved to plugin.
Ok. Just remember that the find feature built in on browsers will also search the text in the source view.