@@ -58,6 +58,71 @@ ClassicEditor.create(document.querySelector("#editor"), {
5858 console . error ( error . stack ) ; //eslint-disable-line
5959 } ) ;
6060
61+ ClassicEditor . create ( document . querySelector ( "#editor2" ) , {
62+ plugins : [ Essentials , Paragraph , Bold , Italic , MathType , Alignment , SourceEditing ] ,
63+ toolbar : [
64+ "bold" ,
65+ "italic" ,
66+ "MathType" ,
67+ "ChemType" ,
68+ "alignment:left" ,
69+ "alignment:center" ,
70+ "alignment:right" ,
71+ "sourceEditing" ,
72+ ] ,
73+ // language: 'de',
74+ // mathTypeParameters: {
75+ // editorParameters: { language: 'es' }, // MathType config, including language
76+ // },
77+ } )
78+ . then ( ( editor ) => {
79+ window . editor = editor ;
80+ // Add listener on click button to launch updateContent function.
81+ // document.getElementById('btn_update').addEventListener('click', (e) => {
82+ // e.preventDefault();
83+ // Generic.updateContent(editor.getData(), 'transform_content');
84+ // });
85+
86+ // Get and set the editor and wiris versions in this order.
87+ Generic . setEditorAndWirisVersion ( "5.0.0" , packageInfo . version ) ;
88+ editor . editing . view . focus ( ) ;
89+ } )
90+ . catch ( ( error ) => {
91+ console . error ( error . stack ) ; //eslint-disable-line
92+ } ) ;
93+
94+ ClassicEditor . create ( document . querySelector ( "#editor3" ) , {
95+ plugins : [ Essentials , Paragraph , Bold , Italic , MathType , Alignment , SourceEditing ] ,
96+ toolbar : [
97+ "bold" ,
98+ "italic" ,
99+ "MathType" ,
100+ "ChemType" ,
101+ "alignment:left" ,
102+ "alignment:center" ,
103+ "alignment:right" ,
104+ "sourceEditing" ,
105+ ] ,
106+ // language: 'de',
107+ // mathTypeParameters: {
108+ // editorParameters: { language: 'es' }, // MathType config, including language
109+ // },
110+ } )
111+ . then ( ( editor ) => {
112+ window . editor = editor ;
113+ // Add listener on click button to launch updateContent function.
114+ // document.getElementById('btn_update').addEventListener('click', (e) => {
115+ // e.preventDefault();
116+ // Generic.updateContent(editor.getData(), 'transform_content');
117+ // });
118+
119+ // Get and set the editor and wiris versions in this order.
120+ Generic . setEditorAndWirisVersion ( "5.0.0" , packageInfo . version ) ;
121+ editor . editing . view . focus ( ) ;
122+ } )
123+ . catch ( ( error ) => {
124+ console . error ( error . stack ) ; //eslint-disable-line
125+ } ) ; s
61126document . getElementById ( "btn_update" ) . addEventListener ( "click" , ( e ) => {
62127 e . preventDefault ( ) ;
63128 Generic . updateContent ( window . editor . getData ( ) , "transform_content" ) ;
0 commit comments