Fixed styling signature editor

pull/210/head
M66B 3 years ago
parent 7ff386078e
commit 62fcc7da21

@ -289,8 +289,10 @@ public class ActivitySignature extends ActivityBase {
etText.setText(null); etText.setText(null);
else if (etText.isRaw()) else if (etText.isRaw())
etText.setText(html); etText.setText(html);
else else {
etText.setText(HtmlHelper.fromHtml(html, new HtmlHelper.ImageGetterEx() { Document d = JsoupEx.parse(html);
d = HtmlHelper.sanitizeView(this, d, true);
Spanned signature = HtmlHelper.fromDocument(this, d, new HtmlHelper.ImageGetterEx() {
@Override @Override
public Drawable getDrawable(Element element) { public Drawable getDrawable(Element element) {
String source = element.attr("src"); String source = element.attr("src");
@ -299,7 +301,9 @@ public class ActivitySignature extends ActivityBase {
return ImageHelper.decodeImage(ActivitySignature.this, return ImageHelper.decodeImage(ActivitySignature.this,
-1, element, true, 0, 1.0f, etText); -1, element, true, 0, 1.0f, etText);
} }
}, null, this)); }, null);
etText.setText(signature);
}
loaded = true; loaded = true;
} }

Loading…
Cancel
Save