How to add CKEditor plugins client-via side JavaScript? - ckeditor

Several online services that I use for work incorporate CKEditor (namely, desk.com and targetprocess.com), but neither includes find/replace functionality, because I guess neither knows that it's almost 2017.
I am pretty handy with JavaScript, and I wonder if there's a way to trick CKEditor into using a find/replace plugin such as http://ckeditor.com/addon/find via client-side JavaScript?
Obviously, I don't have access to the source code at either desk.com or targetprocess, and I am willing to "roll my own" until they get around to including it.

If the plugins you are looking for are in fact present on the websites you are using, then you may try destroying the CKEditor instance and starting CKEditor with your own settings e.g. with different toolbar and with plugins enabled via http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-extraPlugins (e.g. using Greasemonkey, by writing a browser extension that works on selected domains etc.)

Related

Is it possible to disable the contextmenu plugin in CKEditor without having to disable any other plugins?

I want to enable native spellchecking in CKEditor which requires you to disable the CKEditor context menu, however to do that it seems you also need to disable the tabletools, tableresize and liststyle plugins, which I really would rather keep.
Is there any way to do this? Scayt is useless so we moved to nanospell but it seems like a massive waste of money and effort when browsers can perform this spellchecking instead but there seems to be no way to enable it without removing a boat load of functionality.
So it turns out that to get around this we had to remove the parts of the code in the tableresize and liststyle plugins that required the context menu. The plugins work fine without the menu (they even have if statements to not run specific parts if the context menu plugin is not present), however they still have the requirement for the context menu plugin to be present. Just remove that and you're golden.
Currently looking at a way to push these changes back into the plugins to help anyone who has the same issue in the future.

Why won't Joomla render my PHP/Javascript tags on the front page?

This is my first project on website development using Joomla. I am trying to make a dashboard implementation. My problem is that whenever I edit my script in article using source tags, the changes are not reflected on my site immediately. I have even tried restarting my Wamp server, but in vain. Any tips that I should follow?
Thanks.
Depending on your Joomla-Version there are different options to check to suppress stripping or filtering of tags like <script> for the frontend. Here are some hints:
First of all your tags could be filtered out client-sided depending on the editor you selected. If you use the standard TinyMCE e.g. go to Extensions - Plugins - TinyMCE where you will find a list of prohibited Elements which may include script. Be exactly sure what you do though, always check who should be allowed to enter script tags in an article, this is almost always a major security risk if anybody else like you as an administrator has the right to use them. So another option could be to just set the editor for your administrator/author accout to plain text and leave TinyMCE untouched.
Another filtering is done server-sided by joomla itself which can be controlled in "Global Configuration" -> "Text filter". After a standard installation all groups will use Default Black List filtering which includes removing script tags. Here you could define "No Filtering" for the Super User group e.g.
Again, all this depends on your Joomla-Version (my examples are referring to 2.5) and are hints to get around the issue but without knowing your security concept.

Using MVC 3, Recommendation for creating Menus, HTML5, JQuery or 3rd Party Components?

I am just trying to streamline my MVC3 development approach. I use Razor in the View and was wondering what the recommendation is for easily creating more fancy UI widgets such as Menus. I would hope I could leverage some good open source components and plug them in. I do subscribe to a good 3rd party component library, but wonder whether this type of feature is best implemented via JQuery UI or old style HTML/CSS?
Many thanks.
In general, Stack Overflow isn't here to recommend tools for you. However, I will say that whether to choose a javascript tool or straight html/css depends on the needs.
It's best to work with the simplest solution that solves your problem. CSS can do menus quite well, and straight CSS menus are often the best choice. However, if you need things straight css can't do, then you need to add javascript. For instance, one problem with CSS menus is that it's very easy to "roll off" the menu and have it disappear from under your pointer. Most javascript menus add a delay that allows you to roll off for a second and get back before the menu disappears. This improves usability.
Even lots of fancy effects can be done strictly in CSS, but as with many such things.. it won't be compatible across all browsers, which is again where javascript comes into play. Sometimes the only way to be compatible across the board is with js (at least without losing functionality).
I wouldn't recreate the wheel on this one, since so many web sites already do this. If you are trying to streamline your development, I'd say use your 3rd party library or find a good jQuery plugin. You could probably easily create your own in HTML/CSS/Jquery, but it will add on to your testing later. An existing 3rd party/jQuery type of component would take significantly less time and have a lot of features you want already built in.
I'd recommend using MVC SiteMap Provider in conjecuyion with a JavaScript menu of choice e.g. SuperFish http://users.tpg.com.au/j_birch/plugins/superfish/. The menu fancy JS part part is the least important.
From the MVC point of view what I think really matters is how you manage and maintain your menu. MVC SiteMap Provider makes it really easy to build an maintain menus (can even use Attributes to make Actions appear on the menu). It can also do things like Security Trimming so if a user doesn't have permission to get to the action etc it isn't displayed on the menu.
I'd check that out.

Column navigation

Is there any module available for column navigation style for eg. joomla main navigation? . I am using joomla 1.7
I think they might be using IceMegaMenu, which I've tried myself and works really well. I personally think that it should be integreted as a standar feature, as it really chenges the way menus act and is 100% compatible (you may even choose to make it work without js, and results are still great).
PS Hoping that this won't be considered spam, you can see the menu in action, as I've implemented it, at my web site. It's a very standard version, without js.
For a complete overveiw of the features you may have a look at the official Demo, it really looks like Joomla.org relies on IceMegaMenu...

How to quickly write a firefox extension?

I'm to make a firefox extension which will inject some js code as well as whole jQuery lib.
I want it to happen (the injection) when user pushes the button placed somewhere in the browser. I have read docs form MDC and other tutorials about making the extensions and they seem complicated to me. Technologies such as XPCOM or XUL are completely useles form me (I have no time to learn them in fact). My question is, is it another way of solving my problem then following MDC? I need to find quicker way of doing my task.
I've already written the extension for Google Chrome, and it was a way simplier than doing it for Firefox.
I would take a look at Greasemonkey. It shares some similarity with Chrome plugins in function (Script gets injected on the page, local storage, etc). As for using JQuery with Greasemonkey, look at this question: How can I use jQuery in Greasemonkey?
You can use a bookmarklet to add jQuery to a page and/or inject any other code.

Resources