From a68e8175b0b3b4c960c527fd48940bbeebac159b Mon Sep 17 00:00:00 2001 From: martec Date: Tue, 11 May 2021 14:26:51 +0900 Subject: [PATCH] 0.4.2 --- re_version_file.json | 4 ++-- rin/editor/composer.json | 4 ++-- rin/editor/styles/all/template/js/rineditor.js | 8 ++++---- rin/editor/styles/all/template/js/thread.quickreply.js | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/re_version_file.json b/re_version_file.json index 4803a5f..9030c67 100644 --- a/re_version_file.json +++ b/re_version_file.json @@ -1,9 +1,9 @@ { "stable": { "0.4": { - "current": "0.4.1", + "current": "0.4.2", "announcement": "https://www.phpbb.com/community/viewtopic.php?f=456&t=2427126", - "download": "https://github.com/martec/Rin-Editor_for_phpBB/archive/0.4.1-beta.zip", + "download": "https://github.com/martec/Rin-Editor_for_phpBB/archive/0.4.2-beta.zip", "eol": null, "security": false } diff --git a/rin/editor/composer.json b/rin/editor/composer.json index e5ca903..0abfd4b 100644 --- a/rin/editor/composer.json +++ b/rin/editor/composer.json @@ -3,8 +3,8 @@ "type": "phpbb-extension", "description": "Rin Editor for phpBB", "homepage": "https://github.com/martec/Rin-Editor_for_phpBB", - "version": "0.4.1", - "time": "2021-03-08", + "version": "0.4.2", + "time": "2021-05-11", "license": "GPL-2.0-only", "authors": [ { diff --git a/rin/editor/styles/all/template/js/rineditor.js b/rin/editor/styles/all/template/js/rineditor.js index cc0ceb4..bdd4bf0 100644 --- a/rin/editor/styles/all/template/js/rineditor.js +++ b/rin/editor/styles/all/template/js/rineditor.js @@ -1,5 +1,5 @@ var smileyReverseMap={},smileyMap={};smileyMapnam=dropdownsmiliesname.concat(dropdownsmiliesnamemore);smileyMapdes=dropdownsmiliesdes.concat(dropdownsmiliesdesmore);smileyMapurl=dropdownsmiliesurl.concat(dropdownsmiliesurlmore);for(var i in smileyMapdes)smileyReverseMap[smileyMapdes[i]]=smileyMapnam[i],smileyMap[smileyMapnam[i]]=smileyMapdes[i]; -MyBBEditor={insertText:function(b,c,a,d,f){var e="",k=Object.keys(CKEDITOR.instances)[0],g=b,h=c;c||(c=h="");a||(a=k+"_2");e=a.slice(0,-2);d||(d="source");f||(f="");"source"==d?rinsourceditor.insert_text(b,c,a):(g=CKEDITOR.instances[e].dataProcessor.toDataFormat(CKEDITOR.instances[e].dataProcessor.toHtml(g+h),{context:"body"}),rinsourceditor.insert_text(g,"",a));if("undefined"!==typeof CKEDITOR&&CKEDITOR.instances&&(e||(e=k),"wysiwyg"==CKEDITOR.instances[e].mode)){a="";if(parseInt(seltext))try{a= -CKEDITOR.instances[e].getSelectedHtml().getHtml()}catch(l){}"source"==d&&""==a?(data=CKEDITOR.BBCodeToHtml(g+h,e),"quote"==f&&(data=data.replace(/([\s\S]*)<\/blockquote>/,"$1\x3c/blockquote\x3e\x3cbr\x3e")),CKEDITOR.instances[e].insertHtml(data)):CKEDITOR.instances[e].insertHtml(b+a+c)}return!1}};bbfontstyle=function(b,c){MyBBEditor.insertText(b,c)};insert_text=function(b,c){c&&(b=" "+b+" ");MyBBEditor.insertText(b)}; -rinsourceditor=function(){return{init:function(){return!0},insert_text:function(b,c,a){var d;a=document.getElementById(a);if(!a)return!1;if(document.selection&&document.selection.createRange)a.focus(),d=document.selection.createRange(),d.text=b+d.text+c;else if(a.selectionStart||0===a.selectionStart){d=a.selectionStart;var f=a.selectionEnd,e=a.scrollTop;a.value=a.value.substring(0,d)+b+a.value.substring(d,f)+c+a.value.substring(f,a.value.length);"\x3d"===b.charAt(b.length-2)?a.selectionStart=d+b.length- -1:a.selectionStart=d===f?f+b.length:f+b.length+c.length;a.selectionEnd=a.selectionStart;a.scrollTop=e}else a.value+=b+c;a.focus()}}}(); \ No newline at end of file +MyBBEditor={insertText:function(b,d,a,c,f){var e="",k=Object.keys(CKEDITOR.instances)[0],g=b,h=d;d||(d=h="");a||(a=k+"_2");e=a.slice(0,-2);c||(c="source");f||(f="");"source"==c?rinsourceditor.insert_text(b,d,a):(g="qreply"==c?CKEDITOR.instances[e].dataProcessor.toDataFormat(g):CKEDITOR.instances[e].dataProcessor.toDataFormat(CKEDITOR.instances[e].dataProcessor.toHtml(g+h),{context:"body"}),rinsourceditor.insert_text(g,"",a));if("undefined"!==typeof CKEDITOR&&CKEDITOR.instances&&(e||(e=k),"wysiwyg"== +CKEDITOR.instances[e].mode)){a="";if(parseInt(seltext))try{a=CKEDITOR.instances[e].getSelectedHtml().getHtml()}catch(l){}"source"!=c&&"qreply"!=c||""!=a?CKEDITOR.instances[e].insertHtml(b+a+d):(data=CKEDITOR.BBCodeToHtml(g+h,e),"quote"==f&&(data=data.replace(/([\s\S]*)<\/blockquote>/,"$1\x3c/blockquote\x3e\x3cbr\x3e")),CKEDITOR.instances[e].insertHtml(data))}return!1}};bbfontstyle=function(b,d){MyBBEditor.insertText(b,d)};insert_text=function(b,d){d&&(b=" "+b+" ");MyBBEditor.insertText(b)}; +rinsourceditor=function(){return{init:function(){return!0},insert_text:function(b,d,a){var c;a=document.getElementById(a);if(!a)return!1;if(document.selection&&document.selection.createRange)a.focus(),c=document.selection.createRange(),c.text=b+c.text+d;else if(a.selectionStart||0===a.selectionStart){c=a.selectionStart;var f=a.selectionEnd,e=a.scrollTop;a.value=a.value.substring(0,c)+b+a.value.substring(c,f)+d+a.value.substring(f,a.value.length);"\x3d"===b.charAt(b.length-2)?a.selectionStart=c+b.length- +1:a.selectionStart=c===f?f+b.length:f+b.length+d.length;a.selectionEnd=a.selectionStart;a.scrollTop=e}else a.value+=b+d;a.focus()}}}(); \ No newline at end of file diff --git a/rin/editor/styles/all/template/js/thread.quickreply.js b/rin/editor/styles/all/template/js/thread.quickreply.js index e386560..b83a262 100644 --- a/rin/editor/styles/all/template/js/thread.quickreply.js +++ b/rin/editor/styles/all/template/js/thread.quickreply.js @@ -1 +1 @@ -phpbb.addAjaxCallback("quick_replay",function(a){"undefined"!==typeof CKEDITOR?MyBBEditor.insertText(a.quick_reply_msg,"","","","quote"):(document.querySelector("textarea[name\x3d'message']").value+=a.quick_reply_msg,document.getElementById("qr_postform").scrollIntoView())});var mySelector=document.querySelectorAll("a[href^\x3d'./posting.php?mode\x3dquote\x26']"),i=0,l=mySelector.length;for(i;i