tui.image-editor icon indicating copy to clipboard operation
tui.image-editor copied to clipboard

fontFamily should be configurable

Open OR13 opened this issue 2 years ago • 6 comments

Version

    "@toast-ui/react-image-editor": "^3.15.2",

Development Environment

macOS / chrome.

Current Behavior

https://github.com/nhn/tui.image-editor/blob/338d7b18b6b6a52962f042e31e46638d88683c4a/apps/image-editor/src/js/action.js#L618

Expected Behavior

Expect to be able to configure font family defaults when editor is initialized.

OR13 avatar Jun 19 '22 19:06 OR13

I used this work around:

 editor.on("objectActivated", function (props: any) {
        setTimeout(() => {
          if (props.fontFamily !== defaultFontFamily) {
            editor.changeTextStyle(props.id, {
              fontFamily: defaultFontFamily,
            });
          }
        }, 500);
      });

OR13 avatar Jun 19 '22 20:06 OR13

@OR13 Is it only added to react-image-editor?

lja1018 avatar Jul 13 '22 07:07 lja1018

My work around is only for the editor.

OR13 avatar Jul 13 '22 12:07 OR13

@OR13 You mean not only react-image-editor but also image-editor core, right?

lja1018 avatar Jul 14 '22 02:07 lja1018

Yes, I think so.

OR13 avatar Jul 14 '22 04:07 OR13

@OR13 Thank you for the report. I'll add it to TODO.

lja1018 avatar Aug 02 '22 01:08 lja1018