Skip to content

Commit

Permalink
Merge pull request #77 from lblod/feature/add-chrome-hacks-plugin
Browse files Browse the repository at this point in the history
Add chrome and firefox hacks plugin and last key pressed plugin
  • Loading branch information
lagartoverde authored May 4, 2023
2 parents be5dee5 + 6723178 commit 864f1ca
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/components/rdfa-editor-container.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</:top>
<:default>
<Editor
@plugins={{@plugins}}
@plugins={{this.plugins}}
@schema={{@schema}}
@nodeViews={{@nodeViews}}
@rdfaEditorInit={{this.rdfaEditorInit}}
Expand Down
12 changes: 12 additions & 0 deletions app/components/rdfa-editor-container.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import Component from '@glimmer/component';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
import { firefoxCursorFix } from '@lblod/ember-rdfa-editor/plugins/firefox-cursor-fix';
import { lastKeyPressedPlugin } from '@lblod/ember-rdfa-editor/plugins/last-key-pressed';
import { chromeHacksPlugin } from '@lblod/ember-rdfa-editor/plugins/chrome-hacks-plugin';

export default class RdfaEditorContainerComponent extends Component {
@tracked editor;
Expand All @@ -25,6 +28,15 @@ export default class RdfaEditorContainerComponent extends Component {
};
}

get plugins() {
const plugins = this.args.plugins || [];
return plugins.concat(
firefoxCursorFix(),
lastKeyPressedPlugin,
chromeHacksPlugin()
);
}

get vocab() {
return this.documentContext['vocab'];
}
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@lblod/ember-acmidm-login": "^2.0.0-beta.1",
"@lblod/ember-environment-banner": "^0.2.0",
"@lblod/ember-mock-login": "^0.7.0",
"@lblod/ember-rdfa-editor": "^3.5.0",
"@lblod/ember-rdfa-editor": "^3.6.0",
"@lblod/ember-rdfa-editor-lblod-plugins": "^4.0.2",
"@release-it-plugins/lerna-changelog": "github:release-it-plugins/lerna-changelog",
"babel-eslint": "^10.1.0",
Expand Down

0 comments on commit 864f1ca

Please sign in to comment.