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

CodeEditor stays blank #277

Closed
valegnr opened this issue Jan 4, 2025 · 2 comments · Fixed by #279
Closed

CodeEditor stays blank #277

valegnr opened this issue Jan 4, 2025 · 2 comments · Fixed by #279

Comments

@valegnr
Copy link

valegnr commented Jan 4, 2025

Hi,
i am having trouble with the editor widget. When i run the example code

using Bonito
using Observables
using Hyperscript
Bonito.browser_display()

app = App() do session::Session
    editor = CodeEditor("julia"; initial_source="""1 + 1""")
    eval_button = Button("eval")
    output = Observable(DOM.div())
    on(eval_button) do click
        src = editor.onchange[]
        result = eval(Bonito.parseall(src))
        output[] = DOM.div(result)
    end
    return DOM.div(editor, eval_button, output)
end

server = Server("localhost",8081)

route!(server,"/" => app)

the Editor does not show any code. I had it already running in some older version but now it stopped working with Bonito 4.0. I tested it under both chrome and Firefox (the OS is Opensuse Tumbleweed). Also "markdown" als laguage does not change anything. The Browser Console does not show any error logs.
Thanks in advance!

@valegnr
Copy link
Author

valegnr commented Jan 5, 2025

I found the last version that works for me. It is v3.1. I hope this helps in case i am not the only one having this problem.

@SimonDanisch
Copy link
Owner

I found the problem: #279
Not really sure why this stopped working between versions ...

@SimonDanisch SimonDanisch linked a pull request Jan 5, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants