diff options
author | Ferdinand Thiessen <rpm@fthiessen.de> | 2022-06-29 21:06:43 +0300 |
---|---|---|
committer | Jonas <jonas@freesources.org> | 2022-07-04 10:43:05 +0300 |
commit | d26ed3222cfe338d111a3d4b673c2043930c05d5 (patch) | |
tree | 38a5e3603389b5084c8749ef8df67d3b5afef408 /src/components/PlainTextReader.vue | |
parent | 014f73fced8c39475f5cc1be9fdcef75e23a5172 (diff) |
BaseReader: Use a factory pattern for creating the extension list
Provide functions are neither called on the providing object nor
on the injecting object, so using `this` within provided functions
will refer to the global `this` for which `$emit` is not defined.
This uses a factory pattern so that `this` is bound to the injecting
object.
Also forwarding the `click-link` event is needed.
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
Diffstat (limited to 'src/components/PlainTextReader.vue')
-rw-r--r-- | src/components/PlainTextReader.vue | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/PlainTextReader.vue b/src/components/PlainTextReader.vue index 6d2ccf7a7..5d01acad7 100644 --- a/src/components/PlainTextReader.vue +++ b/src/components/PlainTextReader.vue @@ -37,7 +37,7 @@ export default { renderHtml(content) { return '<pre>' + escapeHtml(content) + '</pre>' }, - extensions: [PlainText], + extensions: () => [PlainText], }, props: { |