vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   One Step Away From Spellcheck (https://vborg.vbsupport.ru/showthread.php?t=62409)

SpeedStreet 03-11-2004 10:22 PM

One Step Away From Spellcheck
 
I posted less code then this yesterday...but now I am VERY close to being able to release a hack for integrating ieSpell into vB3.

The problem we are having, is that the new WYSIWYG editor is actually a div, so that programs like ieSpell can't read from it (it needs a textarea).

The code below is supposed to use javascript to replicate the data entered into the wysiwyg editor and place it in a hidden textarea for ieSpell to grab from.

Here is how much I have as of now. I've had some great help from folks like ShAm4n over at DevShed, and I think we are really close to licking this!

Like I said previously, the object here is to replicate the data in a div tag of a WYSIWYG editor so that ieSpell will be able to read from the data and spell check it.

Anyone who cracks this will have a major part in bringing free client side spellchecking to vB3!


PS: If my dream is not possible, please let me know.

PHP Code:

Here is the code for the form:
======================================================
<
script language="javascript">
browsername=navigator.appName;

if (
browsername.indexOf("Netscape")!=-1) {
browsername="NS";
} else {
if (
browsername.indexOf("Microsoft")!=-1) {
browsername="MSIE";
} else {
browsername="N/A";
}
}

function 
checkspell() {
try {
var 
tmpis = new ActiveXObject("ieSpell.ieSpellExtension");
tmpis.CheckAllLinkedDocuments(document);
} catch(
exception) {
// nothing
}

}

function 
spellButton() {
if (
browsername=="MSIE") {
try {
var 
tmpis = new ActiveXObject("ieSpell.ieSpellExtension");
document.write('<input type="button" value="Check Spelling" onclick="checkspell()" class="normal_text">');
tmpis null;
} catch(
exception) {
// nothing
}
}
}

</
script>
<
script language="JavaScript">spellButton()</script>
================================================================



Here is the code for the form:
================================================================
<!-- 
This is the existing WYSIWYG code from vB3 --> 
<!-- 
I added the id="message" because I was told to --> 
<!-- 
BEGIN vBCODE --> 
<
div class="controlbar" id="qrdiv"
<
textarea name="message" id="qr_message" class="bginput" style="width:600px; height:100px;" rows="5" cols="60" tabindex="1"></textarea
<!-- 
End vBCode --> 

<!-- 
Here is the snippet provided to me --> 
<!-- 
BEGIN SNIPPET --> 
<
textarea style="display: none" id="message"></textarea
<
script type="javascript">
document.getElementById('message').value document.getElementById('qr_message').InnerHTML;
</
script
<!-- 
END SNIPPET --> 

<!-- 
BEGIN vBCODE -->         
    </
div
<!-- 
END vBCODE -->
================================================================== 

By all accounts and purposes, I am sure this should work...but it's still giving me the same issues. Can SOMEBODY please help me figure this one out!?

Thanks!

Soholaunch 03-31-2004 06:41 PM

any progress?

sross 04-08-2004 07:38 PM

Quote:

Originally Posted by Soholaunch
any progress?

also eagerly awaiting this hack :)

joeychgo 04-28-2004 02:15 AM

Have you abandoned this hack Speedstreet???

sross 04-28-2004 04:05 AM

hopes and dreams shattered! :( hehe

lucky64 05-28-2004 12:29 AM

I hope hes still working on it :(


All times are GMT. The time now is 12:57 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00980 seconds
  • Memory Usage 1,742KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete