Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
13.5
Statistic
FMM
Blog
Replaces text in current rich text document with new text.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
RichText | 4.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
SearchText | The text to search. Search is case insensitive. | "$FirstName" | |
NewText | The new text to use as replacement. Can be empty. | "Christian" | |
Multiple | Optional, Pass 1 to replace all occurrences. Default is 0 to replace the first one found. | 0 | Optional |
Returns Count or error.
Replace choclate with vanilla:
Set Variable [ $r ; Value: MBS( "RichText.ReadHTML"; "<html><body><p><b>Schokoladenplätzchen</b></p></body></html>" ) ]
Set Variable [ $r ; Value: MBS("RichText.ReplaceText"; "Schokoladen"; "Vanille") ]
Show Custom Dialog [ "HTML" ; MBS( "RichText.HTMLText" ) ]
This function is free to use.
Created 16th October 2014, last changed 25th November 2017