Posts: 5,150
Threads: 396
Joined: Sep 2016
Jul-29-2017, 02:20 AM
(This post was last modified: Jul-29-2017, 02:20 AM by metulburr.)
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:
Posts: 11,883
Threads: 474
Joined: Sep 2016
metulburr - I know it's more painful for you than anyone else. I will be patient.
Posts: 7,107
Threads: 122
Joined: Sep 2016
Jul-29-2017, 10:22 AM
(This post was last modified: Jul-29-2017, 10:22 AM by snippsat.)
(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.
Posts: 3,458
Threads: 101
Joined: Sep 2016
(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);
}
}
Posts: 5,150
Threads: 396
Joined: Sep 2016
switched; still get the same issue on chrome on mine.
Recommended Tutorials:
Posts: 5,150
Threads: 396
Joined: Sep 2016
(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:
Posts: 7,107
Threads: 122
Joined: Sep 2016
(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 is not so easy to understand for everybody.
Posts: 5,150
Threads: 396
Joined: Sep 2016
i already had switched the tooltip (at least for english translations).
Attached Files
Thumbnail(s)
Recommended Tutorials:
Posts: 7,107
Threads: 122
Joined: Sep 2016
(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
Posts: 3,458
Threads: 101
Joined: Sep 2016
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.
|