Skip to content

Commit 93a2294

Browse files
momesginMo Mesgin
and
Mo Mesgin
authored
Fix rendering raw html content (#11764)
* fix rendering string instead of html * fix rendering raw html on tooltips by global configuration * lint --------- Co-authored-by: Mo Mesgin <[email protected]>
1 parent dcf16d3 commit 93a2294

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

jest.setup.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { createApp } from 'vue';
33
import { config } from '@vue/test-utils';
44
import i18n from '@shell/plugins/i18n';
55
import FloatingVue from 'floating-vue';
6+
import { floatingVueOptions } from '@shell/plugins/floating-vue';
67
import vSelect from 'vue-select';
78
import cleanTooltipDirective from '@shell/directives/clean-tooltip';
89
import cleanHtmlDirective from '@shell/directives/clean-html';
@@ -16,7 +17,7 @@ global.TextDecoder = TextDecoder;
1617

1718
// vueApp.config.productionTip = false;
1819
vueApp.use(i18n, { store: { dispatch() {} } });
19-
vueApp.use(FloatingVue);
20+
vueApp.use(FloatingVue, floatingVueOptions);
2021
vueApp.directive('clean-html', cleanHtmlDirective);
2122
vueApp.directive('clean-tooltip', cleanTooltipDirective);
2223
vueApp.component('v-select', vSelect);

shell/initialize/install-plugins.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ import emberCookie from '@shell/plugins/ember-cookie';
3030
import ShortKey from '@shell/plugins/shortkey';
3131

3232
import 'floating-vue/dist/style.css';
33+
import { floatingVueOptions } from '@shell/plugins/floating-vue';
3334

3435
export async function installPlugins(vueApp) {
3536
vueApp.use(globalFormatters);
3637
vueApp.use(PortalVue);
3738
vueApp.use(VueResize);
38-
vueApp.use(FloatingVue);
39+
vueApp.use(FloatingVue, floatingVueOptions);
3940
vueApp.use(ShortKey, { prevent: ['input', 'textarea', 'select'] });
4041
vueApp.use(InstallCodemirro);
4142
vueApp.component('v-select', vSelect);

shell/plugins/floating-vue.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const floatingVueOptions = { themes: { tooltip: { html: true } } };

storybook/.storybook/preview.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { setup } from '@storybook/vue3';
22
import vSelect from 'vue-select';
33
import FloatingVue from 'floating-vue';
4+
import { floatingVueOptions } from '@shell/plugins/floating-vue';
45
import { themes } from '@storybook/theming';
56
import installShortcut from './theme-shortcut';
67
import withEvents from 'storybook-auto-events';
@@ -14,7 +15,7 @@ import i18n from '../../shell/plugins/i18n';
1415

1516
setup((vueApp) => {
1617
vueApp.use(i18n, { store: { dispatch() {} } });
17-
vueApp.use(FloatingVue);
18+
vueApp.use(FloatingVue, floatingVueOptions);
1819
vueApp.directive('clean-html', cleanHtmlDirective);
1920
vueApp.directive('clean-tooltip', cleanTooltipDirective);
2021
vueApp.component('v-select', vSelect);

0 commit comments

Comments
 (0)