@@ -310,54 +310,6 @@ export function buildForEditor(options) {
310310 } ;
311311}
312312
313- /**
314- * @param {WysiwygConfigOptions } options
315- * @return {RawEditorOptions }
316- */
317- export function buildForInput ( options ) {
318- // Set language
319- window . tinymce . addI18n ( options . language , options . translationMap ) ;
320-
321- // BookStack Version
322- const version = document . querySelector ( 'script[src*="/dist/app.js"]' ) . getAttribute ( 'src' ) . split ( '?version=' ) [ 1 ] ;
323-
324- // Return config object
325- return {
326- width : '100%' ,
327- height : '185px' ,
328- target : options . containerElement ,
329- cache_suffix : `?version=${ version } ` ,
330- content_css : [
331- window . baseUrl ( '/dist/styles.css' ) ,
332- ] ,
333- branding : false ,
334- skin : options . darkMode ? 'tinymce-5-dark' : 'tinymce-5' ,
335- body_class : 'wysiwyg-input' ,
336- browser_spellcheck : true ,
337- relative_urls : false ,
338- language : options . language ,
339- directionality : options . textDirection ,
340- remove_script_host : false ,
341- document_base_url : window . baseUrl ( '/' ) ,
342- end_container_on_empty_block : true ,
343- remove_trailing_brs : false ,
344- statusbar : false ,
345- menubar : false ,
346- plugins : 'link autolink lists' ,
347- contextmenu : false ,
348- toolbar : 'bold italic link bullist numlist' ,
349- content_style : getContentStyle ( options ) ,
350- file_picker_types : 'file' ,
351- valid_elements : 'p,a[href|title|target],ol,ul,li,strong,em,br' ,
352- file_picker_callback : filePickerCallback ,
353- init_instance_callback ( editor ) {
354- addCustomHeadContent ( editor . getDoc ( ) ) ;
355-
356- editor . contentDocument . documentElement . classList . toggle ( 'dark-mode' , options . darkMode ) ;
357- } ,
358- } ;
359- }
360-
361313/**
362314 * @typedef {Object } WysiwygConfigOptions
363315 * @property {Element } containerElement
0 commit comments