Skip to content
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

tui-image-editor not showing properly #831

Open
AkylbekSul opened this issue Dec 9, 2022 · 3 comments
Open

tui-image-editor not showing properly #831

AkylbekSul opened this issue Dec 9, 2022 · 3 comments

Comments

@AkylbekSul
Copy link

AkylbekSul commented Dec 9, 2022

Summary
tui-image-editor not showing properly in Vanilla.js. Why? What am I doing wrong?
Screenshots
image

Version
3.15.3

Additional context
code:

import "./styles.css";

var ImageEditor = require("tui-image-editor");
var FileSaver = require("file-saver"); //to download edited image to local. Use after npm install file-saver
// var blackTheme = require("darktheme");
var locale_ru_RU = {
  // override default English locale to your custom
  Crop: "Обзрезать",
  "Delete-all": "Удалить всё"
  // etc...
};
var instance = new ImageEditor(document.querySelector("#tui-image-editor"), {
  includeUI: {
    loadImage: {
      path: "img/sampleImage.jpg",
      name: "SampleImage"
    },
    locale: locale_ru_RU,
    // theme: blackTheme, // or whiteTheme
    initMenu: "filter",
    menuBarPosition: "bottom"
  },
  cssMaxWidth: 700,
  cssMaxHeight: 500,
  selectionStyle: {
    cornerSize: 20,
    rotatingPointOffset: 70
  }
});

sandbox where I got this result https://ryy3zx.csb.app

@AkylbekSul AkylbekSul changed the title tui-image-editor not showing properly in Vanilla.js tui-image-editor not showing properly Dec 9, 2022
@NadimD
Copy link

NadimD commented Dec 12, 2022

I'm having the same issue and in the meantime I did a workaround, not sure if this is right though.

I use SASS and did like below. I also had to make sure that scoped is not included in the style definition, or else the CSS would not show up.

<style lang="sass">
@import "~tui-image-editor/dist/tui-image-editor.min" // import css file from node_modules folder
</style>

@lja1018
Copy link
Contributor

lja1018 commented Dec 22, 2022

@AkylbekSul
The css load is required. The following CDN are available.

<link
  rel="stylesheet"
  href="https://uicdn.toast.com/tui-image-editor/latest/tui-image-editor.css"
/>

@stale
Copy link

stale bot commented Jun 18, 2023

This issue has been automatically marked as inactive because there hasn’t been much going on it lately. It is going to be closed after 7 days. Thanks!

@stale stale bot added the inactive label Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants