JQuery to Add Code Tags to Selected Text


 
Thread Tools Search this Thread
The Lounge What is on Your Mind? JQuery to Add Code Tags to Selected Text
# 1  
Old 09-10-2018
JQuery to Add Code Tags to Selected Text

Hey.

Someone find or write some jQuery code where we can select text with our mouse and then click or double click the highlighted / selected text and then it will wrap code tags around the highlighted text (in our editors).

Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Web Development

Turning jQuery Code into Vue.js

The following is some code I am working on the replace our navbar (someday) with a Vue component. Vue.component("unix-navbar", { template: `<div class="neo-table-border vuenavbar"><div class="flex-item" style="margin-bottom:10px;padding-top:13px;"><a class="vuenavbarhome"... (19 Replies)
Discussion started by: Neo
19 Replies

2. What is on Your Mind?

JQuery and CSS Flex Code for Responsive Forum Home Page

So far, I have completed making the home page more responsive (except for the forum stats at the top and the WOL box at the bottom, they still use scroll bars). xevV3_iZ8-s For full screen use the link below and set your YT resolution to 1080p60 HD https://youtu.be/xevV3_iZ8-s Here is... (1 Reply)
Discussion started by: Neo
1 Replies

3. What is on Your Mind?

JQuery and CSS Flex Code for Responsive WOL Page

I have just wrote this jQuery to the WOL page, so the table of users on line will not need scrollbars and will instead transform into a responsive table: <script> jQuery(document).ready(function (){ jQuery("#neo-who-flex-tcat"). css({"display":"flex","flex-flow":"row wrap", ... (0 Replies)
Discussion started by: Neo
0 Replies

4. Shell Programming and Scripting

Using Linux Commands on selected text

Hi I have a XML file as shown below: <Text Text_ID="10155645315850165_10155645333075165" From="460350337463650" Created="2014-10-16T17:05:37+0000" use_count="536">This is the first text</Text> <Text Text_ID="10155645315850165_10155645317025165" From="1626711840908498"... (10 Replies)
Discussion started by: my_Perl
10 Replies

5. Shell Programming and Scripting

To display the selected part in text file of unix

0400903071220312 20120322 20:21 1TRANTELSTRAFLEXCAB22032012CMP201323930000812201108875802100A003485363 12122011AUS 182644 000C2 8122011 0000 000 1TRANTELSTRAFLEXCAB22032012CMP201323930000812201108875802100A003485363 12122011AUS ... (6 Replies)
Discussion started by: rammm
6 Replies

6. Shell Programming and Scripting

Awk to add selected row column data

Looks at the most efficient way to add up the column of data based off of the rows. Random data Name-Number-ID Sarah-2.0-15 Bob-6.3-15 Sally-1.0-10 James-1.0-10 Scotty-10.7-15 So I would select all those who have ID = 15 and then add up total number read - p "Enter ID number" Num ... (3 Replies)
Discussion started by: Ironguru
3 Replies

7. Shell Programming and Scripting

trying to print selected fields of selected lines by AWK

I am trying to print 1st, 2nd, 13th and 14th fields of a file of line numbers from 29 to 10029. I dont know how to put this in one code. Currently I am removing the selected lines by awk 'NR==29,NR==10029' File1 > File2 and then doing awk '{print $1, $2, $13, $14}' File2 > File3 Can... (3 Replies)
Discussion started by: ananyob
3 Replies

8. Shell Programming and Scripting

want to add the size of the selected list of file

i have a files in the dir as below. ls -lR ./.snapshot 5649600512 ./.snapshot/backup/data20080707 6006923264 ./.snapshot/backup/data20080708 5321129984 ./.snapshot/backup/data20080709 6686597120 ./.snapshot/backup/data20080710 7312855040 ... (4 Replies)
Discussion started by: mail2sant
4 Replies
Login or Register to Ask a Question
wm2(1)							      General Commands Manual							    wm2(1)

NAME
wm2 - Small, non-configurable Window Manager for X SYNOPSIS
wm2 DESCRIPTION
wm2 is a window manager for X. It provides an unusual style of window decoration and as little functionality as I feel comfortable with in a window manager. wm2 is not configurable, except by editing the source and recompiling the code, and is really intended for people who don't particularly want their window manager to be too friendly. wm2 provides: -- Decorative frames for your windows. -- The ability to move, resize, hide and restore windows -- No icons. -- No configurable root menus, buttons or mouse or keyboard bindings. -- No virtual desktop, toolbars or integrated applications. USING wm2 To run wm2, make sure you're not already running a window manager, make sure the DISPLAY variable is correctly set, and then execute the file "wm2". There are no command-line options or X resources, and there is no start-up file. If your X server doesn't support the Shape extension, wm2 will exit (and will never work on your server); if it can't find the required fonts or allocate the required colours, it will also exit (but you should be able to fix this by changing the definitions in Config.h and recompiling). Available window manipulations are: -- To focus a window: Move your mouse in the window. If you want a different focusing policy, you'll have to recompile wm2 (see the README for info). -- To raise a window: click on its tab or frame, unless you have auto-raise on focus set in Config.h. -- To move a window: make sure it's in focus, then click and drag on its tab. -- To hide a window: make sure it's in focus, then click on the button at the top of its tab. -- To recover a hidden window: click left button on the root window for the root menu, and choose the window you want. -- To start a new xterm: use the first item on root menu ("New"). -- To delete a window: make sure it's in focus, click on the button on the tab, hold the mouse button for at least a second and a half until the cursor changes to a cross, then release. (I know, it's not very easy. On the other hand, things like Windows-95 tend to obscure the fact that most windows already have a perfectly good Close option.) -- To resize a window: make sure it's in focus, then click and drag on its bottom-right corner. For a constrained resize, click and drag on the bottom-left or top-right corner of the enclosing window frame. -- To lower a window: click with the right mouse button on its tab or frame. (This was the only new feature in the second release.) -- To exit from wm2: move the mouse pointer to the very edge of the screen at the extreme lower-right corner, and click left button on the root window for the root menu. The menu should have an extra option labelled "Exit wm2"; select this. (This is a new feature in the third release.) All move and resize operations are opaque. Focus policy. This is a compile-time option. To rebuild, see the README in /usr/share/doc/wm2/README.gz CREDITS
wm2 was written by Chris Cannam, recycling a lot of code and structure from "9wm" by David Hogan (see http://www.cs.su.oz.au/~dhog/ ). 9wm is written in C, so very little of the code is used verbatim, but the intention was to reuse and a lot of the resulting code is recognis- able. (Also 9wm's minimalism was rather inspiring.) I've made enough changes to make it very probable that any bugs you find will be my fault rather than David's. wm2 also uses version 2.0 of Alan Richardson's "xvertext" font-rotation routines. The sideways tabs on the window frames were Andy Green's idea. If you want to hack the code into something else for your own amusement, please go ahead. Feel free to modify and redistribute, as long as you retain the original copyrights as appropriate. AUTHOR
Chris Cannam, cannam@zands.demon.co.uk BUGS
The principal bug is that wm2 now has too many features. That aside, if you find a bug, please report it to me (preferably with a fix). wm2(1)