samclarke / SCEditor

A lightweight HTML and BBCode WYSIWYG editor
http://www.sceditor.com/
Other
657 stars 187 forks source link

HTML tag <font> is outdated and no longer supported in HTML5 #664

Open Raldian opened 6 years ago

Raldian commented 6 years ago

The font tag used in SCEditor is an outdated HTML tag and should not be used anymore, is it possible to get this tag replaced with CSS instead?

brunoais commented 6 years ago

The appearance of the tag is decided by the browser, when an order is given to the browser to change the font of the text. If the browser changes that API, SCE will automatically change. Otherwise, there will be a need for a code change to SCE to use a custom implementation

abetis commented 6 years ago

I advise to read that article: https://medium.com/content-uneditable/contenteditable-the-good-the-bad-and-the-ugly-261a38555e9c

Don't rely on browser APIs, not on the execCommand and other similar functions, those are not up-to-date with the latest specifications and you don't have any control on the added formatting...