Share » Forums » Extensions » EzOE with Tiny MCE changes

EzOE with Tiny MCE changes

EzOE with Tiny MCE changes

Monday 10 May 2010 5:09:34 am - 1 reply

Author Message

André R.

Monday 10 May 2010 2:16:44 pm

Don't know about selectfont, but formatselect is implemented like this in ez theme (only small changes to the original advance theme code to comment out unsupported html types). You would have finded it easily by searching for theme_advanced_blockformats, the setting I presume you changed:

 _createBlockFormats : function() {
var c, fmts = {
                p : 'advanced.paragraph',
                //address : 'advanced.address',
                pre : 'advanced.pre',
                h1 : 'advanced.h1',
                h2 : 'advanced.h2',
                h3 : 'advanced.h3',
                h4 : 'advanced.h4',
                h5 : 'advanced.h5',
                h6 : 'advanced.h6'/*,
                div : 'advanced.div',
                blockquote : 'advanced.blockquote',
                code : 'advanced.code',
                dt : 'advanced.dt',
                dd : 'advanced.dd',
                samp : 'advanced.samp'*/
            }, t = this;
        c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', cmd : 'FormatBlock'});
        if (c) {
            each(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k)
            {
                c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v});
            });
        }

So to add new entries you'll have to hack the theme to add it to fmts.
But, classes are not supported, so' you'll have to hack both the theme and parts of TinyMCE to add support for that.
This is why I haven't bothered to customize it yet to be able to set it from ezoe.ini, without class support it is pretty pointless.

As for changing name of paragraph, that's simple(well, kind of). ezoe uses a ezjscore server call to handle eZ Publish to TinyMCE translation integration. And you can find the stuff doing it in ezoeServerFunctions::i18n():

 'paragraph' => ezi18n( 'design/standard/ezoe', "Paragraph"),

So unless you need to change it for eng-GB, you'll be able to override it with translation "override", basically overriding the string in a translation file in an extension that have higher priority then ezoe. ref:

<!DOCTYPE TS>
<TS>
<context>
 <name>design/standard/ezoe</name>
 <message>
        <source>Paragraph</source>
        <translation>Paragraf</translation>
</message>
</context>
</TS> 

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu