How do I paste html into a textbox? [duplicate] - html

This question already has answers here:
JavaScript get clipboard data on paste event (Cross browser)
(22 answers)
Closed 9 years ago.
I want a user to highlight a part of a web page and paste it into a textbox on my site. But I want the formatting from the original site to be preserved somehow. So I want to copy more than just text. Gmail seems to be able to do this when composing an email.
I don't know where to begin with this problem. Any thoughts?

If you have windows7 use the snipping tool and cut it from the screen as a .jpg.
Then use simple html
<img src="sth.jpg" alt="sth" height="" width="">

Related

How to insert a section of HTML Code into a larger, HTML document [duplicate]

This question already has answers here:
Include another HTML file in a HTML file
(41 answers)
Closed 4 years ago.
Im trying to understand how to insert a section of HTML into a larger doccument.
Im building a website with a sidebar containing a news section and a few links, the whole sidebar is manual, and is copy/pasted to each page, i want to make a system where i insert the code into the webpage from a master document, so changing a master will affect all pages importing it, i dont want to make the news page a seperate web page, imported by something like iframe, any sugjestions would be super apreciated, thanks!
Try using the <iframe> tag to embed the page into the other page
Example:
<iframe src="https://google.com"> </iframe>

Encrypt CSS style and HTML Is possible? [duplicate]

This question already has answers here:
How to disable (View Source) and (Ctrl + C ) from my site
(10 answers)
Closed 6 years ago.
My scenario is I have created a html website using inline css and also used css generator tool for menu items so any one who have good Idea in design can easily track that style is generated by tool that's why I want encrypt html and css source after rendering .
please suggest me is there any option to encrypt html or css code.
Thanks In advance.
no I would say thats not possible.
HTML and CSS are client side code which is open for all to view.
So they can't be encrypted.
Maybe look at minification, but the browser needs to interperate the code so encryption wouldn't be an option.
Here is some links to minify.
https://cssminifier.com
https://javascript-minifier.com/
If your using a CMS there are plently of minification tools.

URL Actions from URL only [duplicate]

This question already has answers here:
How do I add target="_blank" to a link within a specified div?
(7 answers)
Closed 6 years ago.
A quick question regarding URL target actions.
Is there a way to specify the target action of a URL within the URL?
Context: I can't edit the underlying code where links live in this particular instance, but I have full control over the links themselves. I'd like to be able to specify a link target (new tab, new window, same tab, etc) from a URL itself.
If that's possible, awesome!
If that's impossible, darn (and thank you for enlightening me).
There's no reliable way as far as I'm aware (it's a security concern). If you only have control of the URL because you're using some other system (you're not the admin), chances are the link is escaped for javascript. If it isn't:
Some link

Chrome extension, how to Modify page content (add something) [duplicate]

This question already has answers here:
Modify HTML of loaded pages using chrome extensions
(2 answers)
Closed 6 years ago.
I'm new to Chrome extension development, my first project (to learn) is to create an extension that adds some html to another website's existing page.
I plan on creating a 'page' action which fires for a page with a certain URL...
Has anyone seen a tutorial like this, or do you know of an API for adding html to a page?
You can find some example at Google Sample Extension page, however your question seems better answered on this other question.
There are a number of sample extensions on the Chrome extension API site. There are a couple of browserAction examples that will be almost identical to using pageAction.

How do I put a number on my Google Chrome extension? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Google Chrome Extension Numbers on the Icon
So I'm developing a chrome extension and I would like to put a number on the icon. I'm assuming this is done through the canvas element but I can't find any examples. Anyone have an example they want to share?
The number is called a "badge", and you can use up to four characters: http://code.google.com/chrome/extensions/browserAction.html
Call setBadgeText() to change it.