I've run into an issue where if i create HTML text, save it (somewhere), then use RichTextEditor to edit the same text, the font size is increased. Example...
- The original text I enter is "This is my basic entry", with the font set to Arial 12.0. The result:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<style type="text/css">np.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Arial}nspan.s1 {font-family: 'Arial'; font-weight: normal; font-style: normal; font-size: 12.00pt}</style>
</head>
<body>
<p class="p1"><span class="s1">This is my basic entry<span class="Apple-converted-space"> </span></span></p>
</body>
</html>
-
I save this text off, then go to edit it by calling richTextEditor?.setHtmlString()
-
Upon saving, my font size is automatically increased (with no interaction from me) to Arial 16.0. Result:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<style type="text/css">np.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 20.0px; font: 16.0px Arial; color: #000000; -webkit-text-stroke: #000000}nspan.s1 {font-family: 'Arial'; font-weight: normal; font-style: normal; font-size: 16.00pt; font-kerning: none}</style>
</head>
<body>
<p class="p1"><span class="s1">This is my basic entry<span class="Apple-converted-space"> </span></span></p>
</body>
</html>
- If I repeat this edit on the text from (3), the font size is again increased to Arial 21.3. Result:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<style type="text/css">np.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 26.0px; font: 21.3px Arial; color: #000000; -webkit-text-stroke: #000000}nspan.s1 {font-family: 'Arial'; font-weight: normal; font-style: normal; font-size: 21.33pt; font-kerning: none}</style>
</head>
<body>
<p class="p1"><span class="s1">This is my basic entry<span class="Apple-converted-space"> </span></span></p>
</body>
</html>
Please advise. Thanks!
I've run into an issue where if i create HTML text, save it (somewhere), then use RichTextEditor to edit the same text, the font size is increased. Example...
I save this text off, then go to edit it by calling richTextEditor?.setHtmlString()
Upon saving, my font size is automatically increased (with no interaction from me) to Arial 16.0. Result:
Please advise. Thanks!