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

Add possibility of rte dynamic css #1

Open
kaystrobach opened this issue Apr 12, 2013 · 9 comments
Open

Add possibility of rte dynamic css #1

kaystrobach opened this issue Apr 12, 2013 · 9 comments

Comments

@kaystrobach
Copy link
Owner

needs some thougths -> options define name in ts -> link in page module, needs to respect templates as well -> relativ complex :D

@ghost ghost assigned kaystrobach Apr 12, 2013
@kaystrobach
Copy link
Owner Author

@Laslow any idea how to solve this? basicly we would need to have a dynamic name, which is consistent between FE and BE and we would also need to know all the TS variables from the frontend.

@Shade634
Copy link
Contributor

i kinda miss the issue here, you can take over the same generated file for the rte content for front-end and backend?

@kaystrobach
Copy link
Owner Author

the idea was to include the dynamically generated css file here.

for themes it should be enough to include a once generated css file, atleast for the first version ...

@Shade634
Copy link
Contributor

yea, the only hard thing in here is the #content divs and classed styled content, other then that, the default style can be simply implemented by implementing the all.css

@kaystrobach
Copy link
Owner Author

that is the nice thing about less and sass: you can do sth. like:

--------------------
rte.less
--------------------
.bla {
}

--------------------
content.less
--------------------
#content {
 @import rte.less; 
}

the resulting css will have sth. like:

#content .bla {
}

and then you can include content.less in the frontend and the rte.less in the backend, but the dynamic TS overlay makes it more complex ;)

@kaystrobach
Copy link
Owner Author

architectural we need to do:

  • parse sys_template to get overrides
  • parse and modify pageTS similar to fe (less file gets replaced with resulting css)

@kaystrobach
Copy link
Owner Author

just checked out some stuff here.

the function \TYPO3\CMS\Rtehtmlarea\RteHtmlAreaBase::getContentCssFileName has no way to replace that file.

So an easy solution would be to provide that file as css e.g. in the pageTS with a theme.
another option would be to directly hook into the pagets rendering and exchange the css ... but this is rather ugly imho.

I would prefer to close this for now, until we have a fast and reliable solution, as we would normally need to parse the constants from the sys template record and pass them to the renderer

@mkoitka
Copy link

mkoitka commented Oct 26, 2015

For completeness' sake, the RTE method for registering the CSS has changed in TYPO3 7.x.

See current TYPO3 API

Apart from that it's quite an appreciated feature. How do you guys currently handle it? Any workarounds?

I don't know how important the TS overlay is, perhaps it's acceptable to first go without it for the RTE, if documented properly. ;)

@kaystrobach
Copy link
Owner Author

i think i will check this again once we have the new RTE 😄 in TYPO3 CMS 8

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

No branches or pull requests

3 participants