Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change to a custom skin #399

Open
n4ff4h opened this issue Jun 14, 2022 · 3 comments
Open

Change to a custom skin #399

n4ff4h opened this issue Jun 14, 2022 · 3 comments

Comments

@n4ff4h
Copy link

n4ff4h commented Jun 14, 2022

Been diggin for a while without success. Could'nt find anythn in the docs or did i miss it?

@LBWright
Copy link

LBWright commented Nov 9, 2022

Same issue here! Haven't been able to customize the skins properly.

@some1ataplace
Copy link

some1ataplace commented Dec 11, 2022

Just guessing here but maybe try making your own folder/files inside of these /static/tinymce/skins/ directories or override these directories yourself:

https://github.com/jazzband/django-tinymce/tree/master/tinymce/static/tinymce/skins/ui

https://github.com/jazzband/django-tinymce/tree/master/tinymce/static/tinymce/skins/content

For example, inside TINYMCE_DEFAULT_CONFIG we can currently do this:

'skin': 'oxide-dark',

Once you make your own files/folders, change this to be:

'skin': 'custom-folder-name',

@some1ataplace
Copy link

To change Django-tinymce to use a custom skin you created, you can follow these steps:

  1. Create a new skin directory in your static files directory, for example: static/tinymce/skins/my_skin/

  2. Copy the contents of the default skin directory (static/tinymce/skins/lightgray/) into your new skin directory.

  3. Modify the CSS files in your new skin directory to customize the skin's appearance as desired.

  4. In your Django settings file, add the following configuration to your TINYMCE_DEFAULT_CONFIG:

TINYMCE_DEFAULT_CONFIG = {
    # ... other options ...
    'skin': 'my_skin',
    'skin_url': '/static/tinymce/skins/my_skin/',
    # ... other options ...
}

In this example, we're setting the skin option to 'my_skin', which is the name of the directory containing our custom skin. We're also setting the skin_url option to the URL where our custom skin directory is located.

Note that if you're using a custom configuration object instead of the default one, you'll need to add these options to your own configuration object instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants