From edbb403171d021df357023707fadb58e80996fa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomek=20Su=C5=82kowski?= Date: Wed, 17 Jul 2024 13:37:11 +0200 Subject: [PATCH] docs(docs-infra): add open in StackBlitz button to code editor (#57018) PR Close #57018 --- adev/BUILD.bazel | 1 + .../code-editor/code-editor.component.html | 8 ++++ .../code-editor/code-editor.component.ts | 19 +++++++- .../editor/stackblitz-opener.service.spec.ts | 24 ++++++++++ .../app/editor/stackblitz-opener.service.ts | 46 +++++++++++++++++++ package.json | 5 +- yarn.lock | 5 ++ 7 files changed, 105 insertions(+), 3 deletions(-) create mode 100644 adev/src/app/editor/stackblitz-opener.service.spec.ts create mode 100644 adev/src/app/editor/stackblitz-opener.service.ts diff --git a/adev/BUILD.bazel b/adev/BUILD.bazel index d7b3eca7300..a1db50e081d 100644 --- a/adev/BUILD.bazel +++ b/adev/BUILD.bazel @@ -78,6 +78,7 @@ APPLICATION_DEPS = [ "@npm//@lezer/highlight", "@npm//@lezer/javascript", "@npm//@lezer/common", + "@npm//@stackblitz/sdk", "@npm//@xterm/xterm", "@npm//@xterm/addon-fit", "@npm//algoliasearch", diff --git a/adev/src/app/editor/code-editor/code-editor.component.html b/adev/src/app/editor/code-editor/code-editor.component.html index 7281d5c04b5..2f3adf1e5f8 100644 --- a/adev/src/app/editor/code-editor/code-editor.component.html +++ b/adev/src/app/editor/code-editor/code-editor.component.html @@ -65,6 +65,14 @@ +