ajaxorg / ajaxorg/ace

Renderer: setGhostText not respecting Padding

Open
#5,821 3 comments 0 reactions 0 assignees View on GitHub
bug p1
Dominant language
JavaScript
Stars
27.1k
Forks
5.3k
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug

When the editor has padding and you use `editor.setGhostText()` the ghost text renders at the left margin, rather than at the padded location.

![Image](https://github.com/user-attachments/assets/60f96dee-791e-48bf-9722-1e368384b9a2)

### Expected Behavior

Ghost text should flow in the same space as the editor text and in this case respect the padding set on the editor.

### Current Behavior

see image

### Reproduction Steps

see image

* Open Kitchen Sink (in Markdown mode)
* `editor.renderer.setPadding(100)`
* `editor.setGhostText("Some long text that will wrap across multiple lines")`

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### Ace Version / Browser / OS / Keyboard layout

1.41 (latest online version)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.