We're using CKEditor on a project where assets are handled by Grunt.js.
Grunt manage and compile CKEditor JS+CSS alongside other libs and our own code.
We've chosen to use an iconic font for our toolbar elements.
In production, assets are uploaded on S3.
Unfortunately, CKEditor has a "loader" feature which loads skin and icons files, based on the current path. Of course, the skin (the basic "moono", already loaded) and icons are not used.
Is there a way to disable this "loader" ?
Related
I'm just trying new CKEditor 5 and after compiling the code with laravel-mix, which uses webpack, the icons are extracted to the public directory under fonts directory, but when I load the editor - they are not showing.
Is there any webpack configuration I could use to specify where I want them to be saved and I'm not quite clear on how to fix the issue with icons not showing.
I am new to magento 2 and I am making css changes in luma theme on below path.
But after content deployment I lost my css changes.
Please help me in that.
/pub/static/frontend/Magento/luma/en_US/css/styles-m.css
/pub/static/frontend/Magento/luma/en_US/css/styles-l.css
You should not edit/modify files within pub/* or vendor/* directory.
Pub is for deployment and vendor is for default structure, which you
override via your template or custom modules
Instead:
create a new theme inside app/design/frontend/{vendor}/{yourTheme}/.
You can use Blank or Luma theme
You can also create new theme which inherites from Blank (inheritance
is defined within theme.xml). If you are already using some theme
then skip this step.
edit .less within your theme so the changes stay visible and don't
get replaced when clearing the cache or upgrading the system.
Use grunt to compile your .less into deployment files.
You can also setup sourcemaps to pin point your styling within the
theme .less files so you can be more productive.
if you want to override only css file then you don't need to compile it. so follow above steps , change your css and clear the cache. it will worked.
How do I change the icons for builtin actions such as subscript, superscript bold and italic?
The documentation say that I have to place the icons in the images folder in my skin, but how do I know what the image should be called?
Also, ckeditor compiles the default images into one huge file, so do I need to rebuild that icon file(how?) after placing an icon.
I am using Ckeditor 4.
All skin icons must be included inside the icons folder in the skin folder. The icons file name must match the name of the icon files available in the icons folder of the plugins.
If you want the source version of your skin to overload icons properly, you must inform CKEditor about the presence of your custom icons. This is optional, but if not done your icons will be visible in the release version of your skin only. Check the skin.js file in the Moono skin for an example.
Try clearing the cache as well.
I've just downloaded CKEditor v4.5.7 basic edition and there is a "plugins" folder by default.
Are you sure about the version used ?
After edit :
Icons are defined in the file skins/moono/editor.css and for example for Bold look after class .cke_button__bold_icon - erverything can be changed there.
In order not to edit standard files, I suggest you to create a new skin : duplicate moono folder and rename as you like and in your config.js add
config.skin = 'skin-name';
How does one make the color of the UI toolbar of CKeditor solid rather than gradient? I've search the other questions and read that I need to edit a file skins.js, but there are no js files in the skins folder.
CKEditor 4.5 is not yet out there, so my assumption is that you use latest major branch.
File you're looking for is skin.js in particular skin directory (eg. mono).
The fact that you can't find this file in given directory might be caused by using builded (minified) CKEditor.
If you did build CKEditor then skin is likely to be minified to main file (but I'm not that familiar with building, so it's my guess).
If that's the case, you need to edit source version, and build it again.
I've made a couple plugins for ckeditor and added icons for them. These icons show up when I embed the unbuilt code on a test page, but, when I build the editor, the minimized code thinks the icons at 'original/path/to/the/icon.png?t=D5AK' instead of 'original/path/to/the/icon.png'. This error does not occur when I copy an icon from another plugin in the src code. At the moment the only way I am adding the icon is through "icon: this.path + 'icons/icon.png'," in plugin.js. Is there somewhere I need to add a reference to the icon?
This is an intentional addition to resources' paths. It ensures that every two CKEditor releases have different paths to the same resource what disables cache. And this works perfectly unless you're trying to load CKEditor from local file system than from a web server.