Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Tracking text edits with colored text

Featured Replies

Hi all,

I'm sure I've seen this posted somewhere on FM Forums, but I can't locate it. I'm looking for a way to track changes/edits in a text field. IOW I want to do the following:

Sample original text - I sell oranges, plums and peaches.

Sample edited text - I sell oranges, [color:red]apples, plums and peaches. [color:red]I also sell pumpkins.

Any help is appreciated!

It's easy to find the point where the edited text BEGINS to depart from the original. It is very difficult (if not impossible) to determine where the edit ends and the text returns to the original.

Case in point:

Original text = "I sell oranges, plums and peaches."

Edited text = "I sell oranges, [color:red]ap[color:red]pl[color:red]es, plums and peaches. I also sell pumpkins."

Hi Kent

you can try this one

NotExact.zip

  • Author

Very impressive! :clap:

Thanks, Daniele.

As I was saying...

ahem.gif

  • Author

It was fun while it lasted though.

Wonderful attitude, Kent! I go on those highs ... and just because they are brief (sometimes only seconds) that doesn't mean they aren't great anyway! :laugh2:

Hi all

I am aware of that problem and it wasn't inside my first CF, but that ( first CF ) wasn't Case sensitive.

So "I sell orange" and "i sell orange" was accepted.

Another problem is puntaction, like commas and full-stops...

I don't know if it is impossible, but I'm trying to solve those problems.

... this was my first try.

NotExact.zip

Hi Kent

I think that this is what you need :

I'll made another effort to get rid of punctuation so that:

Sample original text - I sell oranges and peaches.

Sample edited text - I sell oranges, plums and peaches.

... that now writes:

I sell [color:red]oranges, plums and peaches.

will be corrected to:

I sell oranges[color:red], plums and peaches.

Compare.zip

Hi Daniele,

I can't understand how you are improving it (see first example) because the breaks all seem the same to me. But I notice that punctuation clearly appears to trip you up (see second example) ... because when you change that comma to a period (to match original text) then it produces a correct result. You are close.

compare.gif

Hi LaRetta

as you can see, "oranges." is different from "oranges,", so the second one becomes red.

I just said that there are problems with punctuation... I'm still working on :

Hi Kent

I need to know:

what if "original" has words ( and punctuations ) that aren't into "comparison" ?

Like:

Original: I sell oranges and mellons.

Comparison: I sell oranges, plums and peaches.

This result is good for you:

I sell oranges[color:red], plums and [color:red]peaches.

??

  • Author

Hi Daniele,

Ideally the omitted text would appear in the same position as in the original, but formatted with strike thru style.

If that's beyond what you're willing or able to do, you wouldn't hear any complaints out of me if the result shown in the last example were the final result (nor from anyone else on the forums, I'd dare venture). What you've done so far is really impressive.

Thanks a bunch for all your help so far.

Hi Kent

I'm still working ( when have some time ) on punctuation, but are you sure that you want something like this ?

Edit: please keep this one ( minor bug killed )

Compare2.zip

Edited by Guest
New attachment

  • Author

Hey Daniele,

This CF is sweet! Very impressive!

I see what you mean with regards to punctuation.

Thanks a bunch for all your help!

-Kent

comparison.gif

I hate it when you make me be the spoilsport. I don't think the problem is punctuation. It's the underlying logic.

FWIW, when you track changes in a word processor, you get two different results when you (a) edit a word, or (:) delete the word and retype it correctly. To do this, the program has to keep track of actual keystrokes. Without this information, you are forced to guess.

Compare2.fp7.zip

It's the underlying logic.

So I changed the underlying logic.

Now it's all OK but:

original = one two

comparison = two one

gives NO errors.

Compare3.zip

You have other problems as well. Compare for example "one two one" with "zero two one". I don't think the logic has changed much - it seems to me you are only shifting the error to another place.

Even if you change the logic dramatically, I believe there always will be a way to show it breaking - because IMHO it cannot be done, at least not without making some assumptions - which by necessity will not always be true.

Bha!!

At least I had tried :)

  • Author

At least I had tried :)

Hey Daniele,

It was a great effort on your part and I truly appreciate your gumption and perseverance. :clap:

Thanks!

-Kent

  • Author

I hate it when you make me be the spoilsport.

Hey Michael,

I'm at a loss for words on that one! :idunno:

-Kent

I'm not sure what you mean - perhaps finding a word or two would help to clarify?

  • Author

If(

not Count ( words ) ;

0 ;

words

)

:)

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.