Adding Select All for [code] BBcode 1.1

Нет прав для скачивания
XF Compatibility
  1. 2.2.x
Short Description
Get the latest version 1.1 of Adding Select All for [code] BBcode . Скачать and Discuss the 939 байт File size with txt Extention type . From The Content have 1 Description Attachments, 153 Просмотры on NullPro Community .
A simple but effective way to select all the content within a code bbcode in your forum.

Please note: this doesn't add a "select all" button like you're probably used to see, but it adds a simple functionality to your mouse (or your thumbs) so that each time you click (or tap) inside a code box, it'll automatically select all the text into it.

How to:
Download the attached file, and replace it with your existing bb_code_tag_code file in your template(s).
Alternatively, follow these steps to manually modify it:
  • Find
HTML:
<code>{$content}</code>
  • Replace it with:
HTML:
<code onclick="getData(this)">{$content}</code>
  • And add the following javascript code at the very end of that file (so that you load it only when you effectively have a code bbcode in your page, to save bandwidth):
JavaScript:
<script>
function getData(element)
{
if (document.body.createTextRange) {
var range = document.body.createTextRange();
range.moveToElementText(element);
range.select();
} else if (window.getSelection) {
var selection = window.getSelection();
var range = document.createRange();
range.selectNodeContents(element);
selection.removeAllRanges();
selection.addRange(range);
}
}
</script>

Автор
axtona
Просмотры
153
Extention type
txt
File size
939 байт
Первый выпуск
Обновление
Рейтинги 0,00 звёзд Оценок: 0
Link was Broken? Please Send Message to NP Team with direct message, You will get it very quickly!
Support Developer If you are satisfied with your test or project have earn money successfully, Maybe you can click more information button to support with buying.

Ещё ресурсы от axtona

A
an advanced WordPress timeline plugin that showcases your life history timeline
Просмотры
421
Обновлено
A
A simple template modification that turns node icons to clickable links.
A
The plugin allows you to create a "Quick Tag User" button in forum topics.