Skip to content

Commit

Permalink
Lua widgets: support inline for HTML widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
zefhemel committed Oct 15, 2024
1 parent 6ec6f0c commit 2842183
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions web/cm_plugins/lua_widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ export class LuaWidget extends WidgetType {
if (widgetContent.html) {
html = widgetContent.html;
div.innerHTML = html;
if ((widgetContent as any)?.display === "block") {
div.style.display = "block";
} else {
div.style.display = "inline";
}
attachWidgetEventHandlers(div, this.client);
this.client.setWidgetCache(
this.cacheKey,
Expand Down

0 comments on commit 2842183

Please sign in to comment.