I am trying to display large (up to 25k characters) rich text in the ag-grid cell. I want to display only specific text at first with show more link. When you click on show more link whole text will be shown with show less link.
Rich text includes bold, italic, underline, text-color, bullets, numbering, image, etc.
This leads to dynamic height change for cells. I need to calculate the height for each cell depending on the text.
Do anyone have any idea, how the dynamic height can be handled? Or Is there any npm library to handle such kind of requirement?
I am using ag-grid with angukar9 am using ag-grid version 23 with angular9, so autoHeight feature is not available.
So basically, I have requirement for rendering larger rich text into ag-grid cell with dynamic height, do anyone have any approach for this thing. Please let me know.
show_more
show_less
Related
I am using the Material UI Text Field component as a search bar in my app. On one of the pages, I have it in 2 spots, one on the outside of the page, and another inside my DevExtreme Data Grid.
See here
For whatever reason, this shrinks the search bar, despite it being the exact same component being used in 2 spots.
My question is, what causes MUI to shrink the height of their text input field so that I can fix it accordingly inside of my data grid?
I've tried adjusting line-height, padding, margin's, etc all inside the data grid, unfortunately to no avail. The only thing I've noticed is that deep in the inspector tool, the shrunken search bar has a height of 1.435em, and checking that off will cause the search bar to correct itself to the standard height.
I am trying to replicate the mobile tag-adding mechanism that tumblr has. I have included a picture of the screen I am talking about below.
I want to replicate the following features:
Chips are inline with text field. Text field resizes dynamically to either take the remainder of the line, or take up the next line if the content is too long
Text is turned into a chip when a comma is added (e.g. If I am typing "dog", and then I type "dog,", A "dog" chip will be created
Long chips cut off content with ellipses
Chips can be deleted with backspace
There is no text field underline decoration
Chips fill up row then wrap to next row (and entire container scrolls if there are too many rows to display simultaneously)
There are some libraries that already exist to allow a text input field with chips, but they have a lot of other features that I'm not interested in right now like the recommendation system etc, and generally just don't look the way I want with regards to multiple lines and text wrapping etc. If anyone knows how to replicate the example below, I would really appreciate it!
I am using AEM 6.0 and want authors to create page using a template having
Page headline
Page sub headline
Page rich text
An image
Page rich text
Similar page - Page with image & RTE
I am planning to use AEM RTE for rich text and as RTE does not provide any option to inset image, i can do one of these
Upgrade RTE to embed image but it will have issues with responsiveness
Create page with multiple RTE and image components to render above output.
Does anyone know best way to achieve this?
For a fixed layout with responsive capabilities you are better off using templates just for simplicity. By fixed layout I am assuming your page will have fixed content location for images and text (guessing from your template details)
Modifying RTE for responsive image insertion on an arbitrary location will not render a good HTML unless you override a lot of RTE functionality. This will be a pain and counter-productive for the use case.
A mid-way alternative is to make a custom image with text (text and image control) where you allow the user to enter text and select and image separately and then provide additional layount options (image position) and responsive customisation.
One more flexible option is to use acs-commons grid layout control to use different text and image controls while letting a grid based css framework (e.g. bootstrap) take care of responsive aspects of the site.
Hope these ideas help you.
I have one TextArea in GWT, TextArea inside Scrollable panel is filled with content which comes from API. Sometime the content can be less or more. I want to make my Textarea to shirnk if content is less, so how do I count the total number of lines of text inside text area?
TextArea is with fixed height applied through CSS.
The number of lines will be different depending on the system font, font size selected by a user (it will override the font size you set in CSS), and the browser. Besides, you are talking about a TextArea, so a user can type or paste more text.
The standard design approach is to keep the TextArea size constant.
If you do want to adjust it, the solution is to create a hidden element. See the details:
http://blog.gaijindesign.com/jquery-scrolltop-to-a-hidden-element/
I have PDF template with a large text-box. Based on the size of the content, the textbox comes-up with a vertical scroll bar. But issue comes up when I flatten the PDF using PDFStamper, the text box does not have the scroll bar and user see only half of the content.
Is there way to allow scroll bar in the text box after flatten the pdf?
Please note that while designing the textbox in the template we have enabled scroll bar option.
No. Flattening a PDF effectively disables interactivity. What your printer kicks out is what you see on screen. One work around is to drop the font size on the field for long items. Another option is to make the PDF read-only instead flattening it. See this post from the office iText mailing list for more.