Skip to content

Commit 3974c80

Browse files
chore: create test brancj
1 parent 0dc427b commit 3974c80

File tree

3 files changed

+103
-3
lines changed

3 files changed

+103
-3
lines changed

demos/html/ckeditor5/index.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,41 @@
66
<script src="https://www.wiris.net/demo/plugins/app/WIRISplugins.js?viewer=image"></script>
77
</head>
88
<body>
9+
<header class="header">
10+
<h1 class="header_title" id="header_title_name">&nbsp;</h1>
11+
<div class="header_versions">
12+
<ul class="header_versions_content">
13+
<li class="header_versions_content-position" id="version_editor"></li>
14+
<li class="header_versions_content-position" id="version_wiris">Mathtype:</li>
15+
<li class="header_versions_content-position" id="git_branch"></li>
16+
<li class="header_versions_content-position" id="git_commit"></li>
17+
</ul>
18+
</div>
19+
</header>
20+
<div id="editor">
21+
<!-- Default content of the editor div is loaded through imports.js -->
22+
</div>
23+
<div id="editor2">
24+
<!-- Default content of the editor div is loaded through imports.js -->
25+
</div>
26+
<div id="editor3">
27+
<!-- Default content of the editor div is loaded through imports.js -->
28+
</div>
29+
<div class="revision-history" id="editor-revision-history">
30+
<div class="revision-history__wrapper">
31+
<div class="revision-history__editor" id="editor-revision-history-editor"></div>
32+
<div class="revision-history__sidebar" id="editor-revision-history-sidebar"></div>
33+
</div>
34+
</div>
35+
<div class="actions">
36+
<a class="btn btn_update-distances btn_update-display" id="btn_update" href="#" data-testid="demo-update-button"
37+
>UPDATE</a
38+
>
39+
</div>
40+
<div class="transform" id="transform_content"></div>
41+
942
<script src="./dist/demo.js"></script>
43+
1044
</body>
1145
</html>
46+

demos/html/ckeditor5/src/app.js

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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
61126
document.getElementById("btn_update").addEventListener("click", (e) => {
62127
e.preventDefault();
63128
Generic.updateContent(window.editor.getData(), "transform_content");

packages/res/demos/imports.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ export * from "./common.js";
77

88
// Display html content.
99
// We force the use of html-loader, for angular and react applications.
10-
const htmlModule = require("html-loader!./index.html");
10+
// const htmlModule = require("html-loader!./index.html");
1111

1212
// Since html-loader versions 2.0.0, it returns a module with its default valude beeing the html.
13-
const htmlBody = htmlModule.default;
14-
document.body.innerHTML = htmlBody;
13+
// const htmlBody = htmlModule.default;
14+
// document.body.innerHTML = htmlBody;
1515

1616
// Generate scripts.
1717
const jsDemoImagesTransform = document.createElement("script");

0 commit comments

Comments
 (0)