Jump to content

Recommended Posts

Posted

Another fix is to append a script tag and call an init function. That would be more reliable imo.

  • Like 1
Posted
1 hour ago, tpr said:

Another fix is to append a script tag and call an init function. That would be more reliable imo.

I'm not sure how that would make it more reliable, since that's not one of the issues we were having to start with—and this way of handling the JS cuts down on complexity/errors that adding another included script file could introduce.

Posted

The theory is to call the init fx after the field is rendered, no matter if its Ajax loaded or inside a tab, etc. A script tag appended to a field would run when the field Dom is ready. I haven't tested this in this particular case so it may fail somewhere, but in another module I made (not public) I went on this way and it solved all the timing/loading issues I had.

  • Like 1
Posted

thanks to the hard work of @ethfun, the module is now better than before, it will init on the fields that are closed by tab or accordion;
The latest version separates the plugin files so those are easy to update to the latest version by just copying them into the module, instead of having to edit the module assets.

@ethfun sorry about the confusion with the pull request etc, Friday was a bit hectic, and thanks again.

  • Like 1
  • 2 months later...
Posted

This is awesome, thank you. Using markdown for my new blog, and a plain ol' textarea just wasn't doing it for me anymore.

Regarding the fullscreen issue in Reno, add this to the css:

.CodeMirror-fullscreen {
	z-index: 12;
}

.editor-toolbar.fullscreen {
	z-index: 13;
}

 

  • Like 1
  • 1 year later...
Posted

For any users out here of this module, who are using languages, can anyone test to see if the latest version initializes the textareas on the language tabs when switching between language tabs?

I had a github issue report that only the first visible language tab's instance was getting initialized, so added the language tabs switching event to the array of events that trigger the field to get instantiated, and this works on my local testing, but the person who reported the issue was not seeing it working..

 

 

Posted

I'm sorry, but it does not work for me either. I have three languages, the default (German) is working, the others not. 

Posted

@Macrura Yes, its the latest version. For me, the function on line 41 gets fired once - on loading the field, but not on changing the tabs.

Posted

ok thanks - looks like a problem with UiKit; it does work on reno for sure; uikit doesn't use jquery ui tabs so that event is not firing

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