BattleMaster Community

BattleMaster => Development => Topic started by: Tom on January 11, 2012, 07:59:56 PM

Title: New Editor
Post by: Tom on January 11, 2012, 07:59:56 PM
I'm replacing the WYSIWYG editor in BattleMaster with the more advanced CKEditor. It has been in a few remote places for a few weeks already and caused no problems, so I'm now rolling it out to most of the game (on testing, at least).

The new editor has a couple really nice features. But if you notice anything that got lost, let me know.

Title: Re: New Editor
Post by: LilWolf on January 11, 2012, 08:13:50 PM
Is it intentional that it over rides the fact you've set the editor to be used to Plain/HTML in your account options?

Also, this new editor does insane line spacings if you use enter to change lines(which most people will).
Title: Re: New Editor
Post by: Indirik on January 11, 2012, 08:27:31 PM
Can it be skinned to blend into the interface? It's really "in your face" right now.
Title: Re: New Editor
Post by: ^ban^ on January 11, 2012, 08:28:32 PM
Also, this new editor does insane line spacings if you use enter to change lines(which most people will).

This is a bit of an understatement... it's inserting four lines for every time you press enter.
Title: Re: New Editor
Post by: Tom on January 11, 2012, 08:46:57 PM
Is it intentional that it over rides the fact you've set the editor to be used to Plain/HTML in your account options?

Also, this new editor does insane line spacings if you use enter to change lines(which most people will).

Hm, that is strange. I'm fairly sure that it isn't due to the editor but the processing we do on the backend.

And yes, the override is intentional. If you don't have javascript enabled, this editor will gracefully degrade to a regular textbox. I don't see any other reasons not to use it.

Can it be skinned to blend into the interface? It's really "in your face" right now.
Yes, it has very nice skinning options. Want to give it a try? The ckeditor website has documentation on how to create your own skin.
Title: Re: New Editor
Post by: Shizzle on January 11, 2012, 09:02:08 PM
Also, I noticed some ugly things happening when pasting in text?
Title: Re: New Editor
Post by: Tom on January 11, 2012, 09:26:59 PM
several input problems are fixed now. They were due to the old code overzelously cleaning the input. Twice. And then again for good measure. :)
Title: Re: New Editor
Post by: Indirik on January 11, 2012, 09:34:39 PM
One major problem for me, and I assume others as well: The browser's built-in spell checker does not run inside the new editor. I *really* counted on that feature....
Title: Re: New Editor
Post by: Zakilevo on January 11, 2012, 09:41:46 PM
yeah. I need put google on all the time!
Title: Re: New Editor
Post by: Tom on January 11, 2012, 11:46:44 PM
It's a matter of config options, as it supports both browser-internal and its own spellchecker. I'll have to read the docs and test some settings.

Title: Re: New Editor
Post by: fodder on January 12, 2012, 12:01:43 PM
i prefer plain text... hate copy/pasting stuff and having it end up with strange font/color, etc in those fancy editors.
Title: Re: New Editor
Post by: Solari on January 12, 2012, 02:06:51 PM
i prefer plain text... hate copy/pasting stuff and having it end up with strange font/color, etc in those fancy editors.

Paste as plain text.  Any operating system can do this.
Title: Re: New Editor
Post by: Indirik on January 12, 2012, 02:44:52 PM
The editor has a built-in "paste as plain text" option. It's one of the toolbar buttons.
Title: Re: New Editor
Post by: Anaris on January 12, 2012, 02:45:36 PM
Paste as plain text.  Any operating system can do this.

Orly?

Perhaps you'd like to educate us all by describing how it is done on every operating system?

Or, if you object to my being overly literal, every current version of a major operating system?
Title: Re: New Editor
Post by: Indirik on January 12, 2012, 02:52:38 PM
Chrome on Windows has a right-click "Paste as plain text" option. However... CKEditor  intercepts that right-click and pops up its own context menu instead, which only has a "
Paste" option. For me, that option then causes CKEditor to complain that my security settings have blocked the editor from accessing the clipboard, and requiring me to paste the text into another pop-up dialog and hit the OK button. Quite the ridiculous process for a simple paste task.

The new editor seems to work OK, but the interface is definitely rough in some spots.
Title: Re: New Editor
Post by: LilWolf on January 12, 2012, 03:41:23 PM
i prefer plain text... hate copy/pasting stuff and having it end up with strange font/color, etc in those fancy editors.

Yeah. Would be nice if the editor could default to copy & pasted text being just plain text. Right now it's just a huge step back in usability for that.
Title: Re: New Editor
Post by: fodder on January 12, 2012, 05:40:04 PM
i'm aware there's such a button.. but what's the keyboard shortcut for that?

i'll take crtl-v in plain txt every day.. and being able to type a message without using a bunch of mouse moves. nvm the ff security thing.

imagine copy/pasting scout report.. with plain text, it's a simple copy (mouse+kb), then you can do all the paste, delete the fresh/delete rubbish.. with the mouse.. before clicking send.

with editors, you copy, use mouse to paste, etc, go back to kb to delete crap, then click to send...
Title: Re: New Editor
Post by: Indirik on January 12, 2012, 06:30:04 PM
Plain text pasting has advantages and disadvantages. Like trying to paste some text that has italics/bold/lists/etc. If you only had plain text pasting, then you'd have to hand remark that text. But it also does remove things like colored backgrounds, graphics, and other stuff that the editor is just going to strip out anyway. The ideal solution would be two separate keyboard shortcuts, one for plain text and one for styled.
Title: Re: New Editor
Post by: Draco Tanos on January 13, 2012, 02:38:03 PM
Please give us the option to default to the old system.  I dislike this new input method already.  Seems more like a step back than a step forward, especially as so many of us can't spell check!
Title: Re: New Editor
Post by: Tom on January 13, 2012, 04:20:59 PM
We will fix specific problems - we are already working on re-enabling spell checking.

But the old system won't come back right now. I need people to use the new editor, so we can find any problems with it. When we've fixed any issues and you are still unhappy, then we can discuss alternative preferences.
Title: Re: New Editor
Post by: Indirik on January 13, 2012, 04:44:51 PM
One thing that may help: Pressing the CTRL or META key when right-clicking will give you the browser's right-click menu, and not the editor's menu. This will give you access to any browser-specific options, such as pasting in plain text. We have found some direction on how to re-enable the browser's built-in spell-check-as-you-type feature. It still may take some time for us to find the right combination of config options, though.
Title: Re: New Editor
Post by: fodder on January 13, 2012, 05:22:09 PM
um...

copy multiple lines of reports from the scribe notes page.
paste it as is (not stripped)

you'll get a sort of nice looking table in the editor. (edit.png) except it's never sent out like that... (not that you would want to send it out like that.. way too many fresh/delete junk)

click preview and you'll get to see what it looks like when you sent it - all colors, etc, stripped... including the line breaks   (edit2.png)

which makes it worse than pasting it as plain text... because if you paste it as plain text.. the line breaks are kept. (editplain.png)
Title: Re: New Editor
Post by: egamma on January 13, 2012, 05:40:52 PM
I had the same problem as fodder--pasting a table (recruiting centers) look great in the editor...and then when it's sent, it looks like this:

(http://i39.tinypic.com/2wg8zrd.png)
Title: Re: New Editor
Post by: Tom on January 13, 2012, 07:41:32 PM
I might actually make it possible to send tables - if only for the cut/paste cases. The new editor has a ton of options and features. Some of which I will probably put to good use over time.

Title: Re: New Editor
Post by: Indirik on January 13, 2012, 07:54:07 PM
Spell checking in Firefox works, but you have to tell it to check. CTRL+Right-Click > Check Spelling. This will enable the built-in check-as-you-type feature of FireFox for that dialog. But you have to do this again for every message you send. Also, you need to use CTRL+Right-Click to bypass the CKeditor context menu and access the browser's context menu with the word choices.

I haven't been able to get it to work by default yet, or to work with Chrome. Not sure about other browsers.
Title: Re: New Editor
Post by: Draco Tanos on January 13, 2012, 10:28:15 PM
Are there still character limits?  I ask, because I don't see it listed anymore.
Title: Re: New Editor
Post by: De-Legro on January 14, 2012, 12:40:54 AM
Please give us the option to default to the old system.  I dislike this new input method already.  Seems more like a step back than a step forward, especially as so many of us can't spell check!

People could learn to spell. It seems to be a skill that is dead these days.
Title: Re: New Editor
Post by: Gustav Kuriga on January 14, 2012, 02:53:35 AM
I know how to spell. But often I will put the e and i in words like believe the wrong way without realizing it, which is where spell check comes in handy. I know how to spell believe, but sometimes I type it wrong and wouldn't see it without the red line underneath the word.
Title: Re: New Editor
Post by: Nerukou on January 14, 2012, 04:58:04 AM
As for alternatives to this... thing, I'm working on a Greasemonkey script to destroy instances of the editor after they load. It should work fine in both Firefox and Chrome.

It is unfortunate that the choice to disable the editor has been taken from us. I'm perfectly fine with formatting my messages with HTML code tags myself, I don't need a WYSIWYG editor to do it for me. I'm certainly not ecstatic about having to run my own Javascript on the game to cleanse it because the only other alternative is to turn off Javascript for the entire site.
Title: Re: New Editor
Post by: Perth on January 14, 2012, 05:06:02 AM
People could learn to spell. It seems to be a skill that is dead these days.

Yeah! Hey all you people who misspell words or make typos, go sit around for a few months and study the dictionary. Maybe when you learn how to spell you can come back to our game! Sheesh!

Oh, and let's not get started on all of those "But English isn't my first language" cry babies. How dare you ask for a spell checker? Too bad! Suck it up! Learn to spell!


 ::)
Title: Re: New Editor
Post by: Zakilevo on January 14, 2012, 06:18:58 AM
Dam u Perth. Maibi U shood suk it up two eef wee get peeple spel like dis!
Title: Re: New Editor
Post by: De-Legro on January 14, 2012, 09:55:37 AM
Yeah! Hey all you people who misspell words or make typos, go sit around for a few months and study the dictionary. Maybe when you learn how to spell you can come back to our game! Sheesh!

Oh, and let's not get started on all of those "But English isn't my first language" cry babies. How dare you ask for a spell checker? Too bad! Suck it up! Learn to spell!


 ::)

English is not my first language.
Title: Re: New Editor
Post by: Tom on January 14, 2012, 11:34:04 AM
It is unfortunate that the choice to disable the editor has been taken from us. I'm perfectly fine with formatting my messages with HTML code tags myself, I don't need a WYSIWYG editor to do it for me. I'm certainly not ecstatic about having to run my own Javascript on the game to cleanse it because the only other alternative is to turn off Javascript for the entire site.

You could just click the "source" button (second from the right), which allows you to enter plain HTML...

I may return the choice - you'll notice it hasn't yet been removed from the preferences. The reason I force the change is that people resist change just because. The best way I know to get actualy change is to force it upon people, wait for a couple of days for the "something has changed! the world is ending!" whining to end, and then listen to the real, rational complaints. People are amazing at adapting, they just hate doing it. But we need this better editor.
Title: Re: New Editor
Post by: Lorgan on January 14, 2012, 01:18:08 PM
The editor is all right I guess... I just hate that you have to do shift+enter to be able to just write on the next line. Which genius came up with that..
Title: Re: New Editor
Post by: fodder on January 14, 2012, 01:30:52 PM
what if.... (once things have worked out) you flip the keyboard shortcuts?

ie.. paste as plain txt = crtl v
paste as fancy stuff = whatever other keyboard shortcut or even just mouse only
Title: Re: New Editor
Post by: vonGenf on January 14, 2012, 08:10:38 PM
But we need this better editor.

Could you tell us why? I think the disadvantages of the new editor are not that bad.... but I can't find any advantage to it.
Title: Re: New Editor
Post by: Andrew on January 14, 2012, 08:50:13 PM
Advantage: Quote blocks! :D

The only problems I have with it is that it won't process the old tags for italics and bold and that to type the tags in directly you have to be in the source editor.

I wonder if we can get strikethrough added now. That'd be nifty.
Title: Re: New Editor
Post by: vonGenf on January 14, 2012, 08:54:06 PM
Advantage: Quote blocks! :D

I dislike people excessively quoting text in game. The letters we send are supposed to be letters, not forum replies.
Title: Re: New Editor
Post by: Andrew on January 14, 2012, 08:57:00 PM
There are instances where it's useful. It definetly makes it easier to read messages that are shared by others. Rulers and Generals are the ones doing this the most (or at least, make the most sense to do it).
Title: Re: New Editor
Post by: Tom on January 14, 2012, 09:26:35 PM
Could you tell us why? I think the disadvantages of the new editor are not that bad.... but I can't find any advantage to it.

For one, it works.
The main reason is that it degrades gracefully, is much easier to customize and once we're finished configuring it and fixing the issues that remain, you will see that it is a big step forward.
Oh, one other reason is that this is the editor I use on another big project, so anything I do there (say, write plugins), BM will profit from it as well.
Title: Re: New Editor
Post by: Ironsun on January 16, 2012, 02:19:23 AM
Well, during the first days the new editor drove me crazy and I still have my share of problems with it.

Whenever I'm including scribe notes, I have to use the plain html option (or get crazy), which means my messages are more work to write. For an example, with the old system I didn't have to to use "br" or "p" for getting into the next line.

When I don't have to include scribe notes, the new editor is working ok and it's quite comfortable to create a nice layout for your letter.

Frankly, I'm in love with BM since several years, and this is the first time I'm thinking twice about  recommending the game. BM is based on letters and text. Now, if sending letters gets complicated and you have the choice of using html OR don't sending scribe notes at all ... well let's just say it's  very uncomfortable, especially for new players.  >:(

Greetings,
Title: Re: New Editor
Post by: Indirik on January 16, 2012, 02:51:38 AM
One thing Tim has been talking about for a while is a better way to do scribe notes. The plug-in capability of the editor will allow that. And I think the plugins are just JavaScript, so hopefully it shouldn't be too hard for it to be written....
Title: Re: New Editor
Post by: Ironsun on January 16, 2012, 03:44:36 AM
That certainly would be a good thing.
Title: Re: New Editor
Post by: Tom on January 16, 2012, 06:39:43 AM
Whenever I'm including scribe notes, I have to use the plain html option (or get crazy), which means my messages are more work to write.

It would help if you could say what exactly the problem is.
Title: Re: New Editor
Post by: Indirik on January 16, 2012, 07:19:06 PM
It would help if you could say what exactly the problem is.
When you copy a list of scribe notes from your scribe note page and paste them into the editor, they paste as a table. When you then send the message the table structure is stripped out. The links are then all sent as a single line, like this:

Quote
Note Index   Battle   Age   Scribe Note   Battle in Forguthrie   3 turns delete Scribe Note   Battle in Forguthrie   4 turns delete Scribe Note   Battle in Ienith   10 turns delete

In order to make it work properly you need to either paste as plain text (which is a bit clunky because of the need for the editor's pop up window), or paste normally, then preview and add line breaks.
Title: Re: New Editor
Post by: Indirik on January 16, 2012, 09:34:47 PM
Two helpful hints for dealing with pasting formatted text, such as scout reports copied form the scribe notes list:
Title: Re: New Editor
Post by: Lorgan on January 18, 2012, 03:31:53 PM
I use opera. Whenever I try to end writing something in italics (by clicking on the "i" button or by using ctrl+i) my text marker just jumps back to the front of the line without doing what it's supposed to do...
The same goes for bold and underline.
Then there's also the "enter leaves a blank space" thing and the copy paste and right-mouse button problems that have already been mentioned.

Now I don't want to be a little crybaby about all the changes, but the text editor is pretty much the most essential part of the game... to have the plain one simply replaced with a buggy rich one is just... irritating to say the least. I've been willing to give it a shot but in all honesty it is starting to severely piss me off that in game communication is bugged.
I've tried turning off the java script but the simple editor box is just too small now to be able to really work with.

I know you're working on this and want us to test it but if you'd just put it as optional, maybe replace the rich editor with it, I sure wouldn't mind testing things... Right now though I would just like to be able to communicate in an easy and comfortable way.
Title: Re: New Editor
Post by: Tom on January 18, 2012, 05:34:49 PM
I use opera. Whenever I try to end writing something in italics (by clicking on the "i" button or by using ctrl+i) my text marker just jumps back to the front of the line without doing what it's supposed to do...
The same goes for bold and underline.

Can you tell which version of Opera on what OS so we can try and reproduce it?


Then there's also the "enter leaves a blank space" thing and the copy paste and right-mouse button problems that have already been mentioned.

Enter should be much better now, I just uploaded a new version.


I've tried turning off the java script but the simple editor box is just too small now to be able to really work with.

Can't you resize it? I thought all current browsers make textarea fields resizeable.

Title: Re: New Editor
Post by: Lorgan on January 18, 2012, 06:33:40 PM
Can you tell which version of Opera on what OS so we can try and reproduce it?

Opera 11.60 (newest version) on Windows 7.

Enter should be much better now, I just uploaded a new version.

Yup. Thanks. :)

Can't you resize it? I thought all current browsers make textarea fields resizeable.

I know this was possible in firefox but it doesn't seem to be possible in Opera, guess that's my fault for using this browser then. :P
Title: Re: New Editor
Post by: Eduardo Almighty on January 20, 2012, 04:37:15 PM
I tried to write a Roleplay yesterday in Dwilight and I discovered that now is simple impossible to do a good RP with a much more limited number of characters.

Now we write notes, not letters. It's simply impossible to write a RP. Sometimes I had to split into two parts... now a relatively good PR has to be divided into ten parts. Just impossible.
Title: Re: New Editor
Post by: Anaris on January 20, 2012, 04:39:24 PM
I tried to write a Roleplay yesterday in Dwilight and I discovered that now is simple impossible to do a good RP with a much more limited number of characters.

Now we write notes, not letters. It's simply impossible to write a RP. Sometimes I had to split into two parts... now a relatively good PR has to be divided into ten parts. Just impossible.

The character limit hasn't changed. It's been 5000 for as long as I can remember.

I sent an RP that I had to divide into two parts yesterday.

If you have to divide an RP into ten parts, then honestly, I'd have to say it's too long. 50,000 characters is just way too much for most people to want to read all at once.
Title: Re: New Editor
Post by: Eduardo Almighty on January 20, 2012, 04:57:37 PM
This is not what happened. I can send the same RP in the last editor in Sirion (East Continent), but in Dwilight it was cut in the second paragraph.

I said I will have to divide it in ten parts because of it, not because I wrote an entire book.
Title: Re: New Editor
Post by: Anaris on January 20, 2012, 05:07:16 PM
This is not what happened. I can send the same RP in the last editor in Sirion (East Continent), but in Dwilight it was cut in the second paragraph.

I said I will have to divide it in ten parts because of it, not because I wrote an entire book.

That's very odd, because I was definitely able to send my 6000+ character RP on Dwilight yesterday in just 2 pieces.

I don't suppose you were using any odd characters, like < or >, in your roleplay...?  :-\
Title: Re: New Editor
Post by: Tom on January 20, 2012, 06:22:41 PM
I tried to write a Roleplay yesterday in Dwilight and I discovered that now is simple impossible to do a good RP with a much more limited number of characters.

I have no freaking idea what you are talking about. Can you be more specific, please?
Title: Re: New Editor
Post by: egamma on January 20, 2012, 09:39:49 PM
Are any formatting tags in use, like bold or underline? You could have the characters specifying all that special coding using up your character limit.
Title: Re: New Editor
Post by: Anaris on January 20, 2012, 09:46:11 PM
Are any formatting tags in use, like bold or underline? You could have the characters specifying all that special coding using up your character limit.

Not to that extent, though.
Title: Re: New Editor
Post by: Indirik on January 22, 2012, 06:27:18 PM
I think that a lot of the problems with the new editor have been worked out. The major problem I still see is with pasting scribe notes. copying several scribe notes and pasting them into the editor still gets you a single long line with all the reports on it. It would be nice if the table>plain text conversion added a line break at the end of every table row.
Title: Re: New Editor
Post by: fodder on January 23, 2012, 06:44:26 AM
btw... crtl-shift-v is already used by adblock plus in firefox (to open block list)
Title: Re: New Editor
Post by: Indirik on January 23, 2012, 12:21:52 PM
Yes, in Firefox it is. I posted instructions on how to change the Adblock shortcut:

http://forum.battlemaster.org/index.php/topic,1811.msg39378.html#msg39378
Title: Re: New Editor
Post by: fodder on January 23, 2012, 07:14:55 PM
just saw those bits above XD

i'll stick to paste icon for now...
Title: Re: New Editor
Post by: Thunthorn on January 24, 2012, 08:37:58 PM
I'm not sure if it is the browser, but when I play from my mobile phone on Beluaterra now I can't make any linebreaks at all something that renders my posts written in one long line which is hard to read and hurtful to the eye. This is from a HTC Android phone.
Title: Re: New Editor
Post by: Indirik on January 24, 2012, 08:48:55 PM
I see the same behavior from my htc G2.
Title: Re: New Editor
Post by: Indirik on January 25, 2012, 08:00:13 PM
OK, two issues that I know of that are still outstanding with the editor:

Title: Re: New Editor
Post by: Draco Tanos on January 30, 2012, 03:04:45 AM
Any news on fixing mobile line breaks?
Title: Re: New Editor
Post by: Tom on January 30, 2012, 10:16:46 AM
The problem is that I don't own one of those devices, so testing is rather tricky. And I'm not sure what they are doing differently that results in this problem. Are they not sending line-breaks?
Title: Re: New Editor
Post by: Indirik on January 30, 2012, 05:34:33 PM
My mobile phone sent messages properly before the new editor was implemented. And it works fine on the forum, and on other sites, including e-mail, etc., all with the same browser. The only place it does not work properly with regard to line breaks is when sending messages on testing islands.

How could I tell what is being sent? I don't know of any way to check and see what is being sent via my phone.
Title: Re: New Editor
Post by: Tom on January 30, 2012, 06:43:38 PM
Well, it might well be that the change regarding line changes that I added because so many people wanted it is breaking other things.