Jump to content

Inputfield ACE Extended


owzim

Recommended Posts

On 1/3/2018 at 3: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

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

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...