Skip to content

Commit 67c12e0

Browse files
authored
Pass replacement container to onPreview event
Allows clean async preview implementation with minimal changes to the code base.
1 parent ae5d620 commit 67c12e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/bootstrap-markdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@
565565
this.disableButtons('all').enableButtons('cmdPreview');
566566

567567
// Try to get the content from callback
568-
callbackContent = options.onPreview(this);
568+
callbackContent = options.onPreview(this, replacementContainer);
569569
// Set the content based from the callback content if string otherwise parse value from textarea
570570
content = typeof callbackContent == 'string' ? callbackContent : this.parseContent();
571571

0 commit comments

Comments
 (0)