Category: Editor

Phpstrom Editor Some Important Tips


-Xms128m
-Xmx512m
-XX:MaxPermSize=250m
-XX:ReservedCodeCacheSize=64m
-XX:+UseCodeCacheFlushing
-ea
Just change Xmx 512 m this value. then save it. sometime this file not save normally then save it other folder then replace this in bin folder. Restart phpstrom editor .You will see new define memory in right bottom side.

2. How to show line number ?

Ans: goto file->setting from top menu then you will see a screen . goto <span style="color: #993300;">editor tab-> appearance</span> then you will see

Show line number checkbox . Check it.

3. Goto line number ->Ctrl+g

4. Find Ctrl+f

5. Find and replace Ctrl+r

6. Find in path Ctrl+shift+f

7. Replace in path Ctrl+shift+r

8. Any comment ctrl+shift+/

9. Goto end tag ctrl+}

10. Format code ctrl+alt+l

11. goto include file then click this file name

12. Goto start tag ctrl+{
13. Find total function list and file list which include ctrl+F12

For more setting go to file->setting from top menu then go to keymap from "editor->keymap".



 

if you face any problem then please inform me.

Comment

Get selected text or image from ck editor

In ck editor need sometime get selected text or image to process . This is sometime problem in normal code, but i hope this code help you which give you selected text or image . This is simple code which give you which text is select in ckeditor.

var selection = CKEDITOR.instances['content'].getSelection();
if (selection.getType() == CKEDITOR.SELECTION_ELEMENT) {
var selectedContent = selection.getSelectedElement().$.outerHTML;
} else if (selection.getType() == CKEDITOR.SELECTION_TEXT) {
if (CKEDITOR.env.ie) {
selection.unlock(true);
selectedContent = selection.getNative().createRange().text;
} else {
  selectedContent = selection.getNative();
  console.log("The selectedContent is: " + selectedContent);
 }
}

This code give you which text you select in ck editor . If you face any problem then please inform me.

Comment