Opened 17 years ago

Last modified 13 years ago

#158 review New Feature

Enable find in source view mode

Reported by: jtosi@… 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)

158.patch (18.8 KB) - added by Garry Yao 13 years ago.
158_2.patch (19.0 KB) - added by Garry Yao 13 years ago.

Download all attachments as: .zip

Change History (24)

comment:1 Changed 17 years ago by Frederico Caldeira Knabben

Component: UI : ToolbarUI : Source View
Keywords: source find removed

Ok. Just remember that the find feature built in on browsers will also search the text in the source view.

comment:2 Changed 17 years ago by Martin Knowles

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 in reply to:  2 Changed 17 years ago by Frederico Caldeira Knabben

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 17 years ago by Martin Knowles

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 17 years ago by Alfonso Martínez de Lizarrondo

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:6 Changed 17 years ago by Alfonso Martínez de Lizarrondo

#521 has been marked as dup

comment:7 Changed 17 years ago by Alfonso Martínez de Lizarrondo

Cc: predecess@… added

comment:8 Changed 16 years ago by Wojciech Olchawa

Keywords: Discussion added

comment:9 Changed 16 years ago by Devon Weller

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 Changed 15 years ago by Alfonso Martínez de Lizarrondo

Milestone: CKEditor 3.x

#2842 has been marked as dup

comment:11 Changed 15 years ago by Garry Yao

Cc: Garry Yao added

comment:12 in reply to:  10 Changed 15 years ago by starz

Replying to alfonsoml:

#2842 has been marked as dup

Can Find and Replace be added to next release of FCKeditor?

comment:13 Changed 14 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.x

Milestone CKEditor 3.x deleted

comment:14 Changed 13 years ago by Damian

Keywords: IBM added

We're interested in this as well.

comment:15 Changed 13 years ago by Wiktor Walc

Keywords: Discussion removed
Status: newconfirmed

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:16 Changed 13 years ago by Wiktor Walc

Syntax highlighting is covered by #602

comment:17 Changed 13 years ago by Satya Minnekanti

Cc: satya_minnekanti@… added

comment:18 Changed 13 years ago by Frederico Caldeira Knabben

We'll certainly not consider tags here. The entire contents will be handled in a whole, just like a normal plain text field.

Changed 13 years ago by Garry Yao

Attachment: 158.patch added

comment:19 Changed 13 years ago by Garry Yao

Owner: set to Garry Yao
Status: confirmedreview

comment:20 Changed 13 years ago by Garry Yao

Patch created upon 3.6.x branch.

comment:21 Changed 13 years ago by Frederico Caldeira Knabben

Status: reviewreview_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 13 years ago by Garry Yao

Attachment: 158_2.patch added

comment:22 Changed 13 years ago by Garry Yao

Status: review_failedreview

text selection range stuff moved to plugin.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy