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

TinyMCE plugin feedback #10

Closed
ajtruckle opened this issue Apr 17, 2020 · 8 comments
Closed

TinyMCE plugin feedback #10

ajtruckle opened this issue Apr 17, 2020 · 8 comments
Labels

Comments

@ajtruckle
Copy link

Please see:

Window

  1. Theme.
    Is it possible for me to omit the Theme option from the window? Not all themes are displaying good in my support forum and if possible I would like to lock down the theme that anyone uses to Atomic.

  2. Linennumber offset
    There are two issues here:

  • It has a typo error because it should be Line number offset or maybe Start with line number.
  • It makes sense that this control comes before the Point out Lines control.
  1. Show Linennumbers
    This has a typo. It should really be Show Line numbers.

  2. Point out Lines
    I wonder if it is better to phrase this option as "Lines to highlight".

To me, I reckon:

  • Display line numbers
  • Begin with line number
  • Lines to highlight

It is obviously entirely your decision but there are two typos and it makes sense to swap the two controls around I think.

@AndiDittrich
Copy link
Member

HI @ajtruckle ,

thanks for your feedback.

  • 1 you can use a filter to remove all unwanted themes like the languages
  • 2/3/4 i will fix it

@AndiDittrich AndiDittrich transferred this issue from EnlighterJS/Plugin.WordPress Apr 17, 2020
@AndiDittrich AndiDittrich changed the title General feedback TinyMCE plugin feedback Apr 17, 2020
@ajtruckle
Copy link
Author

Thanks. Looking at the documentation then I would use something like this to remove all unwanted themes:

// add a custom filter to modify the theme list
add_filter('enlighter_themes', function($themes){
    // DEBUG: just display the dataset - uncomment the following line to debug issues
    // echo '<pre>', print_r($themes, true), '</pre>';

    // unset the theme
    unset($themes['godzilla']);

    return $themes;
});

I assume that Standard (Atomic) will automatically show.

@AndiDittrich
Copy link
Member

just return an array with 1 entry..thats more solid/future proof

@ajtruckle
Copy link
Author

Ah, like:

// add a custom filter to modify the theme list
add_filter('enlighter_themes', function ($themes){
    // DEBUG: just display the dataset - uncomment the following line to debug issues
    // echo '<pre>', print_r($themes, true), '</pre>';

    // just show the Classic + Enlighter Theme 
    // Add a new custom theme named my_c_theme - shown as 'MyCustom Lalala Themes' in select boxes
    // Note: Custom themes CSS has to be loaded separately
    return array(
        'atomic' => 'Atomic',
     );
});

@AndiDittrich
Copy link
Member

an empty array should also work in TinyMCE => theme not set => defaults are used

@AndiDittrich
Copy link
Member

image

@ajtruckle
Copy link
Author

ajtruckle commented Apr 17, 2020 via email

@ajtruckle
Copy link
Author

an empty array should also work in TinyMCE => theme not set => defaults are used

That works great!

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

No branches or pull requests

2 participants