Is it possible to integrate the syntax highlighter in Rules->Action->Execute custom PHP code?
Thanks in advance
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | phpx_tools-documentation_update-2658600-22.patch.patch | 2.18 KB | imyaro |
| #12 | phpx_tools-codemirror_to_custom_forms-2658600-12.patch | 12.65 KB | imyaro |
Comments
Comment #2
imyaro commentedComment #3
imyaro commentedOk..
After few discussions I decided to add this workflow:
If user want to add codemirror hightlighting to any field which is not related devel/php page he should specify form (by form_id) and field (field machine name) in the settings form.
So we can apply this library to any form and field which we want to apply.
Please check patch below
Comment #4
imyaro commentedComment #5
imyaro commentedSeems my test field is in the patch.. Please check this one:
Comment #7
kala4ekCommitted.
Comment #8
Richard15 commentedI can't see anything wrong on that line...
Comment #9
kala4ekCan not check it now, but try just download dev version.
Comment #10
Richard15 commentedI downloaded it, here the problems:
1) on "configuration page" I have this error:
Error message
Notice: Undefined offset: 1 in phpx_tools_settings_form_submit() (line 46 of /home/tommasom/public_html/sites/all/modules/phpx_tools/phpx_tools.admin.inc).
2) I added this #id: 'rules-ui-edit-element' but still no highligthing on that form.
3) The "load" action on devel history/saved script doesn't work anymore.
Console shows:
TypeError: Drupal.settings.phpxtools is undefined
I will upload old version meanwhile.
Thanks
Comment #11
kala4ekComment #12
imyaro commentedFixed..
Comment #14
kala4ek@Richard15 could yow download latest dev release and check, does it ok for you?
Comment #15
Richard15 commentedStill no luck...
I had an error in phpx_tools.js
var $scriptName = $('#edit-script-name');
var $load = $('#' + $loadLink.attr('rel') + '-name', $parent);
if ($script_name.length > 0 && $load.length > 0) {
$scriptName.val($load.text());
about $script_name, I modified $scriptName in $script_name but nothing changed.
I add an error about the load of user.css as you can see in the pic.
Is the module working in your environment?
Comment #16
kala4ekComment #17
imyaro commentedHello,
It works OK for me on current dev and stable release.
Comment #18
Richard15 commentedWorking wonderfully with the last dev, just underline that it's important to put the "name" of form and textarea, no the id how was thinking and did wrong before :)
Thanks again for this useful module!
Regards
Cristian
Comment #19
Richard15 commentedComment #20
kala4ekNeed to update README file, and I will update project description after.
Comment #21
imyaro commentedUpdated.
I hope it will be enough.
Comment #22
imyaro commentedReadme also updated
Comment #24
kala4ek