-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Extract CSS on editor build * Add demo ck-content usage
- Loading branch information
1 parent
850388c
commit feea621
Showing
4 changed files
with
233 additions
and
29 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,20 +9,25 @@ | |
margin: 20px auto; | ||
} | ||
</style> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css"> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" | ||
/> | ||
<link rel="stylesheet" href="../build/ckeditor.css" /> | ||
</head> | ||
<body> | ||
<h2>CKEditor 5 – edit</h2> | ||
|
||
<div id="editor"> | ||
Initial <strong>content</strong> of | ||
<mark class="marker-yellow">editor</mark> | ||
<mark class="marker-blue">editor</mark> | ||
</div> | ||
|
||
<h2>CKEditor 5 – view</h2> | ||
<div id="view" class="ck-editor"> | ||
<div id="view" class="ck-content"> | ||
Initial <strong>content</strong> of | ||
<mark class="marker-yellow">editor</mark> | ||
<mark class="marker-blue">editor</mark> | ||
<code>code</code> | ||
</div> | ||
|
||
<h2>Formula rendering from markup</h2> | ||
|
@@ -31,7 +36,7 @@ <h2>Formula rendering from markup</h2> | |
</div> | ||
|
||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js"></script> | ||
<script src="../build/ckeditor.js"></script> | ||
<script src="../build/translations/en.js"></script> | ||
<script src="../build/translations/es.js"></script> | ||
|
@@ -40,16 +45,14 @@ <h2>Formula rendering from markup</h2> | |
console.log( | ||
CustomCKEditor.builtinPlugins.map((plugin) => plugin.pluginName) | ||
); | ||
CustomCKEditor | ||
.create(document.querySelector("#editor"), { | ||
language: "de" | ||
}). | ||
catch(error => { | ||
console.error(error); | ||
}); | ||
CustomCKEditor.create(document.querySelector("#editor"), { | ||
language: "de", | ||
}).catch((error) => { | ||
console.error(error); | ||
}); | ||
|
||
const preview = document.getElementById('formulas'); | ||
renderMathInElement(preview); | ||
const preview = document.getElementById("formulas"); | ||
renderMathInElement(preview); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters