-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: replace textarea with rich text editor on Visual Form Build…
…er header description (#7494)
- Loading branch information
1 parent
ada6072
commit cdf17eb
Showing
3 changed files
with
20 additions
and
5 deletions.
There are no files selected for viewing
4 changes: 3 additions & 1 deletion
4
src/DonationForms/resources/registrars/templates/layouts/HeaderDescription.tsx
This file contains 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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
import type {HeaderDescriptionProps} from '@givewp/forms/propTypes'; | ||
import {Interweave} from 'interweave'; | ||
|
||
/** | ||
* @unreleased Replace <p></p> tag with Interweave to be able to render the content generated through the ClassicEditor component | ||
* @since 3.0.0 | ||
*/ | ||
export default function HeaderDescription({text}: HeaderDescriptionProps) { | ||
return <p>{text}</p>; | ||
return <Interweave content={text} />; | ||
} |
This file contains 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 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