Skip to content

Releases: WebCoder49/code-input

2.0.3

07 Oct 09:44
c7c086e

Choose a tag to compare

Bug Fix

What's Changed

  • Fix HTML attributes like disabled so they can be synchronised with the textarea element. (Issue #59)

🎉 Thanks to @vcdomith for their issue about the bug above! As always, if you find any bugs or want any more features in code-input as a plugin, please open an Issue or submit your code in a Pull Request. This library is completely fuelled by the open-source community 🚀 .

Full Changelog: v2.0.1...v2.0.3

2.0.2

07 Oct 07:33

Choose a tag to compare

2.0.1

10 Jul 09:06
0242a75

Choose a tag to compare

🆕 What's in this release?

This is a major release, with several aims:

  1. ⌨️ Make <code-input> work more like a <textarea>, including more HTML form compatibility (demo) - thank you especially to @vanowm
  2. 🧹 Add TypeScript support - please see WebCoder49/code-input-for-typescript
  3. 🎉 Keep adding optional plugins from the open-source community - please see plugins/README.md

(+bug fix for template not registering bug)

🔌 API Changes

⚠️ This section is only useful for library users transferring their code-input version from v1.<something> to v2.<something>. If you're a new user, please see the README file; otherwise, please click.

In order to carry out significant progress with the library, and in order to make the code cleaner, some changes have been made to how you should use the library. Methods from versions 1.* still exist, but are deprecated so will not be improved.

General Changes

Reason Old Usage New Usage
To match <textarea> elements <code-input> value attribute for text content <code-input> inner HTML for text content (see README for usage)
More intuitive for object-oriented programming and TypeScript codeInput.templates.custom(...) new codeInput.Template(...)
Clean, consistent code codeInput.templates.character_limit() codeInput.templates.characterLimit()
Clean, consistent code codeInput.templates.rainbow_text(...) codeInput.templates.rainbowText(...)

More Technical/Less-Used Changes

(click to view if you are building a code-input plugin or coming across bugs)
Reason Old Usage New Usage
Remove unnecessary function calls <code-input element>.querySelector("textarea") <code-input element>.textareaElement
Remove unnecessary function calls <code-input element>.querySelector("pre") <code-input element>.preElement
Remove unnecessary function calls <code-input element>.querySelector("pre code") <code-input element>.codeElement
More flexibility and fewer bugs when creating plugins Plugin.observedAttributes = ["attrib1", "attrib2"] In constructor of plugin: super(["attrib1", "attrib2"])
More flexibility when creating plugins All observed attributes detected exactly * symbol represents wilcard = any piece of text (see Test plugin)
Clean, consistent code Other snake_case functions camelCase

As always, if you find any bugs or have any ideas for new features, please submit an issue or pull request.

Full Changelog: v1.5.1...v2.0.1

2.0.0

30 Jun 08:38

Choose a tag to compare

1.5.1

31 May 08:01
179584e

Choose a tag to compare

📦 code-input is now on NPM (link)!

Over time, this will allow the library to work better with people's ordinary workflow, and features like TypeScript compatibility.

As always, please submit an Issue or Pull Request if you find a bug or have an idea for a new feature.

1.5.0

29 May 07:35

Choose a tag to compare

🆕 What's in this release?

  • Synchronise built-in form validation (Demo) - #40
  • Clean Up Codebase - #42

Thank you to @AzzaAzza69 for opening issue #40 . If you have an idea for a plugin, find a bug, or think that the <code-input> element doesn't support something that a <textarea> does and that would be useful, please contribute!

Full Changelog: v1.4.1...v1.5.0

1.4.1

18 May 15:44

Choose a tag to compare

🆕 What's in this release?

What's Changed

  • Special character plugin in #37
  • Very Quick Typo Fix

🎉 Thank you to @SArpnt for suggesting this feature. If you have any more ideas for features, plugins, or bug fixes, please open an issue or submit a pull request.

Full Changelog: v1.4.0...v1.4.1

1.4.0

06 May 07:22

Choose a tag to compare

🆕 What's in this release?

What's Changed

  • Special character plugin in #37

Full Changelog: v1.3.1...v1.4.0

🎉 Thank you to @SArpnt for suggesting this feature. If you have any more ideas for features, plugins, or bug fixes, please open an issue or submit a pull request.

1.3.1

27 Apr 16:44

Choose a tag to compare

Bug Fix

What's Changed

  • Remove selections after ENTER, so caret doesn't select new text. #35

Full Changelog: v1.3.0...v1.3.1

1.3.0

12 Apr 08:09

Choose a tag to compare

Bug Fixes / Optimisations

What's Changed

  • Fix line-height bug & remove margin from code-input in #33 (issue #27)
  • Change event transfer to work with add/removeEventListener in #34 (issue #28)

Full Changelog: v1.2.4...v1.3.0
🎉 Thank you to everyone who found bugs and contributed to this release. Please submit an issue or pull request if you find a bug or want a new feature / plugin.