Python Forum
CKEditor / Rin Editor
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CKEditor / Rin Editor
#41
Thanks i think we try as this.
It can be a little confusing for new user if Source Mode is on bye default.
This editor make it more clear bye changing to smaller font in Source Mode.
Now is Remove formatting Button in both Quick Reply and Preview Post,
so will how this goes.
Reply
#42
I don't know if it's been mentioned yet, but the "quote highlighted text" button no longer works.

I looked into it, and that button just calls the javascript function addquote(), which doesn't appear to do anything relevant (it just gets the text), but it does call insert_text().

insert_text() looks for a particular form named "quick_reply_form", which is fine, but within that form, it looks for an element named "message", which is now a textarea that's hidden (perhaps the content of a post is copied to that element before pushing to the server, but that's not relevant here).  The actual editor is nested inside an iframe, which is kind of terrible but whatever.

If that function (starting at line 50 of this file) is replaced with this version I slightly modified, it should start working again.
 
function insert_text(text, spaces, popup)
{
    var textarea;

    if (!popup)
    {
        //textarea = document.forms[form_name].elements[text_name];
        textarea = document.forms[form_name].getElementsByTagName("iframe")[0].contentDocument.body;
    }
    else
    {
        textarea = opener.document.forms[form_name].elements[text_name];
    }
    if (spaces)
    {
        text = ' ' + text + ' ';
    }
    if (!isNaN(textarea.selectionStart))
    {
        var sel_start = textarea.selectionStart;
        var sel_end = textarea.selectionEnd;

        mozWrap(textarea, text, '');
        textarea.selectionStart = sel_start + text.length;
        textarea.selectionEnd = sel_end + text.length;
    }

    else if (textarea.createTextRange && textarea.caretPos)
    {
        if (baseHeight != textarea.caretPos.boundingHeight)
        {
            setTimeout(function() { textarea.focus(); }, 10);
            storeCaret(textarea);
        }
        var caret_pos = textarea.caretPos;
        caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text;

    }
    else
    {
        if (popup) {
            textarea.value = textarea.value + text;
        } else {
            textarea.append(text);
        }
    }
    if (!popup)
    {
        //setTimeout(function() { textarea.focus(); }, 10);
    }
}
Reply
#43
@nilamo
switched it. Doesnt appear to be working still. Sad

Quote:insert_text() looks for a particular form named "quick_reply_form",
quick_reply_form might be the default quick reply textarea not the Rin Editor quick reply textarea?
Recommended Tutorials:
Reply
#44
It worked for me, but only after clearing my cache (since it's a javascript file).  ctrl+F5, then try again.
Reply
#45
It work for me to(in Chrome),did not before as i mention here.
There is a problem if i try in FireFox.
Debug message.
Error:
TypeError: textarea.append is not a function textarea.append(text);     fastQuote.js (line 93, col 13)
More info:
Error:
insert_text() --> fastQuote.js:93 addquote() --> fastQuote.js:180 onclick() --> Text that is highlighted 
Reply
#46
I have a newer version of FireFox(54.0) on laptop.
There it work fine,so i guess that fix @nilmao suggests works fine.

The Note moderator plugin dos not look so good now.
Reply
#47
(Jul-28-2017, 01:54 PM)nilamo Wrote: It worked for me, but only after clearing my cache (since it's a javascript file).  ctrl+F5, then try again.

tried that, still cant get the button to work in chrome. It does work in Firefox though.
metulburr@ubuntu:~$ google-chrome --version
Google Chrome 58.0.3029.110
metulburr@ubuntu:~$ firefox --version
Mozilla Firefox 54.0
Recommended Tutorials:
Reply
#48
(Jul-28-2017, 04:14 PM)snippsat Wrote: The Note moderator plugin dos not look so good now.
I heave a feeling that the note moderator is using the default MyBB editor which i might be pessed up when Rin Editor is active? That or try the old theme for Rin Editor to see if it effects it.

I could really care less about the note moderator BBCode Buttons, although it seemed like a normal feature. Most of the time we just type a sentence and thats its.;No fancy stuff.
Recommended Tutorials:
Reply
#49
I see the theme has changed and fixed the note moderator BBCodes. This means it has to be the CSS of theme? If you want to take a whack at it, have at it. I was just about to post a question to the plugin author but i dont think its plausible now that we narrowed down the culprit.
Recommended Tutorials:
Reply
#50
(Jul-28-2017, 04:49 PM)metulburr Wrote: tried that, still cant get the button to work in chrome.
Update and Ctrl+F5,try again.
Quote:The latest version of Chrome is: 60.0.3112

(Jul-28-2017, 04:53 PM)metulburr Wrote: That or try the old theme for Rin Editor to see if it effects it.
It's okay with old theme.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020