Closed astridx closed 5 years ago
I solved my problem. I had to add "@instructure/ui-themes/lib/canvas"
Hi @astridx (and others)
I'm having the same issue. I landed here from Stackoverflow
Can you elaborate on I had to add "@instructure/ui-themes/lib/canvas"
I'm trying to get this working in Pressbooks (WordPress)
Using webpack (Laravel Mix) I am compiling ( ES2015 syntax, modules, minify, ...):
.js(
'node_modules/tinymce-a11y-checker/lib/modules/plugin.js',
'my/plugins/tinymce-a11y-checker.js'
)
I am then using WordPress hooks to load the my/plugins/tinymce-a11y-checker.js
and I got to here:
npm install @instructure/ui-themes
then recompiling does not fix the issue.
Where is the CSS? What am I missing?
Solved.
Instead of compiling the plugin, I compile this:
import 'tinymce-a11y-checker'
import { canvas } from '@instructure/ui-themes'
canvas.use();
Then, load that into WordPress. Needs tweaking, but better than no CSS at all.
Regards,
@connerbw
I read this thread, but your Stackoverflow's link doesn't work. Could you help me please, how can I integrate the 11y-checker plugin into the Wordpress?
I had same issue when I package plugin source code with webpack, I had been try
I'am not good at front-end, anybody has idea? many thanks!!
Solve :
I edit file "node_modules\tinymce-a11y-checker\lib\plugin.js" , add two line in the end
var _canvas = _interopRequireDefault(require("@instructure/ui-themes/lib/canvas")); _canvas.default.use();
just like @astridx descipt, and recompile again, it's ok now.
But Change Language still not work , still struggle.
I would like to use this plugin in TinyMCE. Unfortunately I have problems setting up. The plugin works great. Thanks a lot for this. The button is also displayed without any problems. But the a11y hints are not provided with CSS. See attached picture. What am I doing wrong?
This is my test-file