NPM Resource Changed ? Pending

User tests: Successful: Unsuccessful:

avatar bembelimen
bembelimen
2 Jan 2021

Pull Request for Issue #30336 .

Summary of Changes

Added a basic editor.css for tinyMCE

Testing Instructions

Activate the tinyMCE (if not active yet) and create an article. Check code that the editor.css is loaded.

Actual result BEFORE applying this Pull Request

No editor.css loaded

Expected result AFTER applying this Pull Request

editor.css loaded

avatar bembelimen bembelimen - open - 2 Jan 2021
avatar bembelimen bembelimen - change - 2 Jan 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Jan 2021
Category Front End Templates (site) NPM Change
avatar bembelimen bembelimen - change - 2 Jan 2021
Labels Added: NPM Resource Changed ?
avatar richard67
richard67 - comment - 2 Jan 2021

@bembelimen Does this also solve the other issue #29031 ?

avatar richard67
richard67 - comment - 2 Jan 2021

I have tested this item successfully on 1ac6f1c

I can confirm that with this PR, the editor.css of the Cassiopeia template is loaded and e.g. the Cassiopeia font family and so on are applied.


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

avatar richard67 richard67 - test_item - 2 Jan 2021 - Tested successfully
avatar ceford
ceford - comment - 2 Jan 2021

Not sure about this. The system editor.css seems to be loaded with or without the patch. There is no editor.css in Cassiopeia - am I supposed to create one?


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

avatar richard67
richard67 - comment - 2 Jan 2021

@ceford This PR here creates that file templates/cassiopeia/scss/editor.scss. You need to run npm run build:cssto compile it. Or you need to test with the installation or update packages build by drone for this PR.

avatar bembelimen
bembelimen - comment - 2 Jan 2021

@bembelimen Does this also solve the other issue #29031 ?

Could be

avatar brianteeman
brianteeman - comment - 2 Jan 2021

Please reopen #27475 as it is not related to this PR at all

avatar ceford
ceford - comment - 2 Jan 2021

I have tested this item successfully on 1ac6f1c

Not sure what I did wrong before. But I note that reverting the patch and running npm again does not remove the editor.css file.


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

avatar ceford ceford - test_item - 2 Jan 2021 - Tested successfully
avatar richard67 richard67 - change - 2 Jan 2021
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 2 Jan 2021

RTC


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

avatar HLeithner
HLeithner - comment - 2 Jan 2021

No padding
nopadding

Tiny broken?
broken styles

Some predefined style should be removed
toomany

and css variables are not defined like --cassiopeia-font-family-body

avatar brianteeman
brianteeman - comment - 2 Jan 2021

As @HLeithner has correctly pointed out this PR is not correct - I cant see how anyone can have claimed to have tested it.

There is absolutely no way that an editor.css should be over 1000 lines!!

It really only needs to have the aspects of the css file that are related to text.

There should be one system wide editor.css located in the system template (or wherever Dmitiris has moved it) which is simple and then any additional classes or changes required for the cassiopeia template in this editor.css

avatar richard67
richard67 - comment - 2 Jan 2021

I cant see how anyone can have claimed to have tested it.

Well, I've followed the testing instructions ... seems they were not complete.

avatar richard67 richard67 - change - 2 Jan 2021
Status Ready to Commit Pending
avatar richard67
richard67 - comment - 2 Jan 2021

Back to pending.


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

avatar brianteeman
brianteeman - comment - 2 Jan 2021

Actual result BEFORE applying this Pull Request

No editor.css loaded

I assume that you meant no cassiopeia editor.css was loaded because there is a system editor.css loaded

image

avatar bembelimen
bembelimen - comment - 14 Jan 2021

Just a reminder for myself (or if anyone is willing to help improving this PR): https://www.tiny.cloud/docs/plugins/opensource/importcss/

avatar bato3
bato3 - comment - 18 Jan 2021

Instead of adding too many lines to editor.css (eg @import "../../../media/vendor/bootstrap/scss/reboot"; 480 lines before minimization), you might want to think about another way to make visual changes to the editor.
I couldn't find a native method, so I added in: /media/vendor/tinymce/skins/ui/oxide/content.min.css line: @import url("https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css"); (I should have added fontawesome, but the lack of it doesn't bother me that much.)

As I think about it now, the best solution would be an editor plugin that would insert css from the current template. In addition, it could, depending on the skin configuration, set the content width to that configured on the page.
visalisation
The idea is that the content did not occupy the entire width of the editor, but has width from the site.

Personally, I often use the card's, but adding them to editor.css it is pointless, because editor deal with them poorly.

And my proposition extra content in editor.scss:

.text-nowrap {
    white-space: nowrap !important;
}
/* or `pull` - I don't remember which is bootstrap and my nested */
.float-left { float: left !important; }
.float-right { float: right !important; }

table {
  &.table, &.table-striped, &.table-hover {
    width:100%;
  }
  &.table-sm {
    width:100%;
    th,
    td {
      padding: $table-cell-padding-sm;
    }
  }
  &.table-bordered {
    border: $table-border-width solid $table-border-color;
    th,
    td {
      border: $table-border-width solid $table-border-color;
    }

  }
}
/* My next attempt to cope with adding these classes. 
Unfortunately, the editor cannot cope with them. 
It only displays that it has been applied.  
(and this was before puting `bootstrap.css` in `content.min.css`*/
tr.thead-dark {
  width:100%;
  th {
    color: $table-dark-color;
    background-color: $table-dark-bg;
    border-color: $table-dark-border-color;
  }
}

tr.thead-light {
  width:100%;
  th {
    color: $table-head-color;
    background-color: $table-head-bg;
    border-color: $table-border-color;
  }
}

//edit

I assume that you meant no cassiopeia editor.css was loaded because there is a system editor.css loaded

Not always. Behaviour is in: https://github.com/joomla/joomla-cms/blob/4.0-dev/plugins/editors/tinymce/tinymce.php#L308-L339 ($content_css_custom -> site template -> system template -> warming)

avatar brianteeman
brianteeman - comment - 2 Apr 2021

I've been looking into this one and from what I am able to tell there is no way to generate the cassiopeia editor.css file automatically in the way this PR works that only contains the required css. As far as I can tell the only way is to manually create an editor.css file.

avatar bembelimen
bembelimen - comment - 6 Apr 2021

Thanks for the tests and the feedback.

avatar bembelimen bembelimen - change - 6 Apr 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-04-06 15:12:28
Closed_By bembelimen
avatar bembelimen bembelimen - close - 6 Apr 2021

Add a Comment

Login with GitHub to post a comment