tpr Posted October 19, 2016 Share Posted October 19, 2016 Another fix is to append a script tag and call an init function. That would be more reliable imo. 1 Link to comment Share on other sites More sharing options...
ethanbeyer Posted October 19, 2016 Share Posted October 19, 2016 On 10/19/2016 at 3:44 PM, tpr said: Another fix is to append a script tag and call an init function. That would be more reliable imo. Expand 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. Link to comment Share on other sites More sharing options...
tpr Posted October 19, 2016 Share Posted October 19, 2016 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. 1 Link to comment Share on other sites More sharing options...
Macrura Posted October 24, 2016 Author Share Posted October 24, 2016 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. 1 Link to comment Share on other sites More sharing options...
ethanbeyer Posted October 25, 2016 Share Posted October 25, 2016 @Macrura Thanks for taking my suggestions into account! Loved getting to help you improve it just that little bit. Thanks again for the module to begin with! Link to comment Share on other sites More sharing options...
Mike Rockett Posted December 30, 2016 Share Posted December 30, 2016 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; } 1 Link to comment Share on other sites More sharing options...
Macrura Posted December 30, 2016 Author Share Posted December 30, 2016 cool thanks!, i added that and bumped the version 2 Link to comment Share on other sites More sharing options...
Mike Rockett Posted December 30, 2016 Share Posted December 30, 2016 Most welcome - I have also submitted an issue to the SimpleMDE repo regarding possible implementation of Markdown Extra features. That would be truly awesome. 1 Link to comment Share on other sites More sharing options...
Macrura Posted July 7, 2018 Author Share Posted July 7, 2018 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.. Link to comment Share on other sites More sharing options...
Noboru Posted July 7, 2018 Share Posted July 7, 2018 I'm sorry, but it does not work for me either. I have three languages, the default (German) is working, the others not. Link to comment Share on other sites More sharing options...
Macrura Posted July 7, 2018 Author Share Posted July 7, 2018 @Noboru – are you using the latest version, 106, and are loading latest js file (check to see if you have the correct line 41)? https://github.com/outflux3/InputfieldSimpleMDE/blob/d8eab8ad345d5961ab4ae65c7272bf281e5b5728/InputfieldSimpleMDE.js#L41 Link to comment Share on other sites More sharing options...
Noboru Posted July 7, 2018 Share Posted July 7, 2018 @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. Link to comment Share on other sites More sharing options...
Macrura Posted July 7, 2018 Author Share Posted July 7, 2018 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now