HOME | DD

JRWenzel — Tech tip - Sharing dA tags and html source code
Published: 2013-01-07 03:25:14 +0000 UTC; Views: 5628; Favourites: 13; Downloads: 0
Redirect to original
Description body div#devskin0 hr { }

  This is the least hideous approach I've been able to come up with without altering the appearance of the test and without running into problems with dA's online text editors software due to the fact that they process the text bracketed in the html … tag sequence.  The following formatting workarounds will breakᴺ¹ the interpreters involved to get the desired results.  Normally most of this would be achievable by using html escapes < [<], & [&] and h [h] however while these substitutions can be entered into the editor and do work, they only work one-way as should you need to do an edit on the post the online editor converts them back to <, & and h when it opens the saved text.Enclose code examples within a … tag sequence to display them in a monospaced font.Display tags: replace the leading : with :
:dalogo:   ‌ :thumb333162401:   ‌ :iconllamatruckplz:  
—Works with all dA tags {predefined emotes, thumb, icon, etc.}Display url addresses without auto-conversion to a hyperlink: replace the h in http with h
http://www.deviantart.com/ 
Still Clickable:
​http://www.deviantart.com/
h ttp://www.deviantart.com/  Display html escapes: replace & with &Display html tag source by replacing every < with <
—This only needs to be done for the tags, non-tag < characters will be processed normally and converted to escapes by the interpreter.
Example:


   alt="widescreen films stamp" height="56"/>

Would be written:


<a href="http://fav.me/d5iayno">
 <img src="http://fc06.deviantart.net/fs70/f/2012/292/2/d/widescreen_films_stamp_by_jrwenzel‑d5iayno.gif"
  alt="widescreen films stamp" height="56"/>
</a>

i⃝  For listings > 40 characters wide in Journals add a horizontal scroll bar.  To make code in these scroll boxes useable delete all Zero‑Width Joiners [‍] and convert all: Em Spaces [ ] to "  " [Space]‍[Space], Non‑Breaking spaces [ ] to " " [Space] and Non‑Breaking Hyphen [‑] to "‑" [Hyphen].Display embedded indentation ("whitespace") for readabilityᴺ².
Single leading space: replace with an En Spaceᴺ³ [ ].
Multiple leading spaces replace the first 2 spaces with an Em Spaceᴺ³ [ ].
—This is to reduce the impact of these 6 character long codes, even if it is by only 1 character.
Example: 1 space — " My text"
 My text
Example: 2 spaces — " My text"
 My text
Example: 5 spaces — "    My text"
    My text
. . . and so on . . .
Alternatively
To override line-breaking for display in a scroll box:
For indentation:
Replace the first Space in all indents with a Non‑Breaking space [ ].
After the indent replace all:
2 Space Pairs with Em Spaces [ ],
remaining Single Spaces with a Non‑Breaking space [ ]
and any "‑"(s) not bracketed with Non‑Breaking Spaces with a Non‑Breaking Hyphen [‑].
Any remaining breaks should be resolvable by using the Zero‑Width Joiner [‍]

NOTICE!: This should only be used for short snippets of code/text if it's something large link to it.

N1 Break as in "interrupt a process" not break as in "to damage".
N2 Don't abuse it!  System administrators get real weird when it comes to superfluous whitespace.
N3 Monospaced fonts usually have a ~1:2 aspect ratio at low resolution so En Space and Em Space work as substitutions.



Related content
Comments: 5

tragicallyhipster [2016-05-10 15:54:29 +0000 UTC]

I think I was about to pull out my hair. 

👍: 0 ⏩: 1

JRWenzel In reply to tragicallyhipster [2016-05-12 18:38:26 +0000 UTC]

Don't do that, it's bad for your scalp.

👍: 0 ⏩: 1

tragicallyhipster In reply to JRWenzel [2016-05-12 18:44:59 +0000 UTC]

 

👍: 0 ⏩: 0

kuschelirmel-stock [2013-01-22 18:19:50 +0000 UTC]

thank you for sharing this information! very useful!

👍: 0 ⏩: 1

JRWenzel In reply to kuschelirmel-stock [2013-01-22 19:58:42 +0000 UTC]

Thank you, I’m glad some are finding it to be a help.
┄┄┄┄┄┄┄┄┄┄┄┄
Knowledge is like the flu -
If you don't share it . . .
the burden is yours alone.

┄┄┄┄┄┄┄┄┄┄┄┄
Seriously though, after rummaging around the site for a while, I’ve seen some people go to measures as messy as to constitute virtual self-torture (or make it hard to read/follow) to accomplish it; I felt a need for it. Also was fairly confident that there are at least a few out there as prone to typos and after-thoughts/revisions as I am and a method that the online editors won’t mess with without needing to be a premium-member, makes life a little easier. I just wish it were a little more widely read, but hopefully in time that will change.

👍: 0 ⏩: 0