Problems with the maximum font size in TinyMCE editor on a Joomla website - joomla

I am using TinyMCE as editor on my Joomla website and I have a problem with the maximum font size.
When I insert some text into the TinyMCE editor I can change the font size but the maximum size seems to be: t (36pt), why?
I need to insert larger text into my pages. What can I do to fix?
Tnx
Andrea

There are many ways you could tackle this, but I would try one of these first:
You can change the dropdown font options using the theme_advanced_font_sizes option, in general, it is something like this:
tinyMCE.init({
...
theme_advanced_font_sizes : "10px,12px,14px,16px,24px"
});
For more info on this, look here.
Now, since you're using Joomla, you can try to pass your parameters in an array to the display editor call, like is explained in the official joomla documentation (keep in mind that you need to check this is one of the adjustable parameters) or you could also try to change the setting for the editor you're interested in by adding some javascript to a specific view, but I'm not sure it'll work. It should be something like: tinymce.get('editor_id').settings.theme_advanced_font_sizes="10px,12px,14px,16px,24px";.
Depending on what you want to do, you could also try using tinyMce indepently or duplicating the plugin with your own tweaks, so that it doesn't get overwritten when you update your site.
Don't do anything at all. You can control the appearance of any block by inserting css code directly, just use the code view.

Related

Joomla - use full article image instead of intro image

I wanted to ask if there is a possibility to force Joomla to use full article image if intro image is empty (everywhere where image should be visible).
Is there a setting for this? Is it a feature of a template or Joomla engine itself? Right now I always have to specify both of this images, cause if I specify one only full article image Joomla does not display miniature in many places. If I specify the other one miniature is there but when I enter article it is missing.
I always end up having to specify the same image twice. Is there any way around this?
Thanks
UPDATE1:
I ended up overwriting the template for article to display $images->intro_image whenever $images->image_fulltext is not available.
This solves my problems yet one joomla user tells me she is sure that they were able to do that before without any modifications in the template. So now I'm just wondering if there is a setting for this in Joomla Admin so that it does not have to be forced in template code
It turned out that each element of my page except full article used intro_image. So what I did was to copy out the part responsible for showing article into the html folder of my template and just added a php code to use intro image instead of fulltext image (if it is present). You basically need to change $image->fulltext to $image->intro_image in the condition. But remember to keep the original condition as an elseif condition if you want to be able to still use full text image

Stop Magento/tinyMCE forcing object tag type

So iv been reading about peoples problems with tiny MCE "messing up" code. I understand it isn't, but I have a very minor problem that is become a major problem.
Im trying to add a simple object tag to one of my CMS pages. I need the object type to be "text/html" but whenever I save the page it converts this to "application/x-shockwave-flash"
I don't want to turn off the tinyMCE cleanup option as by the sounds of things this is a really bad thing to do.
So is there a way to stop it changing just the type attribute?
I have tried adding the code to a CMS widget and adding the widget to the page but this get the same altered result.
This thread (Object tag is not working) seems similar, but simply changing the type isn't working for me as it is automatically changing back to flash upon save.
The url i am trying to load looks like this...
(http://www.domain.com/animations/embed/one/o-t-t-d?player_width=100%&player_height=100%) I have been told that this will return flash if it is available or html if not.
Im assuming that because i'm saving the page on a PC with flash available its recognising and changing the type.
Any help appreciated.
You can edit the file js/mage/adminhtml/wysiwyg/tiny_mce/setup.js to make this happen.
Look for the settings array (around line 100). Add 'extended_valid_elements' there, like this;
var settings = {
...
extended_valid_elements: 'object[type]',
...
};
This way, TinyMCE will know the type attribute is valid and won't change it.

CKEditor and HTML in Xpages

I am understanding this better but still not there yet.
I have a notes document with a rich text field. I want to edit it in Xpages, so that the user can enter text for an email that an agent will generate. The idea is that the user should be able to enter styled text, hopefully including pasted graphics, and this is saved to the rich text field in such a way that a later agent can copy that field to the body of an email.
On the form I have checked the field "Store contents as HTML and MIME.
In the Xpage I have bound the CKEditor directly to the field (can bind it to a scope variable if necessary).
The code in my agent is as follows:
Set rtItmFrm = emlDoc.getFirstItem("Body")
Set rtItmTo = New NotesRichTextItem(mail,"Body")
Set rtItmTo = rtItmFrm.Copyitemtodocument(mail,"Body")
Any further suggestions on reading up on MIME/CKEditor etc would also be much appreciated.
Bryan
=========================================================================
I just discovered how to modify the CKEditor in Xpages (the Rich Text Control). I have the full menu and one or two more things turned out. However, I am really puzzled by how it treats HTML. I would like to put a template for a nice HTML email (like a newsletter). Anything even a little complicated it munges and the output is messed up.
I read enough online to understand that it is not supposed to be a HTML editor, but I am really having trouble getting the results I want. I would love to put some basic skeleton HTML in there, but everything but the simplest code doesn't work.
Is there anyway to import HTML and it not get messed up using this editor?
as Per and Stephan said, Have a look at ACF filtering that is 'server side' (This is not related to CKEditor itself, but it is related to XPages).
If you have a look at the inputRichText control you will see 2 properties.
htmlFilter
htmlFilterIn
These properties determine how to filter Html on the way in to your data, and also on the way out.
This can be used to strip styling out, and also to prevent dangerous tags like some bad code here etc.
By Default the htmlFilter is set ACF (Active Content Filtering) if you look at the default rules, you will see it strips things like 'margin' out.
see /properties/acf-config.xml-sample
There is a filter called 'identity' which means don't filter anything, however beware if you use this you are not protected from and maliciously entered html.
You should look into defining your own set of rules for your ACF filter, this way you can choose which elements to remove. There is a section in Mastering XPages book about this.
If you still have any trouble, then there are some settings in CKEditor config which also control ACF (totally separate to XPages server side)
I don't think CKE changes the HTML, it is the writing back to a RT field.
Try and bind your RichText Editor to a scoped variable instead of a RichText field. This way you have access to the raw HTML and can use that to generate a MIME email. You might want to have a look at Mustache for mail merge.
Use this article series as starter how to prepare CK editor to make this possible.
And as Per mentioned: check the filtering.

Character limit - Joomla (Article Content)

I am stuck working on a gallery, which uses 3 columns and 1 row multiplied alot of times to show a simple and clear gallery.
The problem comes when after publishing, the max-length of articles cut the content, but I can't find the config where I can change it.
This is problem with your template style(or gallery plugin/module gallery style), you have to edit your css file.
Best way is to check gallery with Firebug (mozzila add-in), make necessary changes and then overwrite default style.
Be careful with your updates, that do not overwrite your style.
It was a problem with MySQL.
I just changed "Text" value for "LongText" (on MySQL), so that way I can use a large amount of characters on the same script.

Change appearence of page dynamically like twitter or tumblr

I'm trying to find tutorials or code to allow users to customise their page, just like twitter ,wordpress and tumblr do.
Could someone tell me what technology their using?
i'm a .net developer, but maybe they're using jquery?
Any help would be great.
Thanks
You can use javascript to change style sheets and the DOM
Question is a bit broad. To change the page you simply need to manipulate the DOM or change the CSS associated with the page's elements. This can be done any number of ways. E.g. you could write out a new CSS class dynamically, you could add new elements to the DOM itself or you could modify the existing attributes of the page. e.g. to set the background of the page you can do something like:
(assuming JQuery)
$("body").css('background-image','url(path/to/image)');
Hope that helps,
-fs

Resources