Feature NPM Resource Changed PBF PR-5.0-dev ? Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
8 Feb 2022

Based on user feedback this PR adds the ability to add "Left, Right & Center" alignment for images using the tinymce image button. This uses the tinymce api and existing tinmyce language strings so should be compatible with all languages and easy to maintain etc.

As a bonus this resolves the current issue that after inserting an image with the media manager when you select the image again you can change the alignment.

This is NOT using inline styles. It uses correct classes but as they are present in cassiopeia but not in the editor.css they have been added to the editor.css to ensure they preview correctly.

To test either use a prebuilt package or apply the pr and rebuild the css npm run build:css

imageclass.mp4
avatar brianteeman brianteeman - open - 8 Feb 2022
avatar brianteeman brianteeman - change - 8 Feb 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Feb 2022
Category Repository NPM Change Front End Plugins
avatar brianteeman brianteeman - change - 8 Feb 2022
Labels Added: NPM Resource Changed ?
avatar brianteeman
brianteeman - comment - 30 May 2022

closed due to lack of interest from release lead

avatar brianteeman brianteeman - change - 30 May 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-05-30 15:32:57
Closed_By brianteeman
Labels Added: PBF
avatar brianteeman brianteeman - close - 30 May 2022
avatar brianteeman
brianteeman - comment - 12 Jun 2022

re-opening. this is far more useful to users than other features being added to 4.2 and does not already have an extension offering this on the jed

avatar brianteeman brianteeman - change - 12 Jun 2022
Status Closed New
Closed_Date 2022-05-30 15:32:57
Closed_By brianteeman
avatar brianteeman brianteeman - change - 12 Jun 2022
Status New Pending
avatar brianteeman brianteeman - reopen - 12 Jun 2022
avatar joomla-bot
joomla-bot - comment - 27 Jun 2022

This pull requests has been automatically converted to the PSR-12 coding standard.

avatar brianteeman brianteeman - change - 14 Mar 2023
Labels Added: ? ?
avatar HLeithner
HLeithner - comment - 2 May 2023

This pull request has been automatically rebased to 5.0-dev.

avatar brianteeman
brianteeman - comment - 22 May 2023

This is even more important in joomla 5 as tinymce have removed the ability to add a style to an image

avatar brianteeman brianteeman - change - 22 May 2023
Labels Added: Feature PR-5.0-dev
Removed: ? ?
avatar brianteeman brianteeman - change - 22 May 2023
Title
[4.2] [New Feature] TinyMCE Image Classes
[5.0] [New Feature] TinyMCE Image Classes
avatar brianteeman brianteeman - edited - 22 May 2023
avatar HLeithner
HLeithner - comment - 22 May 2023

That are bootstrap only classes right? might it be more useful to make this configurable in the plugin?

avatar brianteeman
brianteeman - comment - 22 May 2023

Someone else can do that. I am not going to waste my time creating another config that no one will use. On the day that a template provider that uses a different framework actually contributes to joomla then I could look at it again. We need to stop pretending that we can be css framework neutral when they never contribute to make it happen.

avatar laoneo
laoneo - comment - 22 May 2023

As far as I can see it, these are only floats, so instead of using BS classes, just make generic ones for the editor.

avatar brianteeman
brianteeman - comment - 22 May 2023

As far as I can see it, these are only floats, so instead of using BS classes, just make generic ones for the editor.

and then people will need to add those generic ones to their existing bootstrap templates when they have a perfectly good class already. Sorry your suggestion makes no sense.

or did you mean to add an inlinen style for the float? that makes even less sense

avatar laoneo
laoneo - comment - 22 May 2023

Ah wait, just read the CSS changes wrongly. Can you not just give generic class names and then all is good. Because right now you duplicate the BS code as these classes should already be available.

avatar brianteeman
brianteeman - comment - 22 May 2023

please read it again

avatar fancyFranci fancyFranci - test_item - 26 Aug 2023 - Tested unsuccessfully
avatar fancyFranci
fancyFranci - comment - 26 Aug 2023

I have tested this item ? unsuccessfully on 10e3fb9

As soon as I add the change I can not edit the article any more. Console gives the error message "Uncaught TypeError: o is null" in tinymce.js.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36962.

avatar fancyFranci
fancyFranci - comment - 26 Aug 2023
avatar brianteeman
brianteeman - comment - 26 Aug 2023

@fancyFranci how did you apply the pr? Did you rebuild with npm. Basically I can not replicate your reported error and the pr works as intended

avatar fancyFranci fancyFranci - test_item - 26 Aug 2023 - Tested successfully
avatar fancyFranci
fancyFranci - comment - 26 Aug 2023

I have tested this item ✅ successfully on c56e1b2

I tested again the same way like before, but maybe testing your plugin-PRs with some more build:js/:css in the meanwhile helped? Anyway, now it's working correctly.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36962.

avatar HLeithner HLeithner - change - 2 Sep 2023
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-09-02 19:15:53
Closed_By HLeithner
avatar HLeithner HLeithner - close - 2 Sep 2023
avatar HLeithner HLeithner - merge - 2 Sep 2023
avatar HLeithner
HLeithner - comment - 2 Sep 2023

can you create a documentation for template devs in the manual? and maybe something in the migration section?

avatar brianteeman
brianteeman - comment - 2 Sep 2023

will do

Add a Comment

Login with GitHub to post a comment