-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IP-306: Create a new .js file for the page that will declare the Vue …
…component.
- Loading branch information
Showing
3 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
resources/assets/js/project/manage-project-problem-solutions.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import SolutionsManagement from "../vue-components/backoffice/management/solution/SolutionsManagement.vue"; | ||
import { createApp } from "vue"; | ||
import store from "../store/store"; | ||
import DOMPurify from "dompurify"; | ||
|
||
const app = createApp({ | ||
components: { | ||
SolutionsManagement, | ||
}, | ||
}); | ||
|
||
// Register the "sane-html" directive globally | ||
app.directive("sane-html", { | ||
updated(el, binding) { | ||
el.innerHTML = DOMPurify.sanitize(binding.value); | ||
}, | ||
mounted(el, binding) { | ||
el.innerHTML = DOMPurify.sanitize(binding.value); | ||
}, | ||
}); | ||
|
||
app.use(store); | ||
app.mount("#app"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters