Support for Chinese Editing
2005/08/15 18:29
Viewed 4196 times
Replies: 2/3

How does HTMLArea support editing in the Chinese language?

last
Re: Support for Chinese Editing
2005/08/15 18:31
Viewed 5676 times
Replies: 0/0

I should add, both Traditional and Simplified Chinese.

last
Re: Support for Chinese Editing
2005/08/15 20:20
Viewed 5616 times
Replies: 1/1

I'm not a part of the HTMLArea project (just another developer like you), and I'm not really up-to-speed on multi-language support, but I have some basic info that may help you.

HTMLArea has a language file for each language it has been translated into. It uses Javascript language files to initialize an I18N object with text for each message within the editor. There is already a Chinese language file (most likely Simplified) for the built-in components. Each of the plugins has the same language capability, but most do not come already translated into Chinese. In order to make the editor usable for Chinese you would have to perform translation for each plugin you wanted to use. Note that the .js language files are provided with UTF-8 encoding. (Sorry, I have no idea how this translates into Chinese character sets.) HTMLArea also supports L->R and R->L text direction. To the best of my knowledge and testing, HTMLArea also has complete UTF-8 support within the editor itself.

Please note that in order for HTMLArea to have complete UTF-8 support, the operating system and/or web browser must have complete UTF-8 support themselves. (Not likely to ever be an issue.)

Sorry I don't have any more info than this. I hope it helped.

last
Javascript onclick gets fubar'd
2005/08/15 18:52
Viewed 5056 times
Replies: 1/5

Hello,

I've run into a problem with htmlarea today. In one page of my site, I have the following html:

<a href="#" onclick="javascript:window.open("/create/index.php", "_blank", "toolbar=no,location=no,scrollbars=yes,resize=yes,width=560,height=650,screenX=0,screenY=100,top=0");">Click here </a>

Whenever I edit the page, the code above gets transformed into:

<a onclick="
function onclick(event) {
javascript:
window.open("/create/index.php", "_blank", "toolbar=no,location=no,scrollbars=yes,resize=yes,width=560,height=650,screenX=0,screenY=100,top=0");
}
" href="#">Click here</a>

And that doesn't work in any browser I've tested with. Is there alternative syntax I should use for javascript instead? I've tried a few variations that I'm familiar with, but none have made a difference, the code still gets transformed into non-functional javascript.

Thank You,
Troy

last
Re: Javascript onclick gets fubar'd
2005/08/15 20:04
Viewed 6768 times
Replies: 1/4

Troy,
I don't have a chance to test what you sent at the moment, but I see two problems right off. I am including your code for reference with problem areas highlighted:

<a href="#"
onclick="javascript:window.open("/create/index.php", "_blank",
"toolbar=no,location=no,scrollbars=yes,resize=yes,width=560,height=650,screenX=0,screenY=100,top=0");">Click
here </a>

First, the "javascript:" does not need to be included within an event attribute (such as onclick).  Second, it appears that you have nested quotes ("), which is syntactically invalid HTML / Javascript. Instead, try this:

<a href="#"
onclick="window.open('/create/index.php', '_blank',
'toolbar=no,location=no,scrollbars=yes,resize=yes,width=560,height=650,screenX=0,screenY=100,top=0'); return false;">Click
here </a>

In this case I have replaced the double-quotes (") with single-quotes (') to prevent nesting problems.  I also added the "return false;" in order to prevent the browser from following the link.  (This keeps the # from being added to the URL in the browser.)

Hopefully this will fix your problem.  If not, let me know and I'll see what I can do.

last
Removing text formatting during a Paste command
2005/08/20 17:11
Viewed 4027 times
Replies: 1/1
by alf

Someboby can help me on revoming the format of the text that comes from a Paste command (or CTRL+V)?
I need to clean the rich text when the user paste it. I tried with KillWordcode but it seems that it removes only some special html tags of Winword (I think).
Thank you for aid.

last
Re: Removing text formatting during a Paste command
2005/08/23 02:13
Viewed 5701 times
Replies: 0/0

The following code example will instruct HTMLArea to kill the rich-text formatting on paste.

editor = new HTMLArea("text"); //Create HTMLArea for the textarea with id=text
var cfg = editor.config; //Create a handle for configurations
cfg.htmlareaPaste = true; //Instructs HTMLArea to intercept Paste command
cfg.killWordOnPaste = true; //Instructs HTMLArea to cleanup pasted content

If you are not happy with how well _wordClean() functions, you can copy the function's code from the htmlarea.js file, paste it into your own .js file, and modify it as you wish.  For example:

fixword.js:
HTMLArea.prototype._wordClean = function() {
  //1. Paste  htmlarea.js:_wordClean here
//2. Edit the pasted code as you wish
//3. Add new functions to provide additional processing
//4. Include this fixword.js file in your code after the htmlarea.js file
}

Note that it is much better to override a function as I have described than it is to actually modify anything in htmlarea.js -- this is because modifying the core code will result in your changes being lost whenever you upgrade HTMLArea.

last
Installation trouble
2005/08/25 03:46
Viewed 4049 times
Replies: 1/3

I have been trying to install HTMLarea in my osCommerce store. There are several contributions using this editor there, though none seem to be currently supported. Maybe someone here can offer some suggestions. I have the files uploaded, I see the config area in my Admin panel, there's a link that enables me to edit my main page that IS using HTMLarea, though it gives an error message "ERROR_FILE_NOT_WRITEABLE"

The BIG problem is that for most of the input text areas for sub-pages there is no HTMLarea working, it's as if nothing had been installed. I've checked and re-checked to make sure I've uploaded everything correctly. Any suggestions?

last
Re: Installation trouble
2005/08/25 18:51
Viewed 5755 times
Replies: 1/2

Can you perhaps provide further information about how you are implementing htmlArea? There are a few different methods available for replacing <textarea>'s with htmlArea controls. I have information on the basic approach in an earlier post: http://www.dynarch.com/forums/817. Please review this information and see how it applies to your situation.

To the best of my knowledge, "ERROR_FILE_NOT_WRITEABLE" is not an htmlArea message, and is unrelated to its installation.

If you can perhaps provide a bit of code demonstrating your usage of htmlArea, I will do my best to help you figure out the problem.

last
Intercept Paste Events
2005/08/25 11:44
Viewed 4002 times
Replies: 1/2

Hi there,

I want to extend HTMLArea and wonder how to intercept a paste event. The thing I want to do is: when pasting text from a Word document I want to scan it for footnotes. If there are footnotes, I want to remove those strange Word tags and put all footnotes inside an ordered list. Any suggestions on how to accomplish this? Could'nt find API-docs or a plugin-howto yet - maybe anyone can give me a hint on this?

Thanks for your help!
Best regards,
Clemens Prerovsky

last
Google