-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#46 Convert to DLL compatible plugin #83
Conversation
Wow! This is impressive! cc'ing @isaul32 as well |
a435ce3
to
457ee76
Compare
This is a awesome feature. Could you @tony do the merge and release? Thanks very much. |
@isaul32 Sounds good. I will look at it this weekend (or next weekend if this one is busy) |
@DanielKulbe This will need another rebase (smaller bugfix to master) |
@DanielKulbe Give this a rebase? |
@DanielKulbe This is very good. wow! Some issues we need to look at, consider the following diff: Assuming index.htmldiff --git a/sample/index.html b/sample/index.html
index 8ef5e67..1b26c5a 100644
--- a/sample/index.html
+++ b/sample/index.html
@@ -30,6 +30,19 @@
<h1>CKEditor 5 with ckeditor5-math – Development Sample</h1>
<div id="editor">
+ <h2>The <code>Math</code> plugin <h2>
+ <p>
+ <code>Math</code> inserts mathematical formulas into the editor. You can click the CKEditor 5 Math icon in the toolbar and see the results.
+ </p>
+ <p><script type="math/tex">e=mc^2</script></p>
+ <p><script type="math/tex; mode=display">e=mc^2</script></p>
+ <p>
+ This should show "\test" as ≠ via katexRenderOptions.macros:
+ <script type="math/tex">\test</script>
+ </p>
+ <!-- Quill Style Tag -->
+ <p><span class="ql-formula" data-value="e=mc^2"></span></p>
+
<h2>Development environment</h2>
<p>
This is a demo of the <a href="https://ckeditor.com/docs/ckeditor5/latest/builds/guides/overview.html#classic-editor">classic editor build</a> that loads the <code>Math</code> and <code>AutoformatMath</code> plugin. The formulas don't display in the editor itself: Preview works! dll.htmlNo editor showing for DLL builds http://localhost:8080/dll.html
|
457ee76
to
da9ca15
Compare
@DanielKulbe Thank you for the rebase and checking! Sorry about this: I still can't get http://localhost:8080/dll.html to work I wiped
This is on:
Is anyone else watching this getting http://localhost:8080/dll.html to work? The main build at http://localhost:8080/ works fine. |
I don't know if that is the expected command to be run, but for me, just running |
<script | ||
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About the Uncaught Error: No element provided to render
error that happens with Katex, I think it can be solved just by adding the defer
attr to the script as described in the doc.
<script | |
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" | |
<script | |
defer | |
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to remove this to prevent load errors first reported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But, hey ... feel free to try and report anything that works - I'm not really familiar with Katex, as I am using MathJax in my project.
@isaul32, what is missing for we have this PR merged? Looking forward to using it on my projects... |
@ghalestrilo @Wigny @DanielKulbe I will try again tonight |
@ghalestrilo @Wigny Can you make a video of what steps you're taking to install + build and show what http://localhost:8080/dll.html looks like? This still doesn't work for me 🤷. |
@tony, here are my steps. I think our different outputs on it are about the commands being run to serve the DLL sample page (as I think you are just running Desktop.2023.03.07.-.11.13.55.04.mp4 |
Yes, as you statet it some comments above:
The whole process is already documented with the CKEditor package generator, I believe: |
@Wigny Thank you, the approach here does work for me.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DanielKulbe Approved
- Tested locally with
yarn dll:serve
andyarn start
- Tested on a separate build
Well done, this is awesome
@@ -1,5 +1,5 @@ | |||
{ | |||
"name": "ckeditor5-math", | |||
"name": "@isaul32/ckeditor5-math", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DanielKulbe I did find a minor issue here.
The npm package is ckeditor5-math
When corrected, it raises:
$ yarn run dll:build
yarn run v1.22.19
$ ckeditor5-package-tools dll:build
ckeditor5-math/node_modules/@ckeditor/ckeditor5-package-tools/lib/utils/get-webpack-config-dll.js:23
const dllName = packageJson.name.split( '/' )[ 1 ].replace( /^ckeditor5-/, '' );
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I filed an issue at ckeditor/ckeditor5-package-generator#139
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100% an oversight by me 😆 Who would have thought an ordinary NPM package name would raise an error
@isaul32 Are you okay with giving me publish access to @isaul32/ckeditor5-math on npm until ckeditor/ckeditor5-package-generator#139 is handled? This was a mistake on my part - it flew right past me in the review, I didn't expect it'd error with our normal package name. |
I'm okay with that. Do I have to do something? |
Thank you, you will be able to see this evening |
Done. I also invited you @tony again. https://www.npmjs.com/package/@isaul32/ckeditor5-math |
@isaul32 Thank you! |
@isaul32 Do you want to push the package.json with v36.0.4 to the git repo? |
closes #46