change quotation mark in htmltext
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
change quotation mark in htmltext
Hi,
can the quotation mark of a text be changed in the htmltext?
e.g. "All is gone" to "- All is gone -"
htmltext:
<p><font face="Shalom Old Style" size="20">"All is gone"</font></p>
to
<p><font face="Shalom Old Style" size="20"> - All is gone - </font></p>
The problem: deleting the quotation marks in the htmltext changes the font, size etc. too!
Kind regards
chrisw
can the quotation mark of a text be changed in the htmltext?
e.g. "All is gone" to "- All is gone -"
htmltext:
<p><font face="Shalom Old Style" size="20">"All is gone"</font></p>
to
<p><font face="Shalom Old Style" size="20"> - All is gone - </font></p>
The problem: deleting the quotation marks in the htmltext changes the font, size etc. too!
Kind regards
chrisw
Re: change quotation mark in htmltext
Hi Chris,
sorry, not sure I understand?
The quotes ARE in fact an important part of the HTML, so deleteing them will of course produce rubbish!
But your initial question is NOT about deleting quotes actually!?
<p><font face="Shalom Old Style" size="20">"- All is gone -"</font></p>
So you should just replace the TEXT inside of the quotes like this:
...
replace "All is gone" with "- All is gone -" in yourHTMLTextVariableHere
...
Best
Klaus
P.S.
Since this is everything but OFF-TOPIC (Hint, hint
) I will move this thread to the beginners section.
sorry, not sure I understand?
The quotes ARE in fact an important part of the HTML, so deleteing them will of course produce rubbish!
But your initial question is NOT about deleting quotes actually!?
Would result in:e.g. "All is gone" to "- All is gone -"
<p><font face="Shalom Old Style" size="20">"- All is gone -"</font></p>
So you should just replace the TEXT inside of the quotes like this:
...
replace "All is gone" with "- All is gone -" in yourHTMLTextVariableHere
...
Best
Klaus
P.S.
Since this is everything but OFF-TOPIC (Hint, hint

Re: change quotation mark in htmltext
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: change quotation mark in htmltext
MaxV, thanks for the hint. But alas I get a result only when I put
replaceText("Strafgericht","Straf","gut")
into the msg, but not, when I put it into the script (there I get always the message:
field "Field": execution error at line 2 (Handler: can't find handler) near "replaceText", char 1
How I get a result in the script?
Alle the best to You!
chrisw
replaceText("Strafgericht","Straf","gut")
into the msg, but not, when I put it into the script (there I get always the message:
field "Field": execution error at line 2 (Handler: can't find handler) near "replaceText", char 1
How I get a result in the script?
Alle the best to You!
chrisw
Re: change quotation mark in htmltext
I don't have a whole picture of your problem, but I think that you have a field "mytext", so you may create a button with this code:
Code: Select all
on MouseUp
put the htmlText of field "myText" into temp
put "> " & quote into tStart
put replaceText(tStart,"> - ", temp) into temp
put quote & " <" into tEnd
put replaceText(tEnd," - <", temp) into temp
#answer temp #uncomment this to see what happened
set the htmlText of field "mytext" to temp
end MouseUp
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: change quotation mark in htmltext
Hi Chris,
Do something like this:
...
PUT replaceText("Strafgericht","Straf","gut") INTO aVariable
answer aVariable
# or whatever...
...
Best
Klaus
"replacetext()" is a FUNCTION, but you are obviously using it like a HANDLER!chrisw wrote:But alas I get a result only when I put: replaceText("Strafgericht","Straf","gut") into the msg, but not, when I put it into the script (there I get always the message:
field "Field": execution error at line 2 (Handler: can't find handler) near "replaceText", char 1
Do something like this:
...
PUT replaceText("Strafgericht","Straf","gut") INTO aVariable
answer aVariable
# or whatever...
...
Best
Klaus
Re: change quotation mark in htmltext
found this this morning. i saw something about quotation marks in it but havent looked through all the stuff yet was just looking for a return/whitespace remover
http://www.robertcailliau.eu/Alphabetic ... 0Routines/
http://www.robertcailliau.eu/Alphabetic ... 0Routines/