Skip to content

SDL3 Clipboard support in Emscripten #13785

@willmh93

Description

@willmh93

Here is a fairly minimal example (SDL3 + imgui). Clipboard works fine in native builds, but not Emscripten.

https://github.com/willmh93/SDL3_emscripten_imgui

git clone --recursive https://github.com/willmh93/SDL3_emscripten_imgui.git
cd SDL3_emscripten_imgui
emcmake cmake -B build -G Ninja
cmake --build build
emrun build/my_app.html --port 8000

I could swear I had it working just a month ago, but now the functions SDL_SetClipboardText / SDL_GetClipboardText (which ImGui calls under the hood) do nothing for me. I can't tell if this is due to a change in my environment or an SDL bug.

Does anyone have a working example they wouldn't mind sharing? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions