Sponsored Content
The Lounge What is on Your Mind? Number of Small Forum Code Changes (TODO List Items) Post 303027865 by Neo on Thursday 27th of December 2018 05:11:30 AM
Old 12-27-2018
Starting on a mini-toolbar for the mobile editor, I just added a code tag button to the showthread and newreply functions in mobile, using this JS code

Code:
<script>
String.prototype.insertAt = function(index, string) {
  return this.substr(0, index) + string + this.substr(index);
};

function makeBBCode(start, end) {
  var txtBox = document.getElementById("m-st");
  txtBox.value = txtBox.value
    .insertAt(txtBox.selectionEnd, end)
    .insertAt(txtBox.selectionStart, start);
}

</script>

HTML:

Code:
<div class="d-flex justify-content-between m-st-lt">
<span style="font-weight:bold;">Reply:</span>
<span>
<i onclick="makeBBCode('[CODE]','[/CODE]')"class="fas fa-code" style="margin-right:30px;padding-top:10px;">
</i>
</span>
</div>

Works fine. Just need to add more FA buttons and add NOPARSE wrappers for this.

Image
 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

change list to comma seperated items

I have a list of servers in a file called serverlist like this server1 server2 server3 i need to have them (with no trailing comma, the program does not like that) server1,server2,server3 so far i have been using HOSTS=/tmp/serverlist HOSTS=${HOSTS:-$(grep -Ev "^#|^$"... (2 Replies)
Discussion started by: insania
2 Replies

2. UNIX for Dummies Questions & Answers

Number of items in a directory

This should be so simple.. I have folder with about 27 subfolders in it, each folder has a number of fonts in it.. how do I get the total number of fonts for all subfolders? (2 Replies)
Discussion started by: glev2005
2 Replies

3. Shell Programming and Scripting

Help needed regarding first 3 items in the list

Hi, I've a list in the following format: Empdept filedetails buildingNo Area AAA 444 2 juy AAA 544 2 kui AAA 567 4 poi AAA 734 5 oiu AAA 444 ... (2 Replies)
Discussion started by: skpvalvekar
2 Replies

4. Shell Programming and Scripting

Counting the number of readable, writable, and executable items in a directory

Hello, I'm writing a script in sh in which the first command line argument is a directory. from that, i'm suppose to count the number of readable, writable, and executable items in the directory. I know using $1 represents the directory, and ls would display all the items in the directory, and that... (4 Replies)
Discussion started by: kratos22
4 Replies

5. Shell Programming and Scripting

Parsing through a list of items

Hi there, Here is my checklist of items, 4.1.1 Alerter 4.1.2 Client Services for Netware 4.1.3 Clipbook 4.1.4 Fax Service 4.1.5 File Replication 4.1.6 File Services for Macintosh 4.1.7 FTP Publishing Service 4.1.8 Help and Support 4.1.9 HTTP SSL 4.1.10 IIS Admin Service ... (1 Reply)
Discussion started by: alvinoo
1 Replies
CAML2HTML(1)						      General Commands Manual						      CAML2HTML(1)

NAME
caml2html - colorizes a set of OCaml source files. SYNOPSIS
caml2html [options] file* DESCRIPTION
Caml2html colorizes a set of OCaml source files (.ml, .mli, .mll, .mly, ...). Type annotations will be shown when the mouse pointer passes over an expression if the corresponding .annot file is available. To obtain a .annot file, compile your OCaml source files with ocamlc -dtypes or ocamlopt -dtypes. OPTIONS
-annotfilter {innermost|outermost} choose whether innermost or outermost type annotations should be used (default: innermost) -charset specify charset to use (default: iso-8859-1) -css use CSS named style.css for styling -cssurl use the given URL as CSS for styling -inhead use default styling and place it in the head section of the document (default when applicable) -inline use inline styling (HTML only, default fallback if -inhead is not applicable) -body output only document's body, for inclusion into an existing document (see also -make-css and -make-latex-defs) -ln add line number at the beginning of each line -hc comments are treated as raw HTML or LaTeX code (no newlines inside of tags) -t add a title to the HTML page -nf do not add footnotes to the HTML page -ie7 drop support for type annotations on Internet Explorer 6 and older -noannot do not insert type annotations as read from .annot files (HTML output only) -notab do not replace tabs by spaces -tab replace tab by n spaces (default = 8) -d generate files in directory dir, rather than in current directory -o output file -v print version number to stdout and exit -make-css create CSS file with default color definitions and exit -ext <NAME:CMD> use the given external command CMD to handle comments that start with (*NAME. NAME must be a lowercase identifier. -latex output LaTeX code instead of HTML. -make-latex-defs create a file containing the default LaTeX color definitions and matching highlighting commands, and exit. is not included. -help|--help Display this list of options AUTHORS
Sylvain Le Gall. Caml2html User Manual November 9, 2010 CAML2HTML(1)
All times are GMT -4. The time now is 04:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy