Skip to content

Commit

Permalink
Merge pull request #1946 from microsoft/u/juliaroldi/font-image-handler
Browse files Browse the repository at this point in the history
Add font-size in image wrapper.
  • Loading branch information
juliaroldi authored Jul 13, 2023
2 parents 025aad9 + 8079cf0 commit f77648f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as getPendingFormat from '../../../lib/modelApi/format/pendingFormat';
import * as retrieveModelFormatState from '../../../lib/modelApi/common/retrieveModelFormatState';
import getFormatState from '../../../lib/publicApi/format/getFormatState';
import { createRange } from 'roosterjs-editor-dom';
import { FormatState, SelectionRangeTypes } from 'roosterjs-editor-types';
import { IContentModelEditor } from '../../../lib/publicTypes/IContentModelEditor';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ export default class ImageEdit implements EditorPlugin {
});

this.shadowSpan.style.verticalAlign = 'bottom';
this.shadowSpan.style.fontSize = '24px';

shadowRoot.appendChild(wrapper);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ describe('ImageEdit | rotate and flip', () => {
editor.select(image);
plugin.setEditingImage(image, ImageEditOperation.Resize);
expect(editor.getContent()).toBe(
'<span style="vertical-align: bottom;"><img id="IMAGE_ID" src="test"></span>'
'<span style="vertical-align: bottom; font-size: 24px;"><img id="IMAGE_ID" src="test"></span>'
);
});
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as convertPastedContentFromWord from '../../../lib/plugins/Paste/wordConverter/convertPastedContentFromWord';
import { Browser } from 'roosterjs-editor-dom';
import { Browser } from 'roosterjs-editor-dom';
import { ClipboardData, IEditor } from 'roosterjs-editor-types';
import { initEditor } from '../../TestHelper';
import { Paste } from '../../../lib/index';
Expand Down

0 comments on commit f77648f

Please sign in to comment.