Skip to content

Commit 5432352

Browse files
committed
Document pluginData in d.ts
1 parent fa622b0 commit 5432352

File tree

6 files changed

+15
-11
lines changed

6 files changed

+15
-11
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 WebCoder49
3+
Copyright (c) 2021-2025 Oliver Geer and contributors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# code-input
22

3-
> **:warning: This document is a work in progress for the next release. [Read latest released instructions.](https://github.com/WebCoder49/code-input/tree/v2.5.1/README.md)**
4-
53
![Click to Switch](https://img.shields.io/static/v1?label=&message=Click%20to%20Switch:%20&color=grey&style=for-the-badge)[![Website and Demos](https://img.shields.io/static/v1?label=&message=Website&color=black&style=for-the-badge)](https://code-input-js.org)[![GitHub](https://img.shields.io/static/v1?label=&message=GitHub&color=navy&style=for-the-badge&logo=github)](https://github.com/WebCoder49/code-input)[![Yarn](https://img.shields.io/static/v1?label=&message=Yarn&color=purple&style=for-the-badge&logo=yarn)](https://yarnpkg.com/package?name=@webcoder49/code-input)[![NPM](https://img.shields.io/static/v1?label=&message=NPM&color=red&style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@webcoder49/code-input)
64

75
[![View License](https://img.shields.io/github/license/webcoder49/code-input?style=for-the-badge)](LICENSE) [![View Releases](https://img.sHields.io/github/v/release/webcoder49/code-input?style=for-the-badge)](https://github.com/WebCoder49/code-input/releases)

code-input.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,21 +202,21 @@ code-input .code-input_dialog-container .code-input_keyboard-navigation-instruct
202202

203203
display: block;
204204
position: absolute;
205+
top: 0;
206+
left: 0;
207+
205208
background-color: black;
206209
color: white;
207210
padding: 2px;
208-
padding-left: 10px;
209211
margin: 0;
210212
text-wrap: balance;
211213
overflow: hidden;
212214
text-overflow: ellipsis;
213-
width: calc(100% - 12px);
215+
216+
width: 100%;
217+
box-sizing: border-box;
214218
max-height: 3em;
215219
}
216-
code-input:has(pre[dir=rtl]) .code-input_dialog-container .code-input_keyboard-navigation-instructions {
217-
left: unset;
218-
right: 0;
219-
}
220220

221221
code-input:not(:has(textarea:not([data-code-input-fallback]):focus)) .code-input_dialog-container .code-input_keyboard-navigation-instructions,
222222
code-input.code-input_mouse-focused .code-input_dialog-container .code-input_keyboard-navigation-instructions,

code-input.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,12 @@ export class CodeInput extends HTMLTextAreaElement { // Tries to implement texta
448448
* @param {boolean} includeAriaDescriptionFirst Whether to include the aria-description of the code-input element before the keyboard navigation instructions for a screenreader. Keep this as true when the textarea is first focused.
449449
*/
450450
setKeyboardNavInstructions(instructions: string, includeAriaDescriptionFirst: boolean): void
451+
/**
452+
* Allows plugins to store data in the scope of a single element.
453+
* Key - name of the plugin, in camelCase
454+
* Value - object of data to be stored; different plugins may use this differently.
455+
*/
456+
pluginData: Object
451457
}
452458

453459
/**

code-input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@ var codeInput = {
10761076

10771077
/**
10781078
* Allows plugins to store data in the scope of a single element.
1079-
* Key - name of the plugin
1079+
* Key - name of the plugin, in camelCase
10801080
* Value - object of data to be stored; different plugins may use this differently.
10811081
*/
10821082
pluginData = {};

plugins/find-and-replace.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)