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 ] : Add rich text option and toolbar to TextArea React component #13462

Closed
5 tasks
JoshuaHorowitz opened this issue Apr 3, 2023 · 2 comments
Closed
5 tasks
Labels
component: text-area proposal: open This request has gone through triaging. We're determining whether we take this on or not. status: waiting for author's response 💬 type: enhancement 💡

Comments

@JoshuaHorowitz
Copy link

JoshuaHorowitz commented Apr 3, 2023

The story

Many developers use 3rd party components for their rich text needs, whether it be for text that is bolded, underlined, bulleted lists, sized differently, etc.

The problem

The ability to add a "Rich text" option to the textarea component would be very helpful for those developers so as not to rely on 3rd party components that can either have:

  1. Vulnerabilities that IBM and the developers creating IBM applications has no control over
  2. Lack of extensibility and uniformity. And as such, the products may lack a certain style or uniformity that our high quality frontend designs sometimes demand.

The solution

These two problems can be solved with a native carbon react component that allows for rich text.

Tasks

  1. Create a boolean prop for TextArea that can toggle between rich text and non rich text (when true, allow a toolbar to pop up for rich text options)
  2. Allow the user to choose 1 or more tiles from the toolbar and then the text typed while the tile(s) are selected will be styled in accordance with the character of the tile
  3. Allow a user to highlight text with their mouse and select 1 or more tiles to then style said highlighted text
  4. Allow a user to remove styling from text if they highlight said text and the uncheck 1 or more tiles from the toolbar
  5. May require: removal of script tags that a user type in order to protect against XSS attacks

An example of one such third party editor would be a ckeditor (pictured below) as found here which may get the job done, but as mentioned above, lack uniformity, extensibility, and confidence in being able to resolve vulnerabilities that are critical to IBMers.

@tw15egan
Copy link
Collaborator

tw15egan commented Apr 3, 2023

There have been design explorations, but there is no coded component available. There is currently no plan to implement the feature at this moment in time

Refs #10320
Refs #11272
Refs #2447

@tw15egan tw15egan added type: enhancement 💡 component: text-area proposal: open This request has gone through triaging. We're determining whether we take this on or not. and removed status: needs triage 🕵️‍♀️ labels Apr 3, 2023
@github-project-automation github-project-automation bot moved this to Triage in Roadmap Apr 3, 2023
@tay1orjones
Copy link
Member

Providing something to assist in the "uniformity" category makes sense to me.

Writing our own rich text editor from the ground up seems like a poor choice though considering how robust the popular third party solutions are. Leaning into these third party libraries might be a more sustainable path. Maybe we could provide a set of presentational components that could help teams implement the design pattern for rich text editor (toolbar) with popular third party libraries.

Also I'm not sure if it makes sense for this to be part of TextArea. Instead it's own component or set of components composed together maybe.

@sstrubberg sstrubberg closed this as not planned Won't fix, can't repro, duplicate, stale May 1, 2023
@github-project-automation github-project-automation bot moved this from Triage to Completed in Roadmap May 1, 2023
@github-project-automation github-project-automation bot moved this to ✅ Done in Design System May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: text-area proposal: open This request has gone through triaging. We're determining whether we take this on or not. status: waiting for author's response 💬 type: enhancement 💡
Projects
Archived in project
Archived in project
Development

No branches or pull requests

4 participants