-
Notifications
You must be signed in to change notification settings - Fork 3
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
Rich text posts #892
Rich text posts #892
Conversation
We've got a few libraries we provide our own types for in the |
b37ea95
to
64aceb4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @richardgirges!
828c023
to
b7e65f0
Compare
46ac37d
to
356bd95
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CKE features should be limited to only those we can render. I'd remove quotes, tables, pics, and video.
We should style the output with react-html-parser
and the display inside of the editor to be consistent with our theme.
@@ -124,7 +127,7 @@ export const PostListItemCard: FC<PostListItemCardProps> = ({ | |||
</Typography> | |||
</div> | |||
</div> | |||
<Typography variant="body2">{post.body.value}</Typography> | |||
<Typography variant="body2">{postBody}</Typography> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently this puts any html tags under a <p>
tag which is invalid HTML.
Richard: could go live if needed with just what is PR'd; available next in Dec |
9078f2d
to
f421e17
Compare
@daniel-leod can you confirm that we still need to address the unresolved comment above? |
@ParkeBrown I think the last commit would resolve that. This PR is ready for review. |
Daniel believes he's covered the requested changes |
I'd like to go with an editor that produces JSON instead, instead of html string. So rendering can be easily customized based on context. |
This is the first draft of rich text editing with CK Editor.
Things to note:
This PR contains PR Edit and delete functionality for posts #889 and should be rebased after 889 is merged
There are no typings for the React CKEditor wrapper. The type check is failing right now because of this. Lack of typings for CKEditor is a long-standing issue with no solid resolution as of yet. Please advise on how to approach