Crop settings from Site settings

Hello Mark, I have a question =)
I want to use flexible crop on different contexts:
But when I do this - I geu in JS ContentBlocksFields unparsed values.

So I open Plugin and add this on 117 line (not sure that it is correct)

$chunk = $modx->newObject(‘modChunk’);
** $chunk->setCacheable(false);**
** $chunk->setContent($fields);**
** $fields = $chunk->process();**
Or use this:
$modx->getParser()->processElementTags(’’, $fields, false, false, ‘[[’, ‘]]’, array(), 10);
** $modx->getParser()->processElementTags(’’, $fields, true, true, ‘[[’, ‘]]’, array(), 10);**

So, My question is:
Is my solution correct and is it possible to add crop settings from Site settings? So in different contexts I can use different crops? Right now CB see only settings from SITE_SETTING table, not context_setting table…

Hello Heibel,
I’m afraid that on back-end, you are always in mgr context, not in the context of edited resource. So, in plugin you first need to get context of edited resource and then somehow process tags in cropper.