ajaxorg / ace

Ace (Ajax.org Cloud9 Editor)
https://ace.c9.io
Other
26.69k stars 5.28k forks source link

Improve Placeholder #5526

Open MarketingPip opened 6 months ago

MarketingPip commented 6 months ago

Describe the feature

The placeholder should break lines automatically if printMarginColumn is enabled.

Use Case

This is a no brainier.

Proposed Solution

Split text by printMarginColumn size into array. Then populate line by line into ace.

Other Information

No response

Acknowledgements

ACE version used

Latest

marinsokol5 commented 5 months ago

Hey, But why not just provide splitted placeholder then?
It seems possible that some consumers might want to have marginColumn shown and still placeholder going out of it.

You can definitely say it's unlikely, and I would agree with you, but it's nice to not be too opinionated with libraries as it usually allows for more use case implementations.

MarketingPip commented 5 months ago

@marinsokol5 - add a flag possibly "placeHolderMargin" with it set to default by true then 🤷‍♂️

marinsokol5 commented 5 months ago

Yeah that's fair, we can consider this as an Ace option 👍🏻.