সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
এইচটিএমএল
<!DOCTYPE html>
<html>
<head>
<title>How to paste files</title>
</head>
<body>
<h1>How to paste files</h1>
<p>Hit <kbd>⌘</kbd> + <kbd>v</kbd> (for macOS) or <kbd>ctrl</kbd> + <kbd>v</kbd>
(for other operating systems) to paste image or text file(s) anywhere in this page.
</p>
</body>
</html>
সিএসএস
html {
box-sizing: border-box;
font-family: system-ui, sans-serif;
color-scheme: dark light;
}
*, *:before, *:after {
box-sizing: inherit;
}
body {
margin: 1rem;
}
img {
height: auto;
max-width: 100%;
display: block;
}
জেএস
document.addEventListener('paste', async (e) => {
// Prevent the default behavior, so you can code your own logic.
e.preventDefault();
if (!e.clipboardData.files.length) {
return;
}
// Iterate over all pasted files.
Array.from(e.clipboardData.files).forEach(async (file) => {
// Add more checks here for MIME types you're interested in,
// such as `application/pdf`, `video/mp4`, etc.
if (file.type.startsWith('image/')) {
// For images, create an image and append it to the `body`.
const img = document.createElement('img');
const blob = URL.createObjectURL(file);
img.src = blob;
document.body.append(img);
} else if (file.type.startsWith('text/')) {
// For text files, read the contents and output it into a `textarea`.
const textarea = document.createElement('textarea');
textarea.value = await file.text();
document.body.append(textarea);
}
});
});
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2023-10-25 UTC-তে শেষবার আপডেট করা হয়েছে।
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"এতে আমার প্রয়োজনীয় তথ্য নেই"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"খুব জটিল / অনেক ধাপ"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"পুরনো"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"অনুবাদ সংক্রান্ত সমস্যা"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"নমুনা / কোড সংক্রান্ত সমস্যা"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"অন্যান্য"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"সহজে বোঝা যায়"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"আমার সমস্যার সমাধান হয়েছে"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"অন্যান্য"
}]