Python Forum
CKEditor / Rin Editor
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CKEditor / Rin Editor
#71
OK i figured out how to make an image there. Not sure how to put up text...unless the text is inside the image. But i just put up an electrical symbol for a place holder. Im not sure what is a good symbol for switching modes; or whether you want text.

For future reference....The javacsript file calls the image which was called "Source" but it called an image with the text on it, not the string Source. So to put a new image up there you have to use the image in /jscripts/rin/editor/icons with 16x16, and link it with this button at jscripts/rin/editor/ckeditor.js line 972 (currently linking to file "acsource"), at the same time going into ACP and adding acsource seperated by a comma with no spaces in the list of buttons. I guess if the image is used here it does not list the button in with our other buttons, but if it is not used here, it adds the button with out other buttons. So if you change it to something else you have to remove it from the list.
Recommended Tutorials:
Reply
#72
metulburr - I know it's more painful for you than anyone else. I will be patient.
Reply
#73
(Jul-29-2017, 02:20 AM)metulburr Wrote: OK i figured out how to make an image there. Not sure how to put up text...unless the text is inside the image.
I was starting to look into it,i could change <Source> name in browser but did not start look in into source code.
Now is that text gone so it's a little hard to figure it. 

I have change icon Ctrl + F5 to see it,to a T| icon as a test.
This may be okay as it say Source with mouse over.
Reply
#74
(Jul-28-2017, 05:05 PM)metulburr Wrote: Ive tried numerous time. Even went into chrome settings and cleared everything out, including password, cached images, browser history, etc. Tried a lot of times with Ctrl + F5. I cant seem to get it to work at all.

It works for me on Chrome, on Windows.
It DOES NOT work in Internet Explorer.  Furthermore, opening IE's dev tools to try to find out why actually crashes the browser.
It also DOES NOT work in Edge.  But the dev tools DO work here, and I see an error (.append does not exist).

Edge is actually fairly standards compliant, which means there's probably an actual issue with how I was doing it before.  This new version works in all the browsers I've tested.  I think the issue boils down to the fact that the new quick-editor is in an iframe, and different browsers treat iframes differently.  .append() is a jquery thing, so I changed it to just use raw DOM manipulation instead.
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 {
            var content = document.createElement("span");
            content.innerHTML = text;
            textarea.appendChild(content);
        }
    }
    if (!popup)
    {
        //setTimeout(function() { textarea.focus(); }, 10);
    }
}
Reply
#75
switched; still get the same issue on chrome on mine.
Recommended Tutorials:
Reply
#76
(Jul-29-2017, 10:22 AM)snippsat Wrote: I have change icon Ctrl + F5 to see it,to a T| icon as a test.
This may be okay as it say Source with mouse over.
Im not sure where the tooltip is for Source, otherwise i would change it to something like "Toggle Source/WYSIWYG modes"
Recommended Tutorials:
Reply
#77
(Jul-30-2017, 05:12 PM)metulburr Wrote: Im not sure where the tooltip is for Source, otherwise i would change it to something like "Toggle Source/WYSIWYG modes"
There has been a redirection with new editor,i did remember where it was before. 
I think is quite okay now,and that most interpret it as Text Source.
WYSIWYG modes Confused is not so easy to understand for everybody.
Reply
#78
i already had switched the tooltip (at least for english translations).

Attached Files

Thumbnail(s)
   
Recommended Tutorials:
Reply
#79
(Jul-30-2017, 09:40 PM)metulburr Wrote: i already had switched the tooltip (at least for english translations).
I have the Norwegian version which is the same  Wink
Reply
#80
I haven't been able to pinpoint what causes it, but the quick reply editor sometimes appears to wrap every line of python in [ code] tags, making the whole code block illegible.  Also, there's a weird red dashed line with a caption of either "create line break here" or "add paragraph here".  I don't know if they're related, but both of those only seem to happen with the quick reply box.
Reply


Forum Jump:

User Panel Messages

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