How to make niceditor readonly? - nicedit

I have some textareas in my page. I converted all into niceeditor with the option provided. I will save the content of the niceditor into my database. While i am retrieving, i will get the html tagged data. I am showing the text in my page.
So to show the rich text of what i enter. I should make niceditor. So that i could show the rich text. And also it should be readonly.
Please guide me to make niceditor readonly or guide me to show the rich text without editing option through some way.
my textarea name is 'area3'.
thanks

Why not use div instead of textarea? Nicedit supports convert divs too , You can toggle nicedit on or off.

Related

Allow user to select text in ShowMessage dialog

I am writing a program in Delphi XE2. At one point in my program the user will be presented with output text, which I display through a simple "showmessage('The text of interest')" dialog.
I would like for the user to be able to copy and paste this text if they like to. It's not a key part of the program at all but I know that it might be nice for them to be able to do so.
At the moment, as far as I can see, it is not possible to select all or parts of the text from this type of message box, which brings me to my question: is there some way to make the message box text selectable for the user, or will I have to move on to other ways of displaying the text if I want this functionality? Any help would be greatly appreciated.
When you call ShowMessage a system message dialog is shown. This dialog does not support highlighting of individual portions of text. However, the dialog does respond to CTRL + C by placing the entire content of the dialog on the clipboard.
If you absolutely must have selection of individual portions of text then you will need to create the dialog yourself using Delphi controls.

EXTJS - Possible to have clickable hyperlinks in TextArea?

I am using EXTJS 3.2.1, and am wondering if the user inputs a URL such as www.stackoverflow.com into a TextArea and submits. Then when the page reloads, if I can display it as a clickable hyperlink?
Thanks for the help.
It's a rich text editor (rtf), so yes.
The editor I am using to type this answer is a rich text editor. I can format the text, add links, etc. The Rich Text Editor is a UI control that replaces a standard HTML textarea.

Editor and Inplace issues

I have an issue with inplace with Editor i.e the rich text editor.
When a user stores html text with editor (the rich text editor), the text is escaped in the inplace label.
How do I set escape to false in the inplace so it does not escape html. Which is the point of the rich text editor in the first place.
The second issue is that when I try to save the editor.the next time the inplace label is clicked , the editor ( the rich text editor) disappears.
Any help will be appreciated.
The point of rich text editor is that it provides simple tools for users to format their text without direct markup. This is the reason why your markup is escaped. The component you need is codeMirror from primefaces-extensions which is a simple code-editor interface for javascript, html, etc.
I was able to reproduce this behavior. You should take a look to primefaces bug tracker and report this issue.

How to display email body on iOS

I'm developing an email app on iOS. I want to create a view that can display email. My problem is that an email body may be plain text or HTML(sometimes with CSS), so I can't find a proper UI component for such content. I tried UIWebView, but when the content is plain text, the line breaks are ignored!
How about convert the plain text to HTML? Or just use UITextView to display content which is plain text?
So, do you have any suggestions?
Update:
To addition, many HTML contents contain images most of which are just urls. If I use a text based view how can I display the images? Is there any library support such features?
You should use UIWebView and convert the linebreaks to br tags, like this:
HtmlText = [dataString stringByReplacingOccurrencesOfString:#"\n" withString:#"<br/>"];
Use third party textView - A rich text view for iOS with basic HTML rendering. follow bctextview link.

wysiwyg xhtml text area with keyboard shortcuts

I have a web-based table editor with many textarea's. The textarea's contain HTML content. I would like the users to be able to edit them in WYSIWYG style. Since my users love to use the keyboard, I would like it to have a simple way to add keyboard shortcuts, including shortcuts for adding div's with custom class names.
This: http://markitup.jaysalvat.com/home/ comes close to what I need, the only problem is that it's not WYSIWYG.
This: http://premiumsoftware.net/cleditor/ is also close, but does not have keyboard shortcuts.
An obvious answer is CKEditor. Besides all the built-in shortcuts (Press Alt-0) you can add more commands with the API.

Resources