Can i get applied style Object of editor-text in textangular - angularjs

i want to save textangular editor's text with styles and tags (applied by its toolbar) in DB.
Is there a way i can do this without saving HTML ?
Currently i am saving html with decoding.

Related

When I render my user input from a textarea in react, all of the formatting (line-breaks and tabs) are automatically removed, how do I change that?

How my text appears when rendered
How my text appears in the textarea input
I am posting multi-paragraph blogs, some about poetry (where line breaks and spacings matter a lot). How do I make the line breaks and other spacing stay when I render the data? Can I make it so the user can put html tags in the textarea somehow? I am using firebase realtime database to store the data.
I tried changing the HTML tag in the rendered component from p to per, expecting to be able to use html tags, but that didn't work.
write this code on css file
white-space: pre-wrap;

Displaying Quill editor content with correct style

I am using the Quill editor (via ngx-quill) to give my user the ability to edit documents. When the documents are displayed I show them like this:
<div [innerHTML]="doc.text"></div>
This works reliably, but the styling of the content of the div tag is quite different from what you see in the Quill editor window. What I want to do is apply the Quill content stylesheet to my div tag, but I haven't been able to find any document to do that. Does anyone here know how to do that?
I know one alternative is to invoke a Quill editor in read-only mode and without a tool-bar. That's my fall-back but I would prefer not to do that.
I was facing the same issue. Some inline styles are displayed, but the styles applied from the Quill.js class are not applied. post-content is class of div containing the content:
let content=document.querySelector('.post-content')
content.innerHTML=content.innerText

QuillJS preview is not as editor view- formatting issue

i am using react quill editor and the editor is working fine. but when i display the html content its not in the format shown in editor view. in console i can see that ql-indent class was applied to tag but its not working outside editor. i tried applying quill core.css styles but still no use.
It's difficult to find a guide on displaying quill-editor html content outside the editor.
so please help me in handing ql-xxxx classes outside editor.
i fixed it by adding ql-editor class to the preview div tag.
<div className="ql-editor" dangerouslySetInnerHTML={{__html: htmlContent}} />

How to display formatted html in text area in angularjs?

I am trying to display html by using angularjs sanitize module and ng-bind-html attribute on the element. It works fine if I have the attribute
on a div element.
<div ng-bind-html="htmlText" contenteditable="false"></div>
But I need the same text in a text area control. When I read about displaying html in text area, my understanding was that
text area does not support this. Is there a way I can convert the html to text before hand in controller and then use only ng-bind on text area? I have multiple long paragraphs and bullet points in html to display as formatted text.
Thanks for any suggestions.
//Does not display formatted html.
<textarea class="form-control" ng-bind-html="htmlText" contenteditable="false" rows="7"></textarea>
textarea only supports plain text. Since you are not allowing the text to be edited, I'd use the div that you started with. I suspect that you're trying to control the size and enable scroll bars when necessary on the div, and hoping to get that out of textarea. You'll be much better off just styling the div accordingly.

ExtJS: Making an image as a column header

Is it possible in ExtJS 4.0 to set a column header as a image, or custom rendered HTML?
The API for column text says:
text : String
The header text to be used as innerHTML (html tags are
accepted) to display in the Grid.
Which means you can pass in something like <span class="mySpan"></span> and define a css class that has a background image.
EDIT:
Here is an example:
http://jsfiddle.net/HSVj8/102/

Resources