Problem configuring CKEDITOR in Magnolia RichTextField - ckeditor

I can't customize toolbar buttons in Magnolia's RichTextField
in Yaml file add configJsFile: /ckeditor/configJsFile.js pointing to config file under resource folder in java module project
- name: text
class: info.magnolia.ui.form.field.definition.RichTextFieldDefinition
configJsFile: /ckeditor/configJsFile.js
i18n: true
once configJsFile.js added RichTextField start showing up all imaginable buttons and it is too many
I tried to remove some buttons groups in configJsFile.js even comment out all content inside config funtion CKEDITOR.editorConfig = function( config ) { ... } that's make any effect.
Any idea how I can configure toolbar content in Magnolia's RichTextField?
Here is original configJsFile.js taken from Magnolia doc site

Which version of Magnolia are you using?
Worst case scenario you can change the default settings from
'ckeditor/config-default.js'
Hope that helps,
Cheers,

I was wrong assuming that magnolia pointed to java resources.
Once I put CKEditor config file into folder from magnolia properties I've got what I wanted
see magnolia.resources.dir=${magnolia.home}/modules

Related

how to configure ckeditor in Blog component in AEM

i need to have all ckeditor plugins in RTE of Blog component in AEM,
like http://ckeditor.com/
but the current Blog component in AEM have limited plugins. please check below link. am using AEM 6.2 version
http://localhost:4502/content/community-components/en/journal.html
is this possible ? if yes can some one guide how to do this.
Thanks in advance.
You need to overlay /libs/social/commons/components/richTextEditor component. Depending on the libraries you are using (jQuery, etc.) you will need to modify the document.ready to load the plugin using the following JS
CKEDITOR.plugins.addExternal( [plugin-name], '/etc/clientlibs/path-to-plugin', 'plugin.js' );
The plugin can then be registered with CKEDITOR as follows:
var ckEditor = CKEDITOR.replace( [editor-placeholder-element], {
toolbar: [{ name: '[toolbar-name]', items: [ '[plugin-name]' ] }],
extraPlugins: '[plugin-name]');
The [plugin-name] is the plugin identifier for your plugin based on
the library.
The library for plugin is normally stored under
/etc/clientlibs or your component.
You can chose an existing toolbar your plugin interface icon or you can create a new one.
The plugin and all it's dependencies must be initialised before the CKEDITOR is instantiated or alternatively your plugin must be able to work out its dependencies at runtime.
Hope this helps.

WebPack in VS2015: How to configure a new pack?

I've started with a template from this extension to have a running angular2+ .net core starting point. I didn't want to use boostrap, but materialize-css, so I removed the bootstrap package in package.json, instead I added "materialize-css": "0.98.0",
Then I edited the webpack.config.vendor.js, I removed bootstrap and added materialize-css to the "vendor" list.
Then I rebuilt everything, but it seems that materialize-css is still not present(cannot find its css classes). I tried to clear the browser cache, tried even to open on a brand new browser(edge), but still, no materialize-css classes.
What did I miss?
EDIT
Currently, my vendor list is the following:
vendor: [
'#angular/common',
'#angular/compiler',
'#angular/core',
'#angular/http',
'#angular/platform-browser',
'#angular/platform-browser-dynamic',
'#angular/router',
'#angular/platform-server',
'angular2-universal',
'angular2-universal-polyfills',
'materialize-css',
'es6-shim',
'es6-promise',
'jquery',
'zone.js',
]
You're doing everything correctly, just need to do one thing slightly differently. In your webpack.config.vendor.js, instead of materialize-css, add materialize-css/dist/css/materialize.css to the vendor array:
...
entry: {
vendor: {
...
'materialize-css/dist/css/materialize.css',
...
}
}
This will include the css to your resulting bundle. If you also need fonts and js from materialize-css, you'll need to configure appropriate loaders, see https://www.npmjs.com/package/materialize-loader

Setting Atlasboard theme for a single dashboard

When configuration themes in Atlasboard, I know you can set the global theme in config/theming.js, but is there a way to have a single dashboard use a different theme than the others?
I haven't tried but look like you could do it form version 1.0. Refer to "Theming support" in Atlasboard overview. Following instructions may work
Define your theme name in {yourcurrentwallboard}
{yourcurrentwallboard}/themes/{themename}/variables.styl
Set the defined theme for {yourcurrentwallboard}
{yourwallboard}/config/theming.js
module.exports = {
theme: '{themename}'
};

Is it possible to configure CKFinder as just a file browser without any upload functionality?

I want to be able to click on the image icon in CKEditor and be able to browser the local file system. I would like the chosen file to be passed to the editor just like the standard URL is. I want to use the base64image plugin to embed the image inline.
I have tried using CKFinder but, when I click the Browse Server button in the Image Properties dialog, I get an empty window with just 'run();' in the centre.
To enable CKFinder in read-only (gallery) mode, set the readOnly configuration option to true and pass it as a configruation option to the CKFinder.setupCKEditor function:
CKFinder.setupCKEditor( editor, {
readOnly: true
} );
This will disable the possibility to modify anything.
If you only want to disable uploads, you can disable modules related to upload operations:
CKFinder.setupCKEditor( editor, {
removeModules: 'FormUpload,Html5Upload,UploadFileButton'
} );
The second thing is to change Access Control settings in the server side connector by setting 'FILE_CREATE' to false so the uploads will be disabled also on the server side.

Magento : How to hide the default Store View code from the url

The site has 2 languages: English and French, represented by 2 store views. French is the default one. For our SEO efforts we need to have the following urls:
French - http://www.domain.com/category/product
English - http://www.domain.com/en/category/product
System -> Configuration -> Web -> Add Store Codes to URL is the all or nothing setting. We just need to turn it off for the default store only.
I’ve done a lot of searching through the forums and wiki but there’s nothing on the subject.
Please any sugestions?
Finnaly i solved this magic probleme , i hope that's save others persone here is the details :
1- Download the zip existe in this page : https://github.com/Knectar/Magento-Store-Codes
2- unzip the file and put the folder called "Knectar" in {app/code/community/} and Knectar_Storecodes.xml file in {app/etc/modules}
3- In your backoffice go to "System > Tools > Compilation" and click the rebuild button
4- always in backoffice got to "System > Configuration > Web > URL options" and set the attribute "and default store view" to No and save the configuration
5- Clear your cach magento and enjoy your application :) .
I had the same problem and I have developed an extension for that.
It is available on GitHub: https://github.com/jreinke/magento-hide-default-store-code
I didn't find a quick solution to your problem, but I see that's possible through 2 steps :
1 / Using the advise commented by #user3154108 and trying this tip https://magento.stackexchange.com/questions/8126/store-code-in-url-for-every-store-view-except-for-default
2 / For SEO SITEMAP, it's possible to override the following file
app/code/core/Mage/Sitemap/Model/Sitemap.php
public function generateXml()
{
...
}
and replace the default store code by NULL.
For more details try to look at this post : http://alanstorm.com/generating_google_sitemaps_in_magento
I was having the same problem and I had already selected to not show store code in url in the config. I also didn't want to install an extension just to handle something this minor. Here's my EASY solution:
Copy app/code/core/Mage/Catalog/Block/Widget/Link.php to app/code/local/Mage/Catalog/Block/Widget/Link.php
Search for (line 91 in Magento 1.7.x / line 100 in Magento 1.9.x)
$this->_href = $this->_href . $symbol . "___store=" . $store->getCode();
And modify to
$this->_href = $this->_href;
Upload and save your changes and you'll now not have your widget (dynamically) inserted links getting appended with ?___store=default.
Credit: DesignHaven
Under System -> Configuration -> Web -> URL Options you
change "Add Store Code to Urls" to "NO" as on the attached screenshot

Resources