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

3.0.0-alpha5 - HTML from richtext not parsed in MIGX grid #391

Open
deJaya opened this issue May 20, 2022 · 1 comment
Open

3.0.0-alpha5 - HTML from richtext not parsed in MIGX grid #391

deJaya opened this issue May 20, 2022 · 1 comment

Comments

@deJaya
Copy link

deJaya commented May 20, 2022

MIGX richtext fields [with no renderer selected for the column] no longer render with their rich text formatting in the grid columns:

image

Choosing the renderFirst renderer for richtext columns seems to work as a workaround although I'm not sure what that actually does or what other implications there might be from using it.

@halftrainedharry
Copy link
Contributor

I believe this is a problem with MODX 3 (and not with MIGX). There's a similar issue with the Collections extra.


The renderFirst renderer splits the value by the : character and returns the first part.

renderFirst : function(val, md, rec, row, col, s){
val = val.split(':');
return val[0];

So if there is a : in your Event Description, then not all the text is displayed.


To avoid this you could create a custom renderer:

  • Create a file grid.config.inc.php in core/components/somepackagename/migxconfigs/grid.
  • Add code for your custom renderer to this file:
<?php
$renderer['this.renderMarkup'] = "
renderMarkup : function(val, md, rec, row, col, s) {
    return val;
}
";
?>
  • In your config in the tab "MIGXdb-Settings" set the field "Package" to somepackagename.
  • In the tab "Columns" select your custom renderer ("this.renderMarkup") from the list.

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

2 participants