From a10939703542162878ce4528592374b56cd177b9 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 3 Jan 2018 17:02:41 -0500 Subject: [PATCH] Add extensibility point for d-editor --- .../templates/components/composer-editor.hbs | 36 ++++++++++--------- .../templates/components/d-editor.hbs | 3 +- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/app/assets/javascripts/discourse/templates/components/composer-editor.hbs b/app/assets/javascripts/discourse/templates/components/composer-editor.hbs index 006cd5eddc8..a118ad5841f 100644 --- a/app/assets/javascripts/discourse/templates/components/composer-editor.hbs +++ b/app/assets/javascripts/discourse/templates/components/composer-editor.hbs @@ -1,20 +1,22 @@ -{{d-editor tabindex="4" - value=composer.reply - placeholder="composer.reply_placeholder" - previewUpdated="previewUpdated" - markdownOptions=markdownOptions - extraButtons="extraButtons" - importQuote="importQuote" - showUploadModal="showUploadModal" - togglePreview="togglePreview" - validation=validation - loading=composer.loading - forcePreview=forcePreview - composerEvents=true - onExpandPopupMenuOptions="onExpandPopupMenuOptions" - onPopupMenuAction=onPopupMenuAction - popupMenuOptions=popupMenuOptions}} +{{d-editor + tabindex="4" + value=composer.reply + placeholder="composer.reply_placeholder" + previewUpdated="previewUpdated" + markdownOptions=markdownOptions + extraButtons="extraButtons" + importQuote="importQuote" + showUploadModal="showUploadModal" + togglePreview="togglePreview" + validation=validation + loading=composer.loading + forcePreview=forcePreview + composerEvents=true + onExpandPopupMenuOptions="onExpandPopupMenuOptions" + onPopupMenuAction=onPopupMenuAction + popupMenuOptions=popupMenuOptions + outletArgs=(hash composer=composer editorType="composer")}} {{#if site.mobileView}} - + {{/if}} diff --git a/app/assets/javascripts/discourse/templates/components/d-editor.hbs b/app/assets/javascripts/discourse/templates/components/d-editor.hbs index 6133b28f8fc..06c636c2b7c 100644 --- a/app/assets/javascripts/discourse/templates/components/d-editor.hbs +++ b/app/assets/javascripts/discourse/templates/components/d-editor.hbs @@ -41,13 +41,14 @@ {{conditional-loading-spinner condition=loading}} {{textarea tabindex=tabindex value=value class="d-editor-input" placeholder=placeholderTranslated}} {{popup-input-tip validation=validation}} + {{plugin-outlet name="after-d-editor" tagName="" args=outletArgs}}
{{{preview}}}
- {{plugin-outlet name="editor-preview" classNames="d-editor-plugin"}} + {{plugin-outlet name="editor-preview" classNames="d-editor-plugin"}}