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

Nothing displayed when following documentation #30

Open
thardy opened this issue Jul 1, 2021 · 3 comments
Open

Nothing displayed when following documentation #30

thardy opened this issue Jul 1, 2021 · 3 comments
Labels

Comments

@thardy
Copy link

thardy commented Jul 1, 2021

I setup a simple example following your instructions to the letter, and nothing displays for...

<ace [config]="config" [mode]="'text'" [theme]="'github'" [(value)]="content"></ace>

After hours of troubleshooting, the minimum change I can make that caused something to finally show up in the browser is the following...
<ace style="height: 200px;" [config]="config" [mode]="'text'" [theme]="'github'" [(value)]="content"></ace>

This is in a brand new @angular/cli generated app (Angular 12) with zero styling - my styles.scss is completely empty and so is the component .scss file.

Why does this component not work out of the box?

@sconix sconix added the question label Jul 6, 2021
@sconix
Copy link
Contributor

sconix commented Jul 6, 2021

It works if you have correctly wrapped it. There can not be a html block that needs height that works in all situations. This component defaults to modern flex box styling hence you need to have some layout styles in you component or otherwise you need to define fixed height for it.

@Robin-Lord
Copy link

Robin-Lord commented Jan 17, 2023

I'm facing a similar problem - when I follow the instructions I don't see anything in where the ace editor should be.

I've tried styling it as height 200px and display block but then I just get an empty box and when I inspect element - the ace editor object seems to be empty (see attached). Not seeing any build errors or errors in console. Any help would be really appreciated!

Screenshot 2023-01-18 at 08 26 32

@mathias-ewald
Copy link

mathias-ewald commented Sep 19, 2023

Can someone provide an example, please?

This example renders the ace component at full size, but there's not content:

<div style="flex: 1 1 100%; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch;">
    <ace style="flex: 1 1 100%;"
        [config]="{ fontSize: '12pt' }" 
        [mode]="'text'" 
        [theme]="'github'" 
        [(value)]="code">
    </ace>    
</div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants