Jump to content

Inputfield ACE Extended


owzim

Recommended Posts

  On 1/3/2018 at 2:30 PM, bernhard said:

hi @owzim i want to include your module in my kickstart module and found this issue on the uikit admin theme (full width font size input), would be great to get a fix for it :) thanks

ace.thumb.png.f5c687d29961d964bf7677baef5d219c.png

Expand  

Hi, unfortunately I currently have little resources for that. You are welcome to open a PR though.

Link to comment
Share on other sites

  • 5 years later...

Just in case I am not the only one trying to use this great (thanks @owzim!) module inside a repeater with dynamic (AJAX) load of items, it indeed works using the "current" (Oct 2017) dev version along with a tiny fix in ace-extended.js:

The issue is, that acefy is invoked multiple times for the same inputfield, which finally seems to trash the JS engine. Just add two lines of code right before $textarea.each (in acefy):

		:
		//Fix: Avoid duplicate and recursive invocation of acefy
        if($textarea.hasClass(ACE_INITIALIZED_CLASS))
            return;
        $textarea.addClass(ACE_INITIALIZED_CLASS);    // Mark wrapper as initialized
        //FixEnd
        
        $textarea.each(function() {
		:

and add an appropriate initialization for ACE_INITIALIZED_CLASS at the head of the module:

        ACE_INITIALIZED_CLASS        = 'AceInitialized'
  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Hey,

there is a deprecation notice when running php 8.3 🥸

Deprecated: Calling get_class() without arguments is deprecated in .../cache/FileCompiler/site/modules/InputfieldAceExtended/InputfieldAceExtended.module on line 499

The error "Deprecated: Calling get_class() without arguments is deprecated" occurs when using PHP 8.3 or later to call the get_class() function without providing an argument. 
This is because the function's arguments are now required. 

Call get_called_class(), which works similarly to get_class() but doesn't require arguments. 

public static function getStatic($name)
{
  $class  = get_called_class();
  return isset($class::$$name) ? $class::$$name : array();
}
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...