I have a div element. Inside the element I have a CK editor. What I want is that it cant input text when it is greater than some lines.
I tried calculating the offsetheight
of the element and I have set height for an element.so i am checking by offsertheight/maxheight*100
which should not be greater than 100%.
const taHeight = divElement.offsetHeight;
currentHeightPercentage = Math.floor((taHeight / maxHeightAllowed) * 100);
So this works fine but the difference comes if I use an iPad then I am able to enter more lines of text but in laptop I am unable to enter the same number of lines as I could enter in iPad.