Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

The code above had a bug which I somehow didn't notice since now. It forgot to insert the paragraph tag to put the toolbar in a separate page, so sometimes (in wide pages) the toolbar shows to the left of the textarea, which is ugly. The fix would be trivial: change

t.parentNode.insertBefore(l,t);
to
t.parentNode.insertBefore(p,t);
However, this is a bit ugly, because the paragraph tag adds some vertical space between the toolbar and the image, so I'll soon fix the code to add a br tag instead of a p tag.

The original node will contain the fixed code (it does now), so here's a backup copy of the old code.

<script type="text/javascript" defer><!-- function edittoolbar_help(){window.alert('Separate paragraphs with "<p +>", put "<c>".."<\x2fc>" around code or data (linebreaks inside it ar +e taken literally) and you\x27ll be okay. Don\x27t forget to check i +f the preview looks right.');} (function(){ var d=document,c="createElement",i="appendChild"; var t=d.getElementsByTagName("textarea")[0]; if(t){ var p=d[c]("p"),l=d[c]("a"),m=d[c]("img"); m.src="http://www.math.bme.hu/~ambrus/pu/edittoolbar"; m.border=0; l.href="javascript:edittoolbar_help()"; l[i](m);p[i](l); t.parentNode.insertBefore(l,t); } })(); //--></script>

In reply to Re: Javascript formatting toolbar for perlmonks by ambrus
in thread Javascript formatting toolbar for perlmonks by ambrus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-25 06:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found