| |
| | |

CodersClub

 Forgot password?
 Register
Search
Author: mj1919
Collapse the left

automatically generated stars in RTL txt editor

[Copy link]

 Palestine

Post time: 2013-08-28 08:51
| Show all posts
Edited by khalid at 2013-8-28 07:55
vot 2013-8-22 19:28
Get the editor.js from Uygur forum and compare it with our file!

Fixed

the problem form this code in editor.j file
  1. if(ctlent_enable[13] && event.keyCode == 13 && wysiwyg && $(editorid + '_insertorderedlist').className != 'hover' && $(editorid + '_insertunorderedlist').className != 'hover') {
  2.                 if(!BROWSER.opera) {
  3.                         insertText('
  4. *', 5, 0);
  5.                 } else {
  6.                         insertText('
  7. ', 5, 0);
  8.                 }
  9.                 keyBackspace();
  10.                 doane(event);
  11.         }
  12.         if(ctlent_enable[9] && event.keyCode == 9) {
Copy the Code
replace with

x3 editor code
  1. if(ctlent_enable[9] && event.keyCode == 9) {
  2.                 if(!wysiwyg) {
  3.                         insertText('\t', 1, 0);
  4.                 }
Copy the Code
it's work good

Rate

Number of participants 1Rating +1 Collapse Reason
mj1919 + 1 Very nice!

View Rating Log

 Russia

Post time: 2013-08-28 09:09
| Show all posts
Let me explain what did you do with the code!

It was the next OLD algorithm:
If a user pressed "Enter" key (#13) then insert the "Caret Return" character
(and possible "*", that will be then removed later).

But your NEW algorithm do the next:
I know nothing about the "Enter" key, but if a user pressed the "TAB" key, then just insert the "Tab" character (#9).

Do you mean this is correct change???

Rate

Number of participants 1Rating +1 Collapse Reason
mj1919 + 1

View Rating Log

 Palestine

Post time: 2013-08-28 09:14
| Show all posts
vot 2013-8-28 08:09
Let me explain what did you do with the code!

It was the next OLD algorithm:

i just doing as x3 editor file no more and no less

Rate

Number of participants 2Rating +2 Collapse Reason
vot + 1 Usefull
mj1919 + 1

View Rating Log

 Russia

Post time: 2013-08-28 09:33
| Show all posts
Ok, I agree.
But let's explain for our users,
what the changes Comsenz made in "editor.js" when migrate from x2.5 to x3.0!

The explanation:

1) Comsenz decided to not handle the "Enter" key pressing by their code.
Let this do a user browser by itself, because of the browser knows more about the user than Comsenz.
In other words, the "Enter" key will now be processed as the browser built-in default action.

2) Comsenz decided to handle the "TAB" key pressing by their own code (NOT by default browser action!).
For now the "TAB" key does not jump to the next input element (as in default) but just insert the TAB (#9) character code inside the textarea!

I think, this my explanation is quite good and enough.

Rate

Number of participants 2Rating +2 Collapse Reason
khalid + 1 I understood now , thx
mj1919 + 1 : | C O M P L I C A T E D

View Rating Log

 Russia

Post time: 2013-08-28 09:39
| Show all posts
mj1919, try this code and report here the result!

Comments

OK  Post time 2013-08-28 09:41

 Russia

Post time: 2013-08-28 09:52
| Show all posts
I tried.
Works ok for both LTR and RTL.

Comments

i am going to install xamp, that you done, thanks  Post time 2013-08-28 11:24

 Russia

Post time: 2013-08-28 10:00
| Show all posts
#159

 Russia

Post time: 2013-08-28 10:07
| Show all posts
+ uploaded here!

Comments

?  Post time 2013-08-28 10:20

 Russia

Post time: 2013-08-28 10:23
| Show all posts
What else?

 Palestine

Post time: 2013-08-28 10:26
| Show all posts
vot 2013-8-28 09:23
What else?

Nothing
just close the topic

Comments

Thank you Khalid, :)  Post time 2013-08-28 11:25
You have to log in before you can reply Login | Register

Points Rules

Archive|Mobile|Dark room|CodersClub

Top.Mail.Ru
Top.Mail.Ru

2024-11-24 15:15 GMT+3 , Processed in 0.086277 sec., 9 queries .

Powered by Discuz! X3.4 Release 20230520

© 2001-2024 Discuz! Team.

MultiLingual version, Rev. 4301, © codersclub.org

Quick Reply To Top Return to the list