PDA

View Full Version : Textarea columns


RobDog888
10-07-2007, 08:05 PM
I am adding a textarea on a custom page and I tried using the fetch_text_area_width() function in the functions_editor.php file like so but it never is correct under any browser Im testing with.

// php file...
require_once(DIR . '/includes/functions_editor.php');

// ...

$textareacols = fetch_textarea_width();

// template
<textarea class="bginput" rows="4" cols="$textareacols" name="description" /></textarea>
// ..


In IE 7 its not wide enough to match the posticons fieldset and in IE 6 its way too wide. Seems like the function is not working correctly at all.

Arg! :D

RobDog888
10-07-2007, 09:33 PM
Well I guess for something "simplier" I will switch to the built in editor but would only want the quick reply editor and remove some buttons.


// in my php fle...
// set up the description textarea using the quick reply editor style
$show['wysiwyg'] = ($setting['allow_bbcode'] ? is_wysiwyg_compatible('', 'qr') : 0);
$istyles_js = construct_editor_styles_js();
$show['qr_require_click'] = 0;
$editorid = construct_edit_toolbar('', 0, 7, 1, 1, '', 'qr');
$messagearea = "
<script type=\"text/javascript\">
<!--
var require_click = false;
var threaded_mode = 1;
var is_last_page = false;
// -->
</script>
$messagearea
";

// ...
// template
// ...
$messagearea

// ...

This works correctly for the width but now I have the editor buttons to edit and they also dont work at all. They show the tooltips correctly but no action or mouseover style changes either. :( Font, size and color dropdowns wont drop for ex.

Oh and I get a js error "vb_Text_Editor" is undefined. I dont have it anywhere in my code but perhaps it somewhere in one of the function includes or js calls in them. :confused:

RobDog888
10-07-2007, 11:06 PM
I finally got it working as I needed a plugin to hook the editor_toolbar_start.

Any way to remove or disable only certain buttons? I initially need just the ones outlined in red removed or disabled.
Hey I have my very own thread :lol: ;)

Thanks

RobDog888
10-07-2007, 11:57 PM
I figured out removing the buttons by adding to the plugin code for each buttons show property. Any way to remove a button separator?

Now all thats left is the wysiwyg editor switch button. Its compatible to be shown but the switch button still will not appear in the top right corner of the editor.

Almost there :D