Content
Updated by Andrea(s) Speck almost 7 years ago
See https://www.drupal.org/project/2959081/issues/2985394
We should validate tweets as we type making use of https://github.com/twitter/twitter-text/tree/master/js or https://packagist.org/packages/nojimage/twitter-text-php (the latter might be the easier option - see https://grape.netuxo.co.uk/work\_packages/1596/activity\#activity-4)
The maxlength module shows the length of a text as we type. Can we take some inspiration from that?
(see https://cgit.drupalcode.org/maxlength/tree/maxlength.module?h=8.x-1.x)
This uses a maxlength\_pre\_render and a maxlength\_process\_element function, and adds these via maxlength\_element\_info\_alter(&$cache)
Needs investigating, especially also in view of https://www.drupal.org/project/maxlength/issues/2927890 (element\_info\_alter() does not seem to pick up additional paragraphs)
We should validate tweets as we type making use of https://github.com/twitter/twitter-text/tree/master/js or https://packagist.org/packages/nojimage/twitter-text-php (the latter might be the easier option - see https://grape.netuxo.co.uk/work\_packages/1596/activity\#activity-4)
The maxlength module shows the length of a text as we type. Can we take some inspiration from that?
(see https://cgit.drupalcode.org/maxlength/tree/maxlength.module?h=8.x-1.x)
This uses a maxlength\_pre\_render and a maxlength\_process\_element function, and adds these via maxlength\_element\_info\_alter(&$cache)
Needs investigating, especially also in view of https://www.drupal.org/project/maxlength/issues/2927890 (element\_info\_alter() does not seem to pick up additional paragraphs)