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
[5.2] Tinymce paste from word #43312
base: 5.2-dev
Are you sure you want to change the base?
Conversation
@brianteeman allow PRs in your cloned repo so I can sent you the code |
I thought that the paste feature now is default for new tinymce. If we want to "fork", we should do it from source: Need to complie |
@Fedik if someone already has a package for this then why not use it. TS will be pain to get in the Joomla repo |
No, no TS, compile then add. |
That means we need a repo for these plugins. Not a bad idea but:
FWIW this PR just needs:
import '@pangaeatech/tinymce-paste-from-word-plugin';
|
No, just as in good old days, copy the js file and call it done 😄 |
No that was the mistake we made. Paste is a default feature but without the paste from word.
No the correct way is to use the repo I linked to. As explained by tinymce tinymce/tinymce#7487 it is not a simple fork. and the linked repo as done what they said should be done.
Ah - I tried it that way before but I missed the
I will do that now and see. |
Ah yeah the good ol' days... We can revert all those confusing NPM build steps and have the code version directly in the repo, what could go wrong |
@dgrammatiko I have done what I believe you are suggesting but I must be missing something as after the build the folder |
@brianteeman you have a typo in the filename: |
@dgrammatiko please can you check out this pr (not code review) something isnt correct and I cant see what. Just look at the console errors |
This pull request has been automatically rebased to 5.2-dev. |
@dgrammatiko @Fedik could you take a look at this please. I must be missing something obvious. The js is correctly being loaded by but if i try to init the plugin with it will try to additionaly load the plugin from No matter what I try I cannot get the plugin to load and initialise |
There some error with this plugin. Need some time to debug. Does it work outside of Joomla? :) |
Sommething with our build script (rollup corrupting the code) and the plugin script itself (it does not provide ES module). When I copy their file Complicated :) |
still no go for me |
DRAFT - help requested @dgrammatiko @Fedik
I obviously have an error in the buildscripts (?) or most likely how I added the js to build/media_source/plg_editors_tinymce/js/plugins/paste_from_word/
The demo I built on codepen shows it working https://codepen.io/brianteeman/pen/RwOeyWL
Summary of Changes
When we upgraded to TinyMCE 6 with joomla 5.0 we missed that the "paste from word" functionality was removed from the paste plugin and now only exists in the non-free paste plugin.
This PR follows the advice from TinyMCE to implement a forked version of the original paste plugin with just the paste from word funtionality. https://github.com/pangaeatech/tinymce-paste-from-word-plugin
I consider the lack of paste from word to be a regression bug and therefore this PR is for 5.1.1 but I can see why others consider it a feature and should wait for 5.2. So I leave that to the maintainers to decided.
Testing Instructions
Use a sample word doc (for example from https://sample-videos.com/download-sample-doc-file.php or https://file-examples.com/index.php/sample-documents-download/sample-doc-download/)
Copy and paste the doc into Joomla. Save and then view the source
Actual result BEFORE applying this Pull Request
lots of mso tags etc in the source
example
Expected result AFTER applying this Pull Request
no mso tags in the source
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed