MyBB Community Forums

Full Version: Rin Editor 1.2.4 (Powerd by CKEditor)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2021-09-22, 02:12 PM)PARADOX987 Wrote: [ -> ]i just asked is there any way to turn this feature supportable for mobile phones that's , i remember what have i asked before , your answer was clear that it didn't work in mobile devices now i just wanted to know if there is any way 😒. So silly question isn't it !

Besides all of this i wanna say thank you for this amazing plugin .

Fast Quote is working in mobile phones, but only if you are not using the Rin Editor as quick editor. Fast quote ist not compatible with the quick quote. I also tried to get this working, but it's difficult because Rin Editor is using a iframe as textfield etc.

I also tried to get Quick Quote working on mobile phones, but what I got so far is not changing much.

<div class="rin-qc" id="qr_pid_{$post['pid']}" href="javascript:void(0);">{$lang->postbit_button_quote}</div>
<script type="text/javascript">
$(document).ready(function() {
    quick_quote({$post['pid']}, '{$post['username']}', {$post['dateline']});

    var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);

    // Funktion für die Auswahl von Text
    $(document).on("touchend", function(event) {
        var target = $(event.target);
        if (!target.hasClass("post")) {
            target = target.parents(".post");
        }

        if (target && target.length) {
            var postID = target[0].id.split("_")[1];
            var selectedText = window.getSelection().toString().trim();
            if (selectedText) {
                // Text wurde ausgewählt, zeige den Button
                var button = $("#qr_pid_" + postID);
                var range = window.getSelection().getRangeAt(0);
                var rect = range.getBoundingClientRect();
                button.css({ top: window.scrollY + rect.top + rect.height + 6 + "px", left: getposition().left - button.outerWidth() + 10 + "px" });
                button.show();
            } else {
                // Kein Text ausgewählt, verstecke den Button
                $("#qr_pid_" + postID).hide();
            }
        }
    });

    // Funktion für das Touch-Ereignis des Buttons (nur auf mobilen Geräten)
    $(".rin-qc").on("click touchend", function(event) {
        if (isMobile) {
            var postID = $(this).attr("id").split("_")[1];
            var username = "{$post['username']}";
            var dateline = {$post['dateline']};
            quick_quote(postID, username, dateline);
            event.stopPropagation();
            event.preventDefault();
        }
    });
});
</script>

The problem here is, that the button is not showing directly after you marked the text. You have to scroll down or something first, to get the button shown up, but then the button is not working anymore. It is only working before the second touch on the screen, when it's invisible. And yes, then the text get's quotet on smartphones. So I am feeling like half way through, but I am sitting here for hours testing some stuff.

Maybe a normal button would be better, instead of the floating button beside the text, like in fast quote. But if I make the button not absolute and display block, it is the same result. As soon as it is visible, after the second touch on the screen, it is not working anymore. Only when I click where the button hast to be, but when it's still invisible.

Chat GPT recommended to use the internal menu for text on smartphones, where you can copy text and so on. Seems like it would be possible to list the quote function there, but I am making no progress there also.

Maybe I or somebody reading this will find a solution or would be interested to help to get a text marking quote function working on mobile phones. Would be happy to brainstorm some ideas.