AniDB RTE: Difference between revisions

no edit summary
m (<tt>'ed the phpBB tags)
No edit summary
Line 1: Line 1:
{{TOCright}}
{{update}}{{TOCright}}
= The AniDB '''R'''ich '''T'''ext '''E'''ditor =
The AniDB '''R'''ich '''T'''ext '''E'''ditor<br>
 
This page will try to explain the AniDB RTE and why it isn't your standard Rich Text Editor.
This page will try to explain the AniDB RTE and why it isn't your standard Rich Text Editor.


== What is an RTE ==
== What is an RTE ==
A Rich Text Editor is a User Interface control that replaces a standard HTML textarea element; it allows for the rich formatting of text content, including common structural treatments like lists, or formatting treatments like bold and italic text. These formatting options are applied in real time, so that you get an immediate feedback on what you are doing. This is pretty much what you should be used to from using a word processing application like MS Word, Open Office Writer, etc.
A Rich Text Editor is a User Interface control that replaces a standard HTML textarea element; it allows for the rich formatting of text content, including common structural treatments like lists, or formatting treatments like bold and italic text. These formatting options are applied in real time, so that you get an immediate feedback on what you are doing. This is pretty much what you should be used to from using a word processing application like MS Word, Open Office Writer, etc.


== How does an RTE work ==
== How does an RTE work ==
An RTE is usually an html document within an iframe with the contentEditable attribute enabled which allows for the editing of the document in your browser, there is then a set of basic commands for doing basic commands, these basic commands are done via the document.execCommand command, stuff like bold, italic and so on are applied with this command, execCommand also has another functions to control how an RTE works.<br />
An RTE is usually an html document within an iframe with the contentEditable attribute enabled which allows for the editing of the document in your browser, there is then a set of basic commands for doing basic commands, these basic commands are done via the document.execCommand command, stuff like bold, italic and so on are applied with this command, execCommand also has another functions to control how an RTE works.<br />
The RTE interface was developed by Microsoft and ported to other browsers by their respective vendors, much like the xmlhttprequest function that is core of AJAX.
The RTE interface was developed by Microsoft and ported to other browsers by their respective vendors, much like the xmlhttprequest function that is core of AJAX.
Line 20: Line 17:


== The AniDB case ==
== The AniDB case ==
AniDB doesn't store html formatted content like many other sites do, AniDB had for a long time a kind of tags, much like to the phpBB forum, like <tt>[b]some bold text[/b]</tt> and so on.<br />
AniDB doesn't store html formatted content like many other sites do, AniDB had for a long time a kind of tags, much like to the phpBB forum, like <tt>[b]some bold text[/b]</tt> and so on.<br />
Whenever you used one of these tags in a review or message or whatever those tags were then saved to the server and then parsed and converted to html content on display by the server, so the above text would be returned as "'''some bold text'''".
Whenever you used one of these tags in a review or message or whatever those tags were then saved to the server and then parsed and converted to html content on display by the server, so the above text would be returned as "'''some bold text'''".


=== Supported tags ===
=== Supported tags ===
* <tt>[b]...[/b]</tt> - bold text
* <tt>[b]...[/b]</tt> - bold text
* <tt>[i]...[/i]</tt> - italic text
* <tt>[i]...[/i]</tt> - italic text
Line 42: Line 37:


==== History ====
==== History ====
The commands supported at first were:
The commands supported at first were:


Line 95: Line 89:


=== Piece it all together ===
=== Piece it all together ===
Now that you know all the commands/tags what really happens when you write something in the RTE is:
Now that you know all the commands/tags what really happens when you write something in the RTE is:


Line 106: Line 99:


=== How can it go wrong ===
=== How can it go wrong ===
This is a run down of the most usual cases for the output to look like crap and most efficient solutions.
This is a run down of the most usual cases for the output to look like crap and most efficient solutions.


==== Known causes for text to be borked ====
==== Known causes for text to be borked ====
* You did a copy paste from word or some other editor
* You did a copy paste from word or some other editor
* You did a copy paste from a site
* You did a copy paste from a site


==== What can you do to fix the output ====
==== What can you do to fix the output ====
* First and most useful is before copy/pasting text from a text editor first paste it in notepad to remove the underlying formats and then copy/paste the notepad text into the the RTE and apply formatting in the RTE
* First and most useful is before copy/pasting text from a text editor first paste it in notepad to remove the underlying formats and then copy/paste the notepad text into the the RTE and apply formatting in the RTE
* Disable JavaScript and reload the page and use the normal textarea to clean up the content
* Disable JavaScript and reload the page and use the normal textarea to clean up the content
Line 121: Line 111:


== Browser Support ==
== Browser Support ==
Here is a list of the currently browser support and some notes about them:<br/>
Here is a list of the currently browser support and some notes about them:<br/>
<tt>For visual preview of the current browser support check this [[http://anidb.net/perl-bin/animedb.pl?show=cmt&do=news&id=166#c45412 news item]].</tt>
<s><tt>For visual preview of the current browser support check this [[http://anidb.net/perl-bin/animedb.pl?show=cmt&do=news&id=166#c45412 news item]].</tt></s>


=== Supported ===
=== Supported ===
Line 137: Line 126:
=== Not tested by AniDB ===
=== Not tested by AniDB ===
* Any other browser and or browser versions
* Any other browser and or browser versions
[[Categories:Features]]
staff
2,096

edits

MediaWiki spam blocked by CleanTalk.
MediaWiki spam blocked by CleanTalk.