Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.2k
docs(select): add new section on rich content options#4512
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
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
f4ea004
chore(): use dev build
brandyscarney ec02fee
docs(guide): add ion-select-option to guides mentioning innerHTML
brandyscarney 004228d
feat(stackblitz): add support for passing IonicConfig to StackBlitz
brandyscarney 6f73533
docs(select): add rich content options playground
brandyscarney ca1f07f
style: add comment on dev build
brandyscarney 3396381
docs(select): add section description to Rich Content Options
brandyscarney c3e75e5
Merge branch 'major-9.0' into FW-7289
brandyscarney 6848c26
chore(): use latest dev build
brandyscarney 948fe5f
refactor(Playground): remove ionicConfig addition
brandyscarney eedbd2a
docs(select): update rich content playground to pass the config
brandyscarney 0b5529f
fix(Playground): combine a passed Ionic config with the mode
brandyscarney 8bab6aa
test(Playground): add spec tests for the StackBlitz utils
brandyscarney 14ba310
style: add md extension to doc link
brandyscarney 506b6ff
docs(select): clarify how the rich content options display closed text
brandyscarney e210d4b
chore(deps): latest dev build
brandyscarney 09db8f7
docs(select): update styles after latest framework changes
brandyscarney 75aa99b
Merge branch 'major-9.0' into FW-7289
brandyscarney 4d48299
chore(): revert dev build
brandyscarney File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -201,6 +201,22 @@ import StartEndSlots from '@site/static/usage/v9/select/start-end-slots/index.md | ||
| <StartEndSlots /> | ||
| ## Rich Content Options | ||
| :::important | ||
thetaPC marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| Rich content in select options is disabled by default. Set [`innerHTMLTemplatesEnabled`](/docs/developing/config.md#ionicconfig) to `true` in your [global Ionic config](/docs/developing/config.md#global-config). Markup inside options is treated as plain text when it is disabled. Refer to [Security](/docs/techniques/security.md) for sanitization guidance when enabling custom HTML. | ||
| ::: | ||
| In addition to single text labels, [Select Options](./select-option.md) can include HTML rich content in the select interface. Elements added inside of an option without a named slot will go into the default slot. The `start` and `end` slots will place elements on either side of the default slot. The `description` attribute can be used for additional supporting text displayed under the label. | ||
| This is separate from [Start and End Slots](#start-and-end-slots) on `ion-select`, which decorate the closed field. The rich content options display in the interface after opening the select. | ||
| When an option is selected, the closed field shows the option's text content as plain text only. HTML markup is stripped, and the `start` and `end` slots and the `description` attribute are not included in the selected display. | ||
| import RichContentOptions from '@site/static/usage/v9/select/rich-content-options/index.md'; | ||
| <RichContentOptions /> | ||
| ## Customization | ||
| There are two units that make up the Select component and each need to be styled separately. The `ion-select` element is represented on the view by the selected value(s), or placeholder if there is none, and dropdown icon. The interface, which is defined in the [Interfaces](#interfaces) section above, is the dialog that opens when clicking on the `ion-select`. The interface contains all of the options defined by adding `ion-select-option` elements. The following sections will go over the differences between styling these. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.