tinymce / tinymce-docs

TinyMCE Documentation
https://www.tiny.cloud/docs/
Other
87 stars 221 forks source link

Unable to find the replacement for the resizeTo method in the "Migrating from TinyMCE 4 to TinyMCE 5" guide #1938

Open bam65y opened 3 years ago

bam65y commented 3 years ago

This is the link https://www.tiny.cloud/docs/migration-from-4x/

tylerkelly13 commented 3 years ago

Hi @bam65y,

I'd like to leave this ticket open until I get a chance to add this information to the Migration guide. To help you out, I'll quote the response from https://github.com/tinymce/tinymce/issues/6501#issuecomment-780293897

To be able to dynamically resize the editor, the recommended approach is to set the editor configuration to use width: '100%' and height: '100%'. The editor target element can then be wrapped in a container e.g. div and the height and width can be set on the container. TinyMCE will dynamically resize to fit its container element.

Here is a Fiddle demonstrating this approach: https://fiddle.tiny.cloud/k5haab.

Let me know if this helps you out, if not, please provide more information about the use-case.

Tyler