The Wayback Machine - https://web.archive.org/web/20201116054706/https://github.com/storybookjs/storybook/issues/12516
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

Allow to disable HTML escape in text control #12516

Open
ccocoual opened this issue Sep 18, 2020 · 0 comments
Open

Allow to disable HTML escape in text control #12516

ccocoual opened this issue Sep 18, 2020 · 0 comments

Comments

@ccocoual
Copy link

@ccocoual ccocoual commented Sep 18, 2020

Is your feature request related to a problem? Please describe.
After updating to v6, I want to have a control with text input that allows to insert HTML.
It is usefull for components with slots to see how the component behave.

Describe the solution you'd like
Have an escapeHTML: false property in argTypes for text inputs, just like there is in knobs.

Describe alternatives you've considered
I have a function that insert text input in a dynamicaly created div.

const stringAsHtml: (str: string) => HTMLDivElement = (str: string) => {
  const dom: HTMLDivElement = document.createElement('div');
  dom.innerHTML = str;
  return dom;
};

Are you able to assist bring the feature to reality?
no

Additional context
We talked about this in Discord channel addon-controls

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.