Tui.image-editor: TextArea is not resizing

Created on 19 Dec 2018  路  4Comments  路  Source: nhn/tui.image-editor

Version

3.3.0

Development Environment

Chrome Firefox, ubuntu

Current Behavior

You can found current behavior even in the examples. (so I use same api methods).
http://nhnent.github.io/tui.image-editor/latest/tutorial-example02-useApiDirect.html

steps to reproduce:

  1. add text object with addText method.
  2. double click to enter editing mode
  3. start typing
    You can see that textarea width is not resizing while typing, and tail signs became hidden.

Expected Behavior

Textarea width resizing by the content.
The proper behavior is expected just like in example with includeUI.
https://nhnent.github.io/tui.image-editor/latest/tutorial-example01-includeUi.html (example 1).

Bug

Most helpful comment

Found the problem. It has to do with IText settings when initializing the image editor. Currently, when you don't use UI, useIText is set to false. If you set that to true then the API version will use IText. I don't know the reason for setting that to false for API versions but setting that to true enables textArea resizing. Hope this helps @calvinkei @qradle @jinwoo-kim-nhn

Line 178 - imageEditor.js

https://github.com/nhn/tui.image-editor/blob/e22335d7e4fa6bc60d5b6b005d18344cdca42ace/src/js/imageEditor.js#L178

image

All 4 comments

+1, the behavior of using API directly is different from includeUI

I am having the same issue. Any updates on this or how we can update the API to use the same functionality as the UI?

If you can point me to the code that updates the Text Area width I can maybe make a local code change for a temporary workaround.

Found the problem. It has to do with IText settings when initializing the image editor. Currently, when you don't use UI, useIText is set to false. If you set that to true then the API version will use IText. I don't know the reason for setting that to false for API versions but setting that to true enables textArea resizing. Hope this helps @calvinkei @qradle @jinwoo-kim-nhn

Line 178 - imageEditor.js

https://github.com/nhn/tui.image-editor/blob/e22335d7e4fa6bc60d5b6b005d18344cdca42ace/src/js/imageEditor.js#L178

image

I'm improving this. It's almost finished. Please wait a little longer.

Was this page helpful?
0 / 5 - 0 ratings