djangocms-text-ckeditor with django-filer - django-cms

Ive been trying to get ckeditor working with the CMS. I cant seem to get inline images working
with filer. I'm trying to add an image from the list of cms plugins and can select the image from
the list of images already uploaded, but on finally clicking "ok" in the popup, the image appears
as "undefined" in the text area.
Any pointers as to what might be going wrong?

This is a little bizzare, but, changing the order of the apps in INSTALLED_APPS fixed this. ie, having the ordering as below fixed the issue.
INSTALLED_APPS = (
...
'djangocms_text_ckeditor',
'cms',
...
)

Related

How to make website thumbnail not blurry?

Trouble with a blurred thumbnail at my website project
Greetings.
Ladies And Gentleman
I ask some question about this picture I've sent, what I want to ask about is how to make
this picture's blurred thumbnail turned into High-Definition.
enter image description here
already try to turn off lazy loading with this code but loading="lazy"
add_filter( 'wp_lazy_loading_enabled', '__return_false' );
Website using Wordpress
this is the link https://cloudteamize.com/test-porto/
Increase the size of the thumbnail on the Wordpress settings "Settings > Media" I suggest you put it at least 650px.
You will always see it blurry because is a flexible container and often stretch larger than the actual image size (It varies on viewport size or screen resolution).
pd: You will need to regenerate the thumbnails after or reupload the image and use the latest version. When you change those settings old images don't create the new thumbnail versions automatically.
THE SOLUTION IS FOUNDED:
the problem is the image link that my plugin using called: Portofolio Carousel is adding 350x181.png at the end of the link, I think that make my image use the lower quality.
example:
the original file is -> mmd.png
but in that plugin -> mmd-350x181.png
i take the values of my src then remove the 350x150.png to only .png using my massy javascript like this:
$ = jQuery;
$(document).ready(function() {
const imgs=document.querySelectorAll('#portofolio img');
imgs.forEach(img => console.log(img.removeAttribute('srcset'), img.removeAttribute('loading'),img.src=img.src.replace("-350x181","")));
});
some how if I not doing my code inside console.log, the code didn't run. I think that is really weird, but some how when I try to put that in console.log, it just works so if you can give me suggestions or make this code clearer, that's will be great.

TinyMCE Wordpress wpview 'gallery' after drag & drop

sorry for the title, but it is hard to describe my problem/ question in a short sentence or title.
So here is my story:
I am writing a WP plugin, which replaces the original [gallery] shortcode. For having a correct "preview" in visual editor (TinyMCE), I also slightly modified (by replacing it) the wpview plugin. But just small changes, like removing the 'Remove' button from the inline toolbar.
All works pretty well so far. One can switch between HTML and Visual mode. The [gallery] shortcode is replaced with the HTML output in Visual mode.
The only thing/ problem is, that if one selects a gallery view and drags it around, it becomes the (original) element (with the [gallery] shortcode).
I have really no idea why and where this happens!?
So my first question is, if anyone has an idea?
Searching for a solution/ workaround for this issue, I would also like to know, if there is an event fired, when a drag & drop action ends in WP TinyMCE?
I realized, that for a drag & drop action TinyMCE appends a element with class attribute "mce-drag-container". Maybe I have to monitor the iframe document for the existence of this element (to call a function when it is removed)?
Any ideas, tips or hints for this?
The last option I could think of would be to make the wp gallery views non-draggable.
Unfortunately I could not find any information on how to do it. If it is possible in the end?
So if anyone has a clue ...?
Any help is very much appreciated.
Many thanks in advance.
Greetings
Gunther
Have you tried listening for a general content change and checking if it's a dragged image?
All TinyMCE editor events can be found in the docs: https://www.tinymce.com/docs/advanced/events/
OK, after some further investigation I found the function that caused my "problem".
It is the following (in wpview:
// Make sure views are copied as their text.
editor.on( 'drop objectselected', function( event ) {
if ( isView( event.targetClone ) ) {
event.targetClone = editor.getDoc().createTextNode(
window.decodeURIComponent( editor.dom.getAttrib( event.targetClone, 'data-wpview-text' ) )
);
}
} );
In my case this is an "unwanted behaviour", as I wanted the view to stay intact/ as is.
So the solution (in my case) is just to delete/ do not use this event/ function.

How to adapt jssor slider code to a Drupal 7 node

I have a paid account with you and I tried recently to export a jssor slideshow in order to put it in a Drupal 7 block.
I exported it according to the different possible ways :
download standard code
download jquery code
download minimized code
and I have always the same problem : the left and right arrow do not work and each time I edit the code in the node copied from the html page inside the zipped file the following syntax is never present :
Finally I chose the minimized code as I found it was better in order to avoid conflicts with other active js scripts in Drupal.
I pasted the js script is in the Drupal template "html.tpl.php" and the slideshow works automatically with the autoplay function but when I click the left and right arrows, the slides do not change.
Could you tell me however how to display the arrows vertically centered and to make them turn the slides as they supposed to do when clicked ?
Is there a known bug with Drupal 7 or a special way to adapt the code to the CMS ?
Thanking you in advance,
Best regards,
Corinne

Meteor xolvio:md-blog: Site title is changed to "name"

I have finally successfully installed the Meteor package md-blog from xolvio. The only thing that is bothering me, is that the title of the site is changed to "name". Where can I remove this?
Also on some blog entries my logo in the navbar disappears. Does anyone know what this could be?
If you're basing your blog on the example app (https://github.com/xolvio/md-blog/tree/master/app), the strings used in the app are defined in the internationalization directory (https://github.com/xolvio/md-blog/tree/master/app/i18n). You can edit the en.i18n.json file as you see fit. The site_title property is what you need to edit to change the title of the blog.
Without seeing your blog, I can't evaluate why your logo disappears. Inspect the page to see if it's there but not visible. It's likely a css issue.

Lightbox Display Loading Box at End of Page

I'm using Lightbox for the first time, and it's working for my images. However, for some reason, I get a strange box at the end of my page that shows the loading icon, even though there shouldn't be an image there.
The image: http://i.imgur.com/ACImB.png
Upon inspecting the element, I get the following HTML code.
<div id="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image"><div class="lb-nav"><a class="lb-prev"></a><a class="lb-next"></a></div><div class="lb-loader"><a class="lb-cancel"><img src="/z/styles/images/loading.gif"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"><img src="/z/styles/images/close.png"></a></div></div></div></div>
The strange part about this code is that I didn't make that div, it seems to have just been inserted by the script. Does anyone know what this might be and how to get rid of it?
This could easily be a problem with your css or script path.
If you look at the lightbox2 demo it displays that loading page you see and then removes it to display the loaded image. When either the javascript or stylesheets are not correctly linked it will not work properly.
Lightbox2 site: http://lokeshdhakar.com/projects/lightbox2/
You can try using (in chrome, for firefox there's firebug) right-click inspect element, go to the resources tab and expand the frames boxes until you see all the images, scripts and style sheets in a list. It'll let you know if one of them can't be found.
I had the same issue when I integrated Lightbox with an MVC site. The issue was I had referred both lightbox.js and lightbox.min.js files. I fixed the issue by removing one reference.

Resources