how to create drupal8 ckeditor shortcodes? - ckeditor

what would be the best direction toward creating shortcodes usable in drupal 8 editor?
Ckeditor being placed to core, shortcode module nor shortcode_wysiwig module being ported , I am not quite sure where to start from.

you need to implement a custom module using the ckeditor.api
for further examples see here:
https://drupal.stackexchange.com/questions/139075/implementing-ckeditors-plugin-in-drupal-8

Related

How to integrate metronic theme with DNN9?

We have a DNN9 platform for our Business2Business website. It has basic look of reports however we wanted to show some advance look to reports and charts so that we are planning to integrate metronic theme in DNN9. I tried multiple ways to do it but failed. kindly help regarding this for the same.
Not sure what you have tried but we succeeded in displaying reports module data using Mandeeps Porto css and boostrap classes.
We achieved this using the xsl stylesheet option in reports module settings.
If the theme resources are part of your portal skin on the page that the reports module resides then xsl elements will display fine. If not part of the portal theme, you can either declare the resource in page setting header or in the xsl stylesheet itself.
Hope this helps

Lazy load CKEditor 4

Currently finding issue lazy loading CKEditor 4, appreciate any advice. What I tried:
Including ckeditor_basic.js but this already needs a CKEDITOR
instance
Loading ckeditor.js on click but this complains
'Synchronous XMLHttpRequest on the main thread is deprecated because
of its detrimental effects to the end user's experience.' as well as
some others errors, fails badly.
Any advice appreciated!
If you would like to insert CKEditor script dynamically you can use technique from this code pen - https://codepen.io/j_swiderski/pen/qPGRGb. It is important to wait for ckeditor.js to load before creating editor instance thus using setInterval to check if CKEDITOR object is available seems like a good idea.
In your comments you have written, you don't want editor to load every time you load the page. One of the reasons for that might be the size of ckeditor.js file.
If you think editor.js is too big it is important to answer yourself how much plugins you really need and then create editor accordingly to your needs using the online builder. Please have a look at below samples using dev-tools and notice the difference in ckeditor.js size: Full package has 600KB while Basic Package has only 400KB. If you just need the basic formatting then your ckeditor.js could get even smaller and should not be a problem when loading the page.
If you have created some custom plugins then recommended practice is to get CKEditor source code from Githhub, fork it, make changes/add custom plugins, build your editor. That way you will get minified and obfuscated editor instance which includes your custom plugins and again should not be a problem when loading the page.

How to call wgpicasa pro component into module in joomla?

I am trying to get wgpicasa pro component into my module through component anywhere plugin but sometime working good but sometime not working. So anyone tell me how can i call component into module without using component anywhere plugin.
For doing this we need to use short code of wgpicasa pro in custom HTML module and need to enable prepare content to get content by short code without installing any component.
Screen Shots:

JOOMLA, Best way to make alternate layouts for articles?

I can't find a answer for this, I want to know what is the best way to have an alternative layouts for articles in Joomla.
If I understand you correctly you are looking for a way to create additional Alternative Layouts for articles. Under parameter tab "Article Options":
If that is the case, its very close to the other provided answers here. Its just that you got to rename the copied default.php file to something else. If you rename it to custom.php it will end up with the text "custom" like the image above.
Here goes my shot for a step by step:
Find the default layout file(s). You could use the ones provided by the com_content component. They can be found at components/com_content/views/article/tmpl. Copy both default.php and default_links.php.
Now you need to rename and copy the file(s) into a template. The target template can be any of the installed templates. Using beez_20 the new path for the copied file(s) should be templates/beez_20/html/com_content/article/custom.php and templates/beez_20/html/com_content/article/custom_links.php.
Goto to edit article using the backend. Expand the Article Options tab and find Alternative Layout. Select your new layout.
Your template might already provide a article override. If so, you might want to use the files of that template instead (instead of the ones in step 1). So if you are using beez_20, you could copy templates/beez_20/html/com_content/article/default.php and templates/beez_20/html/com_content/article/default_links.php.
Helpful links:
Using Joomla’s Template and Layout Override
Layout overrides in Joomla 1.6
The best way to do this would either to install another content component - such as k2 which is highly customizable. Or any other content component on JED.
Alternatively you could create a template override on the existing Joomla Template. This is preferable to editing the files directly in com_content component as the template overrides will never be overwritten whereas the core files will be in any Joomla Updates. I should add, hopefully unnecessarily that this requires Joomla 1.5, 1.6, 1.7, 2.5 or 3.0 (although this is still in beta as of present). So make sure you're not using 1.0.
To create an alternative layout for the built in articles component the best way to do it is probably to create a template over-ride.
See this article on docs.joomla.org on "How to override the output from the Joomla! core"
Creating an alternative for an article layout is pretty straight forward. You can achieve this by using the core layout override with your published template(s).
First you want to get/copy the core article layout file:
components/com_content/views/article/tmpl/default.php
Then place it into your published template:
templates/YOURTEMPLATE/html/com_content/article/default.php
If the template you are using doesn't have the html folder, then you will have to create that folder and each folder to make that path correct.
Once you have this in place, all you need to do is make changes to that default.php file you have just place in the template and that is it!

Loading a Joomla 2.5 module into another module

I've seen the question Loading a module in another module in Joomla, but that was about Joomla 1.5
I have exactly the same question about Joomla 2.5
Is there an official way to do so?
If you're using a "Custom HTML" module the standard {loadposition myPosition} or {loadmodule myModuleTypesName} work as expected.
Did you mean something else?
I've updated the wiki article with the following information as well.
loadmodule
An alternative to "{loadposition xx}" is the "{loadmodule yyy}" variation which is handled by the same plugin.
In this case the plugin looks for the first module that who's type matches the string 'yyy'. So, you could load a "mod_login" module by placing {loadmodule login} in your text.
Modules within Modules
It is possible in Joomla! 2.5+ (possibly earlier) to include a module within a "Custom HTML" module as they are processed by content plugins in the same way as articles.
You should remember when doing this that you may experience formatting issues as the "chrome" of the "Custom HTML" module will surround the "chrome" of the included module potential having undesirable effects of the formatting or layout.
You can use this extension, hope this may help you
http://www.nonumber.nl/extensions/modulesanywhere
In Custom HTML module Options Tab I set Prepare Content to 'yes' that allowes load other modules and positions.
Joomla 2.5
Joomla 3

Resources