Current date/time is March 29th 2024, 10:18 am
Search found 8 matches for text_editor_textarea
Broken Code
Technical Details
Forum version : #phpBB2
Position : Founder
Concerned browser(s) : Other
Screenshot of problem : https://i.servimg.com/u/f11/17/92/08/00/20891410.png - https://i.servimg.com/u/f11/17/92/08/00/20891610.jpg
Who the problem concerns : All members
When the problem appeared : Today
Forum link : http://immortalbloodlines.forumotion.co.nz/
Description of problem
With the recent updates to the Forumotion platform, I have received numerous reports that my users cannot post new topics using the mobile interface. They can type a topic title and description but the “Send” button remains disabled.To investigate this issue, I connected my iPhone to my laptop and viewed the Web Developer console.
Upon page load, the following JavaScript Error occurs:
TypeError: $("#text_editor_textarea").sceditor is not a function. (In '$("#text_editor_textarea").sceditor("instance")', '$("#text_editor_textarea").sceditor' is undefined)
The jQuery element for the textarea seems to resolve correctly but the attached editor instance is undefined. I cannot seem to find it in the scripts included in the mobile template so I am assuming it has been left out by mistake.
Attached are screenshots of the issue and the Developer console.
- on August 16th 2017, 11:14 pm
- Search in: Garbage
- Topic: Broken Code
- Replies: 2
- Views: 871
post form
I added it:$(function() {
if (location.pathname == '/post' && location.search == '?f=388&mode=newtopic') {
$('#text_editor_textarea').val('Product Name:');
}
});
But didnt work. Im a lawyer, I dont know how to make this codes dear
- on April 30th 2017, 8:48 am
- Search in: Scripts Problems Archives
- Topic: post form
- Replies: 13
- Views: 1536
phpBB2 - Asynchronous quotes
Ange Tuteur wrote:This is a nice plugin, as it makes quoting a lot faster !
It should work on every forum version, so long as the templates aren't modified.
I have some suggestions though :
1. I think the target element is a problem, as it's getting cut off on my one forum. I'd recommend scrolling to this anchor since it's right above the quick reply :
- Code:
document.anchors.quickreply
2. .sceditor-container textarea only affects Source mode, not WYSIWYG mode. So, I would recommend setting a sceditor instance on the GET request :
- Code:
$.get($(this).attr("href"), function(data) {
var instance = $('#text_editor_textarea').sceditor('instance');
instance.insert(quote_text_info + "\n");
instance.focus();
});
This way, it'll affect both source AND WYSIWYG mode. Check out this documentation for modifications to the SCEditor : http://www.sceditor.com/api/sceditor/
3. I'd change the textarea element in the GET request to #text_editor_textarea as that's the main id for the message editor. If someone has a textarea in the widgets for example, it'll also get this value which is why you should look for specifics or the first instance.
With those suggestions it'll look something like this :
- Code:
$(function() {
$(".i_icon_quote").parent().click(function(e) {
$.get(this.href, function(data) {
var quote_text_info = $('#text_editor_textarea', data).val(),
instance = $("#text_editor_textarea").sceditor("instance");
instance.insert(quote_text_info + "\n");
$("html, body").animate({ scrollTop: $(document.anchors.quickreply).offset().top }, 1000, function() {
instance.focus();
});
});
e.preventDefault();
});
});
Regardless, keep up the good work !
MUCH BETTER ! AND I SAY : THAT'S SHOULD BE IN NEW TOPIC
- on May 16th 2016, 9:00 am
- Search in: Community Coding and Analysis Zone
- Topic: phpBB2 - Asynchronous quotes
- Replies: 3
- Views: 3390
phpBB2 - Asynchronous quotes
This is a nice plugin, as it makes quoting a lot faster !It should work on every forum version, so long as the templates aren't modified.
I have some suggestions though :
1. I think the target element is a problem, as it's getting cut off on my one forum. I'd recommend scrolling to this anchor since it's right above the quick reply :
- Code:
document.anchors.quickreply
2. .sceditor-container textarea only affects Source mode, not WYSIWYG mode. So, I would recommend setting a sceditor instance on the GET request :
- Code:
$.get($(this).attr("href"), function(data) {
var instance = $('#text_editor_textarea').sceditor('instance');
instance.insert(quote_text_info + "\n");
instance.focus();
});
This way, it'll affect both source AND WYSIWYG mode. Check out this documentation for modifications to the SCEditor : http://www.sceditor.com/api/sceditor/
3. I'd change the textarea element in the GET request to #text_editor_textarea as that's the main id for the message editor. If someone has a textarea in the widgets for example, it'll also get this value which is why you should look for specifics or the first instance.
With those suggestions it'll look something like this :
- Code:
$(function() {
$(".i_icon_quote").parent().click(function(e) {
$.get(this.href, function(data) {
var quote_text_info = $('#text_editor_textarea', data).val(),
instance = $("#text_editor_textarea").sceditor("instance");
instance.insert(quote_text_info + "\n");
$("html, body").animate({ scrollTop: $(document.anchors.quickreply).offset().top }, 1000, function() {
instance.focus();
});
});
e.preventDefault();
});
});
Regardless, keep up the good work !
- on October 31st 2015, 10:59 am
- Search in: Community Coding and Analysis Zone
- Topic: phpBB2 - Asynchronous quotes
- Replies: 3
- Views: 3390
Auto Save Post Script not working
Here's the code$(function(){$(function(){
var saved = 1;
if($("#text_editor_textarea").length != 0){
$("input[type='submit'][name='post']").attr("disabled", true).css("opacity", "0.5");
$(".sceditor-container").after("<br/><div id='div_minchars_info'></div></div>");
var sceditor = $("#text_editor_textarea").sceditor("instance");
var str = sceditor.val();
var regex = new RegExp('\\w{' + saved + ',}\\b', 'g');
var str_arr = str.match(regex);
var str_len = str_arr == null ? 0 : str_arr.length;
if(str_len >= 1) $("input[type='submit'][name='post']").attr("disabled", false).css("opacity", "1");
sceditor.keyUp(function(e) {
str = sceditor.val();
str_arr = str.match(regex);
str_len = str_arr == null ? 0 : str_arr.length;
if(str_len >= 1) {
$("#div_minchars_info").html("Message saved");
$("input[type='submit'][name='post']").attr("disabled", false).css("opacity", "1");
}else{
$("#div_minchars_info").html("Message not saved");
$("input[type='submit'][name='post']").attr("disabled", true).css("opacity", "0.5");
}
});
}
})});
- on June 6th 2015, 8:30 pm
- Search in: Garbage
- Topic: Auto Save Post Script not working
- Replies: 4
- Views: 965
Javascript code
Javascript code does not work. I have activated it, but does not wor. it was working, but yesterday he did not work.I have this codes there and none oh them is working $(function(){$(function() {
$('.sceditor-button-size').click(function() {
addSize(8, 'before');
addSize(6, 'before');
addSize(26, 'after');
addSize(28, 'after');
$('.sceditor-fontsize-option.new-size').click(function(e){$('#text_editor_textarea').sceditor('instance').insertText('[size='+$(this).attr('data-size')+']','[/size]');$('.sceditor-fontsize-picker').remove();e.preventDefault()})
});
function addSize(size, position){
var data = '<a unselectable="on" class="sceditor-fontsize-option new-size" href="#" data-size="'+size+'"><span unselectable="on" style="font-size:'+size+'px;">'+size+'</span></a>';
if (position == 'after' || position == null) $('.sceditor-fontsize-picker div').append(data);
if (position == 'before') $('.sceditor-fontsize-picker div').prepend(data);
}
})});
$(function(){$(function() {
$('.sceditor-button-font').click(function() {
addFont('Papyrus');
addFont('Brush script MT');
addFont('Dom Casual');
addFont('KR Love Letters');
addFont('CookieMonster');
addFont('Dove Love');
addFont('Forte');
addFont('HeartlandRegular');
addFont('JLR Simple Hearts');
addFont('Jokerman');
addFont('KR Love Letters');
addFont('KR Valentine Heart');
addFont('KR Yours Truly');
addFont('Margarita in August');
addFont('Mark');
addFont('MC Sweetie Hearts');
addFont('Newlywed');
addFont('Caprica Sans IT Personal Use ');
addFont('Kiss Me Quick');
addFont('Starlight');
- on May 8th 2015, 12:39 pm
- Search in: Garbage
- Topic: Javascript code
- Replies: 5
- Views: 965
connection
yes they tried, but it is sameyes,I have
Css - ul.navlinks span.new-message {
color: #FF0000;
}
.sceditor-font-picker {
height:250px;
width:150px;
overflow-y:auto;
}
Javascript - $(function(){$(function(){
if ($("#text_editor_textarea").length < 1) return;
$.sceditor.command.get('color')._menu = function (editor, caller, callback) {
editor.createDropDown(caller, 'color-picker', '<iframe id="colorFrame" src="/chatbox/chatbox_selectcolor.htm" style="height:165px;width:250px;border:none;"></iframe>');
$('#colorFrame').load(function(){$('#colorFrame').contents().find('table[bgcolor="#000000"]').find('td').click(function(){callback($(this).attr('bgcolor'));editor.closeDropDown(true)})});
}
})});
$(function(){
if(_userdata.user_level == 1){}else{$('a[href*="editpost"]').remove();}
});
$(function(){$(function() {
$('.sceditor-button-size').click(function() {
addSize(8, 'before');
addSize(6, 'before');
addSize(26, 'after');
addSize(28, 'after');
$('.sceditor-fontsize-option.new-size').click(function(e){$('#text_editor_textarea').sceditor('instance').insertText('[size='+$(this).attr('data-size')+']','[/size]');$('.sceditor-fontsize-picker').remove();e.preventDefault()})
});
function addSize(size, position){
var data = '<a unselectable="on" class="sceditor-fontsize-option new-size" href="#" data-size="'+size+'"><span unselectable="on" style="font-size:'+size+'px;">'+size+'</span></a>';
if (position == 'after' || position == null) $('.sceditor-fontsize-picker div').append(data);
if (position == 'before') $('.sceditor-fontsize-picker div').prepend(data);
}
})});
$(function(){$(function() {
$('.sceditor-button-font').click(function() {
addFont('Papyrus');
addFont('Brush script MT');
addFont('Dom Casual');
addFont('KR Love Letters');
addFont('CookieMonster');
addFont('Dove Love');
addFont('Forte');
addFont('HeartlandRegular');
addFont('JLR Simple Hearts');
addFont('Jokerman');
addFont('KR Love Letters');
addFont('KR Valentine Heart');
addFont('KR Yours Truly');
addFont('Margarita in August');
addFont('Mark');
addFont('MC Sweetie Hearts');
addFont('Newlywed');
addFont('Caprica Sans IT Personal Use ');
addFont('Kiss Me Quick');
addFont('Starlight');
$('.sceditor-font-option.new-font').click(function(e){$('#text_editor_textarea').sceditor('instance').insertText('','');$('.sceditor-font-picker').remove();e.preventDefault()})
});
function addFont(font){$('.sceditor-font-picker div').append('<a unselectable="on" class="sceditor-font-option new-font" href="#" data-font="'+font+'"><font unselectable="on" face="'+font+'">'+font+'</font></a>')}
})});
$(function(){$(function(){
if ($("#text_editor_textarea").length < 1 || !$.sceditor) return;
$.sceditor.command.get('color')._menu = function (editor, caller, callback) {
editor.createDropDown(caller, 'color-picker', '<iframe id="colorFrame" src="/chatbox/selectcolor" style="height:165px;width:250px;border:none;"></iframe>');
$('#colorFrame').load(function(){$('#colorFrame').contents().find('table[bgcolor="#000000"]').find('td').click(function(){callback($(this).attr('bgcolor'));editor.closeDropDown(true)})});
}
})});
$('a').each(function() {
var a = new RegExp('/' + window.location.host + '/');
if(!a.test(this.href)) {
$(this).click(function(event) {
event.preventDefault();
event.stopPropagation();
window.open(this.href, '_blank');
});
}
});
- on May 1st 2015, 2:34 pm
- Search in: Connection Problems Archives
- Topic: connection
- Replies: 57
- Views: 3285
Colors
I had this colors on forumAnd now it doesnt work and are you able to correct the llinks? or halp mne?
$(function(){$(function(){
if ($("#text_editor_textarea").length < 1) return;
$.sceditor.command.get('color')._menu = function (editor, caller, callback) {
editor.createDropDown(caller, 'color-picker', '<iframe id="colorFrame" src="/chatbox/chatbox_selectcolor.htm" style="height:165px;width:250px;border:none;"></iframe>');
$('#colorFrame').load(function(){$('#colorFrame').contents().find('table[bgcolor="#000000"]').find('td').click(function(){callback($(this).attr('bgcolor'));editor.closeDropDown(true)})});
}
})});
- on February 6th 2015, 1:26 pm
- Search in: Scripts Problems Archives
- Topic: Colors
- Replies: 3
- Views: 658