I use django-tinymce to input formatted text. I need to disable whole field in form and all editor buttons but can't find how. If anyone has idea about how it can be done, please help.
You have to use HTML read only attribute. Here's a trick to do that via widget:
myform.fields['status'].widget.attrs['readonly'] = True
Related
I am currently creating a mobile site using Sitecore, where I cannot use HTML as markup instead need to use BML as markup language for mobile. Please let me know the following in this regard:
We have a field called Description and its of type RICH TEXT. Here we cannot use the normal Rich Text Editor given by the Sitecore as it generates HTML. So can anyone tell me if I can create a customized RICH TEXT Editor with a button Say "Mobile Bold" and which should generate tags for mobile instead of normal HTML <b></b> tags .
As you all know we can change the RICH TEXT Editor from Default to FULL by setting the source attribute of the field to /sitecore/system/Settings/Html Editor Profiles/Rich Text Full. So in the similar way can I create one more item in the Core DB as /sitecore/system/Settings/Html Editor Profiles/MobileRichTextFull and include customized buttons to it so as to generate BML tags as described above. If this is possible let me know what are all the settings need to be done and steps to be followed for the same.
do you want the users to edit BML directly, or are you able to transform HTML to BML?
For the latter, you'd better solve this in the presentation layer/pipeline.
HTML Agility Pack will be your friend when going for this last solution.
Otherwise, look at Teleriks resources about the editor.
What I would like to do is to make a WYSIWYG editor, not a big one, just the common utilities, so bold, italic, underline, size, font, in Qt.
My approach for now is to make it in a QTextEdit, when the user click the button i get the signal and using the cursor index i put html tag, but I don't know if it's a good idea.
Any Advice?
You can always use the webkit module and relay on the contentEditable feature.
Any Advice?
Study "Order form" and "Syntax Highlighter" examples. Also, read QTextCursor and QTextDocument documentation.
I think you refer to the internal format of a document. You just need a solution to keep the formating information, so the editor/viewer can interpret it. Of cause you can choose HTML or HTML-like tags for this. I'd recommend to check out BBCodes, which are widely used for that.
By the nature of WYSIWYG the internal format should be invisible to a user. I don't know about the capabilities of QTextEdit to achieve that. Perhaps there is a HTML/BBCode extension?
i am developing a game using cocos2d framework. I want to add a text field to enter player's name. I used UITextField and the textfield is visible and the keyboard gets pop up. But my problem is the Return key is not working. I tried out many times but all in vain. please help me out, or is there any other way to add a text field in cocos2d. Thanx in advance.
Make sure that you implement all needed delegate methods for your text field. For example,
- (BOOL)textFieldShouldReturn:(UITextField *)textField
method.
did you use resignfirstresponder ? for returning keyboard just add the code as
[textfield resignFirstResponder];
also add this line of code on place where you want to return the keyboard such as on cctouchbegin or on click of any button. Hope this will work.
I need to customize the buttons' labels on MessageBox MB_YESNOCANCEL. E.g. instead of 'Cancel' I need to have 'Resign' label. Does anybody know how it can be done?
This cannot be done without writing a custom plugin...
Right now I am displaying the result in QTextBrowser. Results will be something like /home/User/, /media/Arena/ etc i.e path to different folders. Now I want to open the folder in a window by clicking on this result which is displayed in QTextBrowser. But I have no ideas how to do that. So can anyone let me know how to do it.
Thanx in advance.
P.S. I am using QtCreator & see the image http://i53.tinypic.com/qyxp1s.png.
can you insert html rather than plain text into the QTextBrowser widget? then you can use a URL to describe the paths.
BasementCat's right. You can use setHtml QTextBrowser's method to set HTML into the widget. You'll then probably need to call setOpenLinks(false) to disable default behavior and connect custom slot to widget's anchorClicked(QUrl const&) signal to handle links.