TinymceBundle icon indicating copy to clipboard operation
TinymceBundle copied to clipboard

more init options

Open mbarbey opened this issue 8 years ago • 5 comments

Hello,

This bundle is really a great bundle and very easy to understand and configure. It's a great works.

Anyway, it appear that there is more options for tinymce and they can't be configured trough the config.yml (since this bundle does not implement them).

I need to configure relative_urls and remove_script_host.

Is there an option somewhere to do this ? (config.yml ? callback js ? something ?)

It would be great if we had a callback option to override the init parameters just before initializing tinymce.

Anyway, this bundle is one of my favorite, so great job !

Mike

mbarbey avatar Apr 15 '16 08:04 mbarbey

@mbarbey Hello.

As i remember, you can pas additional parameters as argument to {{ tinymce_init() }} in Twig, something like that:

    {{ tinymce_init({
        theme: {'simple':{'language': app.request.locale, 'height': 500 }},
        toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
        autosave_ask_before_unload: false,
        asset_package_name: 'backend'})
    }}

LogansUA avatar Apr 18 '16 06:04 LogansUA

@LogansUA Hello,

That what I did first, but it appear that the JS function initTinyMCE parse the options and only use the hardcoded properties.

That why I said that it would be great to have something to add properties even if they are not defined in the bundle configuration.

mbarbey avatar Apr 19 '16 09:04 mbarbey

@mbarbey Well, ok. Maybe you have some ideas and time to implement it in this bundle?

If so, than please, make it as a feature and send PR to 1.x and 2.x branches, and i'll check it :smile:

LogansUA avatar Apr 19 '16 23:04 LogansUA

This problematic has been fixed in the gibilogic fork. We can maybe think about a merge of this too repos ?

nykopol avatar Apr 30 '16 05:04 nykopol

@LogansUA :+1: for cherrypicking changes from gibilogic fork and merge in official

shakaran avatar May 30 '16 06:05 shakaran