113
edits
Fahrenheit (talk | contribs) |
m (use https) |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{TOCright}} | |||
The AniDB '''R'''ich '''T'''ext '''E'''ditor<br> | 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. | ||
Line 7: | Line 8: | ||
== 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 17: | Line 18: | ||
== 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'''". | ||
Line 33: | Line 34: | ||
* <tt>[spoiler]...[/spoiler]</tt> - text is hidden; visibility of text can be toggled using "Show/Hide Spoiler" button | * <tt>[spoiler]...[/spoiler]</tt> - text is hidden; visibility of text can be toggled using "Show/Hide Spoiler" button | ||
* <tt>[url]HREF[/url]</tt> - link to URL where text is the same as the URL (can only be used to link AniDB domain URLs) | * <tt>[url]HREF[/url]</tt> - link to URL where text is the same as the URL (can only be used to link AniDB domain URLs) | ||
* <tt>[url=HREF]...[/url]</tt> - link to URL where text is different from the URL (can only be used to link | * <tt>[url=HREF]...[/url]</tt> - link to URL where text is different from the URL (can only be used to link AniDB domain URLs) | ||
* <tt>[img]HREF[/img]</tt> - link to an image | * <tt>[img]HREF[/img]</tt> - link to an image | ||
=== Piece it all together === | === Piece it all together === | ||
Line 106: | Line 55: | ||
==== 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 | * First and most useful is before copy/pasting text from a text editor first paste it in "Mode: Advanced" to remove the underlying formats and then switch to "Mode: Visual" if needed. | ||
* 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 | ||
* Bug fahrenheit until he finds out what have you done wrong and solve the issue | * Bug fahrenheit until he finds out what have you done wrong and solve the issue | ||
== 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> | ||
For visual preview of the current browser support check this [[ | For visual preview of the current browser support check this [[https://anidb.net/perl-bin/animedb.pl?show=cmt&id=17941 forum thread]]. | ||
=== Supported === | === Supported === | ||
* Internet Explorer 7/8 - Can't correctly insert lists | * Internet Explorer 7/8 - Can't correctly insert lists | ||
* Firefox/Gecko 2.0 - No issues | * Firefox/Gecko 2.0 - No issues | ||
* Opera 9.27 - Can't correctly insert lists | * Opera 9.27 - Can't correctly insert lists | ||
* Safari/AppleWebKit 3.1 - No Issues | * Safari/AppleWebKit 3.1 - No Issues | ||
edits