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

Feature request: text-decoration underline style / <ins> Element #71

Closed
skolmer opened this issue Jul 2, 2016 · 6 comments
Closed

Feature request: text-decoration underline style / <ins> Element #71

skolmer opened this issue Jul 2, 2016 · 6 comments

Comments

@skolmer
Copy link
Contributor

skolmer commented Jul 2, 2016

Please add a button to set underlined text.

@sstur
Copy link
Owner

sstur commented Jul 2, 2016

I had this in the past but I removed it for some reason that I can't remember now. There is some opinion that underline as a style should not be used in documents except for in links. This is because users have been conditioned to expect underlined text to be a link.

I am happy to add this back in and make it optional. This means we need a prop to customize the toolbar. So this feature request depends on #72.

@skolmer
Copy link
Contributor Author

skolmer commented Jul 2, 2016

Sounds reasonable. Underline is a requirement in my current project but I understand that this can lead to bad UX. If you are adding customization features to the toolbar please consider to add className props for toolbar buttons. This will make it easier to change icons or add styling like bootstrap's button styles.

@Calyhre
Copy link

Calyhre commented Jul 4, 2016

Actually, this is not removed. If you paste underlined text, it will produce ++text++ in markdown, which does not exists in any markdown syntax.

sicdk

@sstur
Copy link
Owner

sstur commented Jul 5, 2016

which does not exists in any markdown syntax.

I do believe there are flavors of markdown that support ++text++ (although I can't think of any at the moment) but you are right it is not really vaid markdown. The alternative is adding <ins> HTML tag in the markdown which is supported by many more parsers (including github flavored markdown). But I really don't like putting arbitrary html in markdown.

Anyway, I'm undecided as to what's the right thing to do with pasted styles like this. I suppose there should be an option that lets you specify what to allow during pasting and for everything that's not included just strip the styles completely.

Thoughts?

@Calyhre
Copy link

Calyhre commented Jul 5, 2016

Yeah, might be a good idea!

The main issue here, is draft-js not allowing us to whitelist pasted inline styles.
There is an issue for this facebookarchive/draft-js#166

@skolmer
Copy link
Contributor Author

skolmer commented Oct 19, 2016

Fixed in #72

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

3 participants