Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: daniel1212; TangoLimaSierra; stylin19a; skr
Daniel,

Re the 'P' button:

In cynwoody's original "script.js" file, lines 421 and 422, are originally:

addButton('P', wrap(addOnOwnLine, '<p>'),
                       'Adds a <p> tag at the cursor.', 'enter');

- - - - - - - - - - - - - - - - - -

In a revised version of cynwoody's "script.js" file, I commented out those 2 original lines, and added all of the following, that a) includes two more buttons, and b) includes a new line to function as you wish:

addSpacer();
addButton('P', wrap(addTag, '<p>'), 'Adds a <p> tag as text.', '[')
addSpacer();
addButton('/P', wrap(addTag, '</p>'), 'Adds a </p> tag as text.', ']')
addSpacer();
addButton('P/P', 'p', 'Adds <p> and </p> tags.', 'enter');
addSpacer();

- - - - - - - - - - - - - - - - - -

The new 'P/P' button replaces the original 'P' button, with the beginning and ending HTML <p> and </p> tags - function - that you wanted. In the Reply box, enter some string of characters, select that string, then click on the 'P/P' button.

(The new, 3rd "addButton" line above, is what replaces the functioning of lines 421 and 422 in cynwoody's original "script.js" file.)

The new 'P' button simply places a <p> tag in the Reply box.

The new '/P' button simply places a </p> tag in the Reply box.

The "addSpacer();" lines provide some space between the buttons.

Each of the "addButton" lines uses functions that are established much further up, in cynwoody's original "script.js" file page.



92 posted on 10/28/2024 7:27:57 AM PDT by linMcHlp
[ Post Reply | Private Reply | To 89 | View Replies ]


To: linMcHlp
In a revised version of cynwoody's "script.js" file, I commented out those 2 original lines, and added all of the following, that a) includes two more buttons, and b) includes a new line to function as you wish:

Thanks! Now i forgot, where do i obtain this version?

93 posted on 10/28/2024 5:17:59 PM PDT by daniel1212 (Turn 2 the Lord Jesus who saves damned+destitute sinners on His acct, believe, b baptized+follow HIM)
[ Post Reply | Private Reply | To 92 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson