|
Post by Eton Bones on Jul 30, 2016 12:49:32 GMT -5
utrtdxx
|
|
|
Post by tester on Jun 6, 2021 0:43:41 GMT -5
test a b c d e f g h i j k l m n o p q r s t u v w x y z
|
|
|
Post by Eton Bones on Jun 6, 2021 0:46:33 GMT -5
yeast 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0
|
|
|
Post by guestPoster on Jun 8, 2021 0:28:59 GMT -5
test 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 12
|
|
|
Post by EtonPoster on Jun 8, 2021 0:31:08 GMT -5
1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 12
|
|
|
Post by questPoster on Jun 8, 2021 0:33:12 GMT -5
1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 12 Spoilers can no longer be edited in the preview pane because they are hidden. Previously they were given no special treatment in that pane but now they are given an id attribute and set to style="display:none;" effectively leaving them uneditable with no clickable anchor to hide/unhide them present in that pane. We need anchors now that they're hidden... $(document).on('wysiwygcreate', function (createevent) { var wy = $(createevent.target).data('wysiwyg'); function addSpoils() { $('.visual-editor iframe').contents().find('div.spoiler[id^=spoiler]').filter(':not(.wysiwygfixed)') .each(function (i, e) { /* add anchor for open/close of spoiler */ $(e).before('<a href="javascript:void(0);" onclick="var spoiler=document.getElementById(\'' + e.id + '\'); if(spoiler.offsetWidth>0){spoiler.style.display=\'none\';this.innerHTML=\'SPOILER: Click to show\'; }else{ spoiler.style.display=\'block\' ;this.innerHTML=\'SPOILER: Click to hide\';} return false;" contentEditable="false" class="spoiler-anchor">SPOILER: Click to show</a>') /* add class to mark as fixed */ .addClass('wysiwygfixed') /* trigger a custom event for those who may want to join the party */ .trigger('spoilercreate') })
} /* do da ting */ addSpoils() /* Co-opt the wysiwyg switchEditor method so we know when to start cleanup */ modifyMethod(wy, 'switchEditor', function (oldFn, binding) { return function (old) { /* Co-opt the wysiwyg getContent method of preview tab so we can prepare prior to content being sent */ modifyMethod(wy.editors.visual, 'getContent', function (oldFn, binding) { return function (old) { $('.spoiler-anchor', wy.editors.visual.editable).remove(); $('.wysiwygfixed', wy.editors.visual.editable).removeClass('wysiwygfixed') debugger; return old.apply(this, Array.prototype.slice.call(arguments, 1)); } .bind(binding, oldFn) }) /* Co-opt the wysiwyg setContent method of preview tab so we can process after content has been set */ modifyMethod(wy.editors.visual, 'setContent', function (oldFn, binding) { return function (old) { var ret = old.apply(this, Array.prototype.slice.call(arguments, 1)); addSpoils(); } .bind(binding, oldFn) }) /* We only needed the switchEditor only once so we could setup our setContent/getContent hooks, restore original fn and call it */ return (wy['switchEditor'] = old).apply(this, Array.prototype.slice.call(arguments, 1)) } .bind(binding, oldFn) })
function modifyMethod(object, methodName, fnWrapper) { object[methodName] = fnWrapper(object[methodName], object) }
})
|
|
|
Post by KwestPoster on Jun 8, 2021 0:35:56 GMT -5
1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 12
|
|
|
Post by KuestPoster on Jun 8, 2021 0:45:36 GMT -5
1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 12
|
|