Giter VIP home page Giter VIP logo

codery.textcount's Introduction

Codery.TextCount

An Umbraco data type which wraps existing text data type controls and shows text counts and limits while you type.

How to use it

Create a new data type using the 'Text Count' property editor.

Next up, choose your options:

  • Data Type: choose the existing text-based data type that you want to add a counter to (supported types: Textstring, Textarea, RTE, Markdown and Repeatable Textstring).
  • Characters or Word: choose whether the counter should count individual characters or whole words.
  • Limit: set the number of characters or words you want to be the limit (leave empty if there is no limit).
  • Limit Type: choose whether the limit is a warning (but allows users to add more), a hard warning (preventing users to save more than the specified limit) or no limit (the text counter just acts as a guide).

Save it, add it to a document type and your editors will now see the text counter displayed next to the input field.

How to install it

The package can be installed through NuGet:

Install-Package Codery.TextCount 

codery.textcount's People

Contributors

tomvanenckevort avatar

Stargazers

Gavin Faux avatar

Watchers

 avatar

codery.textcount's Issues

TextCount RTEs do not work with macros

Hi,

The TextCount RTE macros don't display correctly. Instead of showing the macro, it just shows the bolded text "Macro Alias: {MacroName}".

Wrapping the output with umbraco.library.RenderMacro does not fix the problem either.

We tested this side by side with a normal RTE and a TextCount RTE. The normal RTE displays the macro correctly on the front end. The TextCount RTE does not display the macro correctly on the front end (although it does display it correctly in the umbraco admin).

Configuration stores INT id for DataType- which causes issue on Umbraco Cloud/Deploy transfer

@tomvanenckevort Thanks for your help with the various issues I have been experiencing. Once I had it working beautifully on my local site, I pushed it to my Umbraco Cloud environment, and it broke ๐Ÿ˜ข.

It was trying to "wrap" the wrong DataType on the Cloud environment. I can see that the generated UDA file is storing an INT for the datatype id, whereas a GUID would be better for Cloud/Deploy purposes, since INT Ids vary between environments, but GUIDs do not.:

image

Characters not counted in RTE for Umbraco 8.13.0

I was really excited to find this lovely package, since it is providing the functionality I was looking for, unfortunately, the counter doesn't seem to be working, at least in RTEs in Umbraco 8.13.0:
image

This does work for a basic textstring:
image

I'm not sure if the structure of the RTE changed since your last updated for Umbraco 8.2...
This is the back-office HTML:
image

Suggestion - Remove additional dependencies from NuGet package

Installing via NuGet I was a bit dismayed to see this package included an installation of UmbracoCMS. I don't think this is necessary. If you were using it for development, you can exclude it from the compiled NuGet package by updating your csproj file with the PrivateAssets="All" attribute :

<ItemGroup>
    <PackageReference Include="UmbracoCms.Core" Version="8.13.0" PrivateAssets="All" />
    <PackageReference Include="UmbracoCms.Web" Version="8.13.0" PrivateAssets="All" />
  </ItemGroup>

This will keep it from installing those packages when the end user installs your package.

Repeatable Textstrings not saving

When using TextCount with a Repeatable Textstrings data type, you can add new items to the list and click Save (or Save & Publish), but then adding new items does not seem to work. It still display the items, but doesn't show the character count anymore and when saving and refreshing the page, the items added after the first save have disappeared.

Reported with TextCount v1.0.15 & Umbraco v7.14.

PropertyValueConverter returns "object"

Hi @tomvanenckevort ๐Ÿ‘‹๐Ÿป

I use the API version of ModelsBuilder (latest - "Umbraco.ModelsBuilder 8.1.6"), and noticed that a TextCount wrapped RTE property is returning data as "object":

In the interface for the composition:
image

In the class for a content type using that composition:
image

I see there is a PropertyValueConverter in the package, so I'm not sure why this is the result...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.