reset fck editor values yii - yii

I am using yii framework and i have fck editor in form. If i click reset button all the fields in the form get empty but the editor doesn't. This is the code for fck editor
$this->widget('application.extensions.fckeditor.FCKEditorWidget',array(
"model"=>$model, # Data-Model
"attribute"=>'content', # Attribute in the Data-Model
"height"=>'400px',
"width"=>'100%',
"fckeditor"=>Yii::app()->basePath."/../fckeditor/fckeditor.php",
# Path to fckeditor.php
"fckBasePath"=>Yii::app()->baseUrl."/fckeditor/",
# Relative Path to the Editor (from Web-Root)
"config" => array("EditorAreaCSS"=>Yii::app()->baseUrl.'/css/index.css',),
# Additional Parameters
How can i do that?

AFAIK FCKEditor (and any other similar) is based on simple textbox (HTML element textarea).
If you're using jQuery, I would consider adding a simple piece of code to onDocumentReady function in the view that is generated after reset of the form (or directly to the Reset Button's onClick code, if you're not reloading page after reset). In this code I would simply force field that is used as base for FCKEditor to make sure it is empty.
Something like this:
$('#editor').val('');
Written from memory, not tested though.

Related

Can I customize the "New File" menu in PhpStorm?

I would like to add some other options, like "PHP Enum" or "PHP Interface" directly to this menu. Also, I would like to put PHP-related options first. It is possible tu customize this in PhpStorm? I'm using last version (2022.3.2) with the new UI enabled.
I tried using Appearance & Behaviour -> Menus & Toolbars but that didn't work for me.
Do you know that you can use the universal PHP Class entry and just change the type of the object (and therefore the file template) there? That can be done right away when typing the file or class name -- just use Arrow Up / Down keys:
(GREEN rectangle area is where that Up / Down key will work; RED rectangle shows my custom file templates)
P.S. The template for PHP Enums is also there, it just the screenshot was taken in a project with PHP 8.0 language level (need 8.1 for enums to appear).
P.P.S. The IDE will remember the last used template when you invoke this dialog again.
https://www.jetbrains.com/help/phpstorm/creating-php-classes.html
You can add new entries to this menu by creating custom File Templates at Settings/Preferences | Editor | File and Code Templates
https://www.jetbrains.com/help/phpstorm/settings-file-and-code-templates.html
Here are my test custom file templates:
And this is how they appear in that menu:
Customizing this menu (removing items, changing their order)
This is not possible at the moment. https://youtrack.jetbrains.com/issue/IDEA-143090 -- watch this ticket (star/vote/comment) to get notified with any progress.

What does the scheme dropdown menu do in Phpstorm?

In the settings window of Phpstorm, there is a dropdown box labelled scheme
What does it do?
What does it do?
You may be surprised .. but it allows you to choose another (different) Code Style scheme for this project.
PhpStorm supports globally defined schemas (by default it provides only one -- "Default") which can be used by any project and project-specific schema called "Project" which available for this project only (and stored together with other project-specific settings).
You can read more in official help page.
The Code Style is used for code formatting: be it automatic as you type / use live templates etc .. or manual reformat via Code | Reformat Code...
It's used to
choose the code style scheme to be used as the base for your custom coding style for the selected language (Source).
In other words: after selecting a scheme, you can set different formatting options, like tabs vs spaces, tab size or line breaks etc. To use those settings in your current project, you need to click Manage, select your edited scheme and click Copy to Project. After this, you can press Ctrl + Alt + L (Code > Reformat Code...) in the editor to reformat a file according to those scheme settings.

What is MarkSelection in Eclipse, it will be used in what scenario?

I know StructuredSelection will be used when you select a file in Package Explorer for example, and TextSelection will be used when you select some text in Editor, but not clear about MarkSelection, when it will be used?
MarkSelection is generated by TextViewer (so usually a text editor) and reports a change to a 'mark' selection. It will only be sent to selection change listeners for the text viewer.
The TextViewer.setMark method causes the mark selection changed event to be generated. This only seems to be used by incremental search and for marked regions used in Emacs style editing.

Issue on using "scrolling text" module in Joomla

I have downloaded and installed various module for scrolling text horizontally using these websites.
After I created new module and point out the position of that module, I can view that module in my web page. The text didn't appear because I didn't mention it in my module.
In Both of those modules, I couldn't find out that where have to I place the text to be scrolled in that particular modules?
I have searched a lot. But I couldn't get anything.
Any help will be appreciated!
Thank you in advanced!
These extensions display text from articles. So all you have to do is simpley:
Create a category in the Content Manager
Create some articles and assign them to your newly created category
In the Module settings, there will be an option to choose which category you wish to display the articles from, simply select your category
Hope this helps
There is no need of using any other modules for scrolling the text.
I used Custom HTML as menu type and write the code on editor.
The steps I have done as below:
Go to site -> Global configuration -> set Editor-None in default editor
Go to Extension-> module Manager -> New -> select the module type as Custom HTML
Copy the html code for scrolling text and Paste it in the text part and save the module.
Check your site. Now, your site is having the scrolling text. Then, You can change the Editor as before.

How to programmatically add Tooltip for InlineEditBox in dojo 1.8

I'm using dojo 1.8.1 and have two inline editors, one for a Textarea, and one for an Editor. I would like to provide flyover tips to help explain how they should be used. Ideally, I'd like to seed the inline editor's textarea / editor with a hint if there is no content, and have this disappear when they click to edit the missing content (the underlines with the writer icon didn't do it for me -- if I can replace that span that would be okay too). However, as a start it would be nice to have a tooltip show when mousing over the entry area.
There is a parameter in the constructor for the InlineEditBox called noValueIndicator where you can put the hint for content when none has been supplied and it disappears when the editor has focus for entry. Too simple -- horses, not zebras...