111111 </floating-menu >
112112
113113 <div class =" bard-error" v-if =" initError" v-html =" initError" ></div >
114- <editor-content :editor =" editor" v-show =" !showSource" :id =" fieldId" />
115- <bard-source :html =" htmlWithReplacedLinks" v-if =" showSource" />
114+ <editor-content :editor =" editor" :id =" fieldId" />
116115 </div >
117116 <div
118117 class =" bard-footer-toolbar"
@@ -164,7 +163,6 @@ import Text from '@tiptap/extension-text';
164163import TextAlign from ' @tiptap/extension-text-align' ;
165164import Typography from ' @tiptap/extension-typography' ;
166165import Underline from ' @tiptap/extension-underline' ;
167- import BardSource from ' ./Source.vue' ;
168166import SetPicker from ' ../replicator/SetPicker.vue' ;
169167import { DocumentBlock , DocumentInline } from ' ./Document' ;
170168import { Set } from ' ./Set' ;
@@ -186,7 +184,6 @@ export default {
186184
187185 components: {
188186 BubbleMenu,
189- BardSource,
190187 BardToolbarButton,
191188 SetPicker,
192189 EditorContent,
@@ -206,7 +203,6 @@ export default {
206203 editor: null ,
207204 html: null ,
208205 json: [],
209- showSource: false ,
210206 fullScreenMode: false ,
211207 buttons: [],
212208 collapsed: this .meta .collapsed ,
@@ -225,10 +221,6 @@ export default {
225221 },
226222
227223 computed: {
228- allowSource () {
229- return this .config .allow_source === undefined ? true : this .config .allow_source ;
230- },
231-
232224 toolbarIsFixed () {
233225 return this .config .toolbar_mode === ' fixed' ;
234226 },
@@ -238,11 +230,11 @@ export default {
238230 },
239231
240232 showFixedToolbar () {
241- return this .toolbarIsFixed && (this .visibleButtons .length > 0 || this .allowSource || this . hasExtraButtons );
233+ return this .toolbarIsFixed && (this .visibleButtons .length > 0 || this .hasExtraButtons );
242234 },
243235
244236 hasExtraButtons () {
245- return this .allowSource || this . setConfigs .length > 0 || this .config .fullscreen ;
237+ return this .setConfigs .length > 0 || this .config .fullscreen ;
246238 },
247239
248240 readingTime () {
@@ -302,18 +294,6 @@ export default {
302294 return this .storeState ? this .storeState .site : this .$config .get (' selectedSite' );
303295 },
304296
305- htmlWithReplacedLinks () {
306- return this .html .replaceAll (/ \" statamic:\/\/ (. *? )\" / g , (match , ref ) => {
307- const linkData = this .meta .linkData [ref];
308- if (! linkData) {
309- this .$toast .error (` ${ __ (' No link data found for' )} ${ ref} ` );
310- return ' ""' ;
311- }
312-
313- return ` "${ linkData .permalink } "` ;
314- });
315- },
316-
317297 setsWithErrors () {
318298 if (! this .storeState ) return [];
319299
@@ -395,12 +375,6 @@ export default {
395375 visibleWhenReadOnly: true ,
396376 visible: this .config .fullscreen ,
397377 },
398- {
399- title: __ (' Show HTML Source' ),
400- run : () => (this .showSource = ! this .showSource ),
401- visibleWhenReadOnly: true ,
402- visible: this .allowSource ,
403- },
404378 ];
405379 },
406380 },
0 commit comments