-
Notifications
You must be signed in to change notification settings - Fork 167
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
Add Image Format to getFormatState #1656
Conversation
@@ -59,6 +62,11 @@ export function retrieveModelFormatState( | |||
segments.some(segment => segment.segmentType == 'Image'); | |||
|
|||
isFirst = false; | |||
|
|||
if (segment.segmentType === 'Image' && isFirstImage) { |
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.
A question to PM: for segments format, if the selection contains multiple different format, such as different font names, we will return undefined for that format so that user know that there are different fonts selected. Do we want to do the same for image?
/** | ||
* Format of image, if there is table at cursor position | ||
*/ | ||
imageFormat?: ImageFormat; |
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.
For other format sub types, they are all supported by both Content model and original API. But this one is only supported by Content Model. In that case, I think we can have a sub type of FormatState in Content Model package to hold image format. So when people use original API, they will only see original formats.
What do you think?
Add Image Format that includes the image border and box shadow styles to Format State.