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

Can't change font-family of text in the 'font' tags #259

Closed
cwhitwell opened this issue Mar 17, 2020 · 1 comment
Closed

Can't change font-family of text in the 'font' tags #259

cwhitwell opened this issue Mar 17, 2020 · 1 comment
Labels
Milestone

Comments

@cwhitwell
Copy link

Hi there,
I've been running some tests on the SunEditor as I will be using it in my web application. First of all big props as it works really well :). I have however found some bugs and will raise a separate issue for each.

When you change the font-family of text in the editor, occasionally the text will end up wrapped in a 'font' tag, rather than a 'span'. The problem is that when the text is in a 'font' tag and you select it to change the font, you are unable to change the font-family to anything else. Once you delete the entire text and ensure the 'font' tag is gone it works again. It also seems that switching back and forth between 'codeView' and normal view can result in the 'font' tags being removed which also solves the problem.

My suggested solution would be to remove the use of the 'font' tags all together, as the use of 'font-family' in the 'span' tag seems to be sufficient in setting and changing the font, so i'm not sure why its even needed.

Environment:
MacOS Mojave V10.14
Google Chrome Version 80.0.3987.132 (Official Build) (64-bit)
suneditor V2.26.0

Please see video demo attached (I've added an application to display my keystrokes on the screen).

Font Tag Bug.mov.zip

@JiHong88 JiHong88 added the bug label Mar 17, 2020
@JiHong88
Copy link
Owner

Hi
If tags with color or font-family style attributes are deleted to fit the number of characters, they are revived as "font" tags.
I don't know why not yet.😭
I'll try find a way to solve it.

@JiHong88 JiHong88 added this to the 2.27.0 milestone Mar 17, 2020
JiHong88 added a commit that referenced this issue Mar 17, 2020
fix: key event in freeFormatElement,
select all when there is no text,
add: util-isMedia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants