diff --git a/src/EditorFactory.js b/src/EditorFactory.js index af57e08f736..c30371c22c2 100644 --- a/src/EditorFactory.js +++ b/src/EditorFactory.js @@ -49,12 +49,13 @@ const loadSyntaxHighlight = async (language) => { } } -const createEditor = ({ language, onCreate, onUpdate = () => {}, extensions, enableRichEditing, session, relativePath }) => { +const createEditor = ({ language, onCreate, onUpdate = () => {}, extensions, enableRichEditing, session, relativePath, isEmbedded = false }) => { let defaultExtensions if (enableRichEditing) { defaultExtensions = [ RichText.configure({ relativePath, + isEmbedded, component: this, extensions: [ Mention.configure({ diff --git a/src/components/Editor.vue b/src/components/Editor.vue index caa2d7727c7..90436699b9a 100644 --- a/src/components/Editor.vue +++ b/src/components/Editor.vue @@ -181,6 +181,7 @@ export default { return val }, + inject: ['isEmbedded'], props: { richWorkspace: { type: Boolean, @@ -542,6 +543,7 @@ export default { }), ], enableRichEditing: this.isRichEditor, + isEmbedded: this.isEmbedded, }) this.hasEditor = true if (!documentState && documentSource) { diff --git a/src/components/ViewerComponent.vue b/src/components/ViewerComponent.vue index 13f3a0f3246..c22c9f86d45 100644 --- a/src/components/ViewerComponent.vue +++ b/src/components/ViewerComponent.vue @@ -27,6 +27,7 @@ :active="active" :autofocus="autofocus" :share-token="shareToken" + :is-embedded="isEmbedded" :mime="mime" :show-outline-outside="showOutlineOutside" />
Object.assign(rule, { preserveWhitespace: 'full' })) }, diff --git a/src/nodes/ParagraphView.vue b/src/nodes/ParagraphView.vue index b1b7db2fba4..20efc70f7cd 100644 --- a/src/nodes/ParagraphView.vue +++ b/src/nodes/ParagraphView.vue @@ -23,10 +23,10 @@