有一串html格式的字符串:<h1>heading 1</h1><h2>heading 2</h2><h3>heading 3</h3><h4>heading 4</h4><h5>heading 5</h5><p>normal text style</p><p><strong>strong </strong></p><p><em>italic</em></p><p><span style="text-decoration: underline;">underline</span> </p>显示效果如图:在这里想问大家一个问题
我对EditText的文字进行编辑,还能返回如:
<h1>heading 1</h1><h2>heading 2</h2>我正在做测试<h3>heading 3</h3><h4>heading 4</h4><h5>heading 5</h5><p>normal text style</p><p><strong>strong </strong></p><p><em>italic</em></p><p><span style="text-decoration: underline;">underline</span> </p>或者
<h1>heading 1,我正在做测试</h1><h2>heading 2</h2><h3>heading 3</h3><h4>heading 4</h4><h5>heading 5</h5><p>normal text style</p><p><strong>strong </strong></p><p><em>italic</em></p><p><span style="text-decoration: underline;">underline</span> </p>分数不是上限,解决问题是关键
我对EditText的文字进行编辑,还能返回如:
<h1>heading 1</h1><h2>heading 2</h2>我正在做测试<h3>heading 3</h3><h4>heading 4</h4><h5>heading 5</h5><p>normal text style</p><p><strong>strong </strong></p><p><em>italic</em></p><p><span style="text-decoration: underline;">underline</span> </p>或者
<h1>heading 1,我正在做测试</h1><h2>heading 2</h2><h3>heading 3</h3><h4>heading 4</h4><h5>heading 5</h5><p>normal text style</p><p><strong>strong </strong></p><p><em>italic</em></p><p><span style="text-decoration: underline;">underline</span> </p>分数不是上限,解决问题是关键
编辑后的EditText文字,在保存时,需要返回原来的html标签,这样就不要打乱原有的显示,如果你没有<h1></h1>那么文字就会变小,你说呢