Skip to content

Commit

Permalink
Merge pull request #2082 from tf/additional-initializer-entry
Browse files Browse the repository at this point in the history
Pass entry model to additional editor initializers
  • Loading branch information
tf authored Feb 23, 2024
2 parents efdfefd + 069a9f2 commit a390c00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package/src/editor/initializers/additionalInitializers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import _ from 'underscore';

import {app} from '../app';
import {editor} from '../base';
import {state} from '$state';

app.addInitializer(function(/* args */) {
var context = this;
var args = arguments;

_.each(editor.initializers, function(fn) {
fn.call(context, args);
fn.call(context, {...args, entry: state.entry});
});
});

0 comments on commit a390c00

Please sign in to comment.