Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

设置字体默认大小不成功 #6

Open
GGWON opened this issue Oct 26, 2019 · 3 comments
Open

设置字体默认大小不成功 #6

GGWON opened this issue Oct 26, 2019 · 3 comments

Comments

@GGWON
Copy link

GGWON commented Oct 26, 2019

一开始初始化 用了setEditorFontSize() 设置字体大小,但是只有光标变大了,字体还是最小的那个。
但是假如这时候我给一个按钮设置了 setTextColor 事件并且点击了,这时候就字体就会变成所设置的默认字体大小。

@RexSuper
Copy link
Owner

RexSuper commented Oct 31, 2019

setEditorFontSize只是编辑字体大小,和实际生成html没有关系,目前只能通过setFontSize 去设置
font-size (1-7)对应 xx-small
x-small
small
medium
large
x-large
xx-large

目前比较想要的直接指定具体大小 如我想要20px,这种属于font size和font-size css里面 还是不同,目前web的这个editor,目前还是不支持的,当然你可以直接插入文本
<p style="font-size:20px">
,但是无法使光标处输入指定大小

@RexSuper
Copy link
Owner

比如你只是使用这7种 类似 h1 2345 这样的标签效果。默认的是去设置setFontSize 具体可以参考 demo中,ChooseDialog.show(mContext, Type.Heading, new ChooseDialog.OnItemClick() {
@OverRide
public void click(int position, ChooseDialogData data) {
richEditor.setFontSize((int) data.params);
}
});

@GGWON
Copy link
Author

GGWON commented Nov 1, 2019

比如你只是使用这7种 类似 h1 2345 这样的标签效果。默认的是去设置setFontSize 具体可以参考 demo中,ChooseDialog.show(mContext, Type.Heading, new ChooseDialog.OnItemClick() {
@OverRide
public void click(int position, ChooseDialogData data) {
richEditor.setFontSize((int) data.params);
}
});

好的谢谢了,我另外试试,辛苦了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants