debian-mirror-gitlab/app/assets/javascripts/notebook/cells/output/html.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
932 B
Vue
Raw Normal View History

2018-03-17 18:26:18 +05:30
<script>
2021-02-22 17:27:13 +05:30
import { GlSafeHtmlDirective } from '@gitlab/ui';
2018-12-13 13:39:08 +05:30
import Prompt from '../prompt.vue';
2018-03-17 18:26:18 +05:30
2018-12-13 13:39:08 +05:30
export default {
components: {
2019-03-02 22:35:43 +05:30
Prompt,
2018-12-13 13:39:08 +05:30
},
2021-02-22 17:27:13 +05:30
directives: {
SafeHtml: GlSafeHtmlDirective,
},
2018-12-13 13:39:08 +05:30
props: {
2019-03-02 22:35:43 +05:30
count: {
type: Number,
required: true,
},
2018-12-13 13:39:08 +05:30
rawCode: {
type: String,
required: true,
2018-03-17 18:26:18 +05:30
},
2019-03-02 22:35:43 +05:30
index: {
type: Number,
required: true,
},
2018-12-13 13:39:08 +05:30
},
computed: {
2019-03-02 22:35:43 +05:30
showOutput() {
return this.index === 0;
},
2018-12-13 13:39:08 +05:30
},
2021-11-11 11:23:49 +05:30
safeHtmlConfig: {
ADD_TAGS: ['use'], // to support icon SVGs
2022-02-05 19:09:49 +05:30
FORBID_TAGS: ['style'],
FORBID_ATTR: ['style'],
ALLOW_DATA_ATTR: false,
2021-11-11 11:23:49 +05:30
},
2018-12-13 13:39:08 +05:30
};
2018-03-17 18:26:18 +05:30
</script>
2017-08-17 22:00:37 +05:30
<template>
<div class="output">
2019-03-02 22:35:43 +05:30
<prompt type="Out" :count="count" :show-output="showOutput" />
2022-09-01 20:07:04 +05:30
<iframe
sandbox
:srcdoc="rawCode"
frameborder="0"
scrolling="no"
width="100%"
class="gl-overflow-auto"
></iframe>
2017-08-17 22:00:37 +05:30
</div>
</template>