Plugin Directory

Changeset 1131095


Ignore:
Timestamp:
04/09/2015 10:37:29 AM (11 years ago)
Author:
mortalis
Message:

readme-edit-2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • html-post-editor-new/trunk/readme.txt

    r1131083 r1131095  
    1313== Description ==
    1414
    15 The plugin adds HTML editor to the default post editor. The editor is accessible through a new HTML tab. When opening the tab the editor loads the raw HTML source of the post, formats it and applies Ace Editor to the input area. So the edit area has main features from this web editor: syntax highlight, line numbers, highlight of matching tags and brackets, keyboard shortcuts.
     15The plugin adds **HTML editor** to the default post editor. The editor is accessible through a new **HTML tab**. When opening the tab the editor loads the raw HTML source of the post, formats it and applies **Ace Editor** to the input area. So the edit area has main features from this web editor: *syntax highlight, line numbers, highlight of matching tags and brackets, keyboard shortcuts*.
    1616
    17 The plugin is based on the [ACE Editor for WP](https://wordpress.org/plugins/ace-editor-for-wp/) plugin. It's updated for Wordpress 4.1 and Ace editor 1.1.8.
     17The plugin is based on the [ACE Editor for WP](https://wordpress.org/plugins/ace-editor-for-wp/) plugin. It's updated for *Wordpress 4.1* and *Ace editor 1.1.8*.
    1818
    1919
     
    3838= Usage =
    3939 
    40 1. To open the HTML tab first make sure you are on the Visual tab because the script loads the data from the TinyMCE editor which is loaded only when the Visual tab activates.
    41 2. When you are on the Text tab the HTML tab is disabled and has a light red background so you won't be able to switch to it until you activate the Visual tab.
    42 3. When the HTML tab is activated the Text tab becomes disabled so you may only switch to the Visual tab. This is done to prevent the conflicts of content which is loaded when appropriate tab is activated.
    43 4. If you edit some content in the HTML mode and want to save it and update the post first switch to the Visual tab so the edited HTML code loads to the TinyMCE editor. It's required because the content synchronization is performed only after switching off the HTML tab.
     401. To open the **HTML tab** first make sure you are on the **Visual tab** because the script loads the data from the *TinyMCE* editor which is loaded only when the **Visual tab** activates.
     412. When you are on the **Text tab** the *HTML tab* is disabled and has a *light red background* so you won't be able to switch to it until you activate the **Visual tab**.
     423. When the **HTML tab** is activated the *Text tab* becomes disabled so you may only switch to the **Visual tab**. This is done to prevent the *conflicts* of content which is loaded when appropriate tab is activated.
     434. If you edit some content in the **HTML mode** and want to *save* it and *update the post* first switch to the **Visual tab** so the edited HTML code loads to the **TinyMCE editor**. It's *required* because the content synchronization is performed only after *switching off the HTML tab*.
    4444
    4545
    4646= Working with features =
    4747 
    48 1. Multicursor lets you edit multiple regions at the same time. You can use default shortcuts to add remove regions or select multiple blocks with mouse holding Ctrl key.
    49 2. Default keyboard shortcuts for the Ace editor can be found on the [Ace GitHub Wiki](https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts) page or on the [Ace Editor Shortcuts](http://pcadvice.co.nf/blog/ace-editor-shortcuts/) page I created for the Wordpress version of this editor. Here I selected some shortcuts and organized them by categories.
    50 3. The Search box gives additional functions:
     481. **Multicursor** lets you edit multiple regions at the same time. You can use **default shortcuts** to add remove regions or select multiple blocks with mouse holding **Ctrl key**.
     492. **Default keyboard shortcuts** for the *Ace editor* can be found on the [Ace GitHub Wiki](https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts) page or on the [Ace Editor Shortcuts](http://pcadvice.co.nf/blog/ace-editor-shortcuts/) page I created for the Wordpress version of this editor. Here I selected some shortcuts and *organized* them by *categories*.
     503. **The Search box** gives additional functions:
    5151  - Search All instances
    5252  - Use of Regular expressions
     
    5454  - Replace content
    5555  - Replace All 
    56 It shows with Ctrl+F and Ctrl+H combinations.
    57 4. The editor area can be resized using the bottom (southern) handle but doesn't remember its size after switching
    58 5. Emmet snippets are used to improve code typing. The documentation:
     56It shows with **Ctrl+F** and **Ctrl+H** combinations.
     574. The editor area can be **resized** using the *bottom (southern) handle* but it doesn't remember its size after switching.
     585. **Emmet snippets** are used to improve code typing. The *documentation*:
    5959  - [Basic Usage](http://docs.emmet.io/abbreviations/)
    6060  - [Full list](http://docs.emmet.io/cheat-sheet) of HTML and CSS snippets
    61 6. Full screen mode is not a default Ace Editor feature. I've taken the idea from a demo page in the [Ace build package](https://github.com/ajaxorg/ace-builds/tree/master/demo). The page is named scrollable-page.html. It adds a new custom shortcut to the editor which toggles the full/normal mode. So I set this function to the F11 key. The function extends the editor container to the Wordpess admin boundaries but doesn't hide top and left menus. It also works with if the windows size is changed or the left menu is collapsed. But to fill the available space the F11 key must be pressed two times when the editor is in the full screen mode. 
     616. **Full screen mode** is not a default Ace Editor feature. I've taken the idea from a **demo** page in the [Ace build package](https://github.com/ajaxorg/ace-builds/tree/master/demo). The page is named **scrollable-page.html**. 
     62It adds a new custom shortcut to the editor which toggles the **full/normal** mode. So I set this function to the **F11** key. 
     63The function extends the editor container to the Wordpess admin boundaries but doesn't hide **top and left menus**. It also works if the *window size* is changed or the left menu is *collapsed*. But to fill the available space in these cases the **F11** key must be pressed *two times* when the editor is in the *full screen mode*. 
    6264If you need to change this F11 key to other write me a request and I'll add an option to the options page.
    63 7. The top Word Wrap checkbox appears when the HTML tab is switched to. By default the editor has word wrapping enabled. You can toggle this option with the checkbox. But it only remembers its state in the current editor session.
    64 8. I've also added some custom shortcuts:
    65   - Ctrl+Enter adds a new line below the current one regardless of what is the current position the cursor on the current line
    66   - Ctrl+R switches to the Visual tab
     657. **The Word Wrap** checkbox appears when the **HTML tab** is switched to. By default the editor has word wrapping *enabled*. You can toggle this option with the checkbox. But it only remembers its state in the *current editor session*.
     668. I've also added some **custom shortcuts**:
     67  - **Ctrl+Enter** adds a new line below the current one regardless of what is the current position the cursor on the current line
     68  - **Ctrl+R** switches to the *Visual tab*
    6769
    6870
    6971= The Options Page =
    7072 
    71 1. Font size of the editor may be set in any CSS units (px, pt, em)
    72 2. Editor theme is chosen of default Ace Editor themes plus my custom theme Sublime which is the default theme for the plugin
    73 3. The options form is submitted using Ajax so the page doesn't reload, just wait until the save button is enabled and the success message appears at the top. Then reload the edit page to see the editor changes.
     731. **Font size** of the editor may be set in any CSS units *(px, pt, em)*.
     742. **Editor themes** dropdown shows default **Ace Editor** theme list plus my custom theme **Sublime** which is the default theme for the plugin.
     753. The options form is submitted using **Ajax** so the **page doesn't reload**, just wait until the save button is *enabled* and the *success message* appears at the top. Then reload the edit post page to see the editor changes.
    7476
    7577
    7678= Other Notes =
    7779
    78 1. Emmet plugin works on the specially built package for the Ace Editor. Its source is [here](https://github.com/cloud9ide/emmet-core). And I reduced its size by removing the Underscore.js part and CSS snippets. So the final package is [here](https://github.com/mortalis13/emmet-for-ace-css).
    79 2. When the HTML tab is loaded the source code is first represented as one long line. So I used the [JS Beautifier](https://github.com/beautify-web/js-beautify/tree/master/js) tool and exactly its beautify-html.js subscript to format that line so it has some readable structure. Additionally I applied my own function to have some blank lines before `<p>` and `<pre>` tags.
    80 3. I've put only the minified version of the Ace Editor scripts to the plugin package. To get the full uncompressed files go to its [GitHub repository](https://github.com/ajaxorg/ace-builds)
     801. **Emmet plugin** works on the *specially built package* for the **Ace Editor**. Its source is [here](https://github.com/cloud9ide/emmet-core). And I reduced its size by removing the *Underscore.js* part and *CSS snippets*. So the **final package** is [here](https://github.com/mortalis13/emmet-for-ace-css).
     812. When the **HTML tab** is loaded the *source code* is first represented as one long line. So I used the [JS Beautifier](https://github.com/beautify-web/js-beautify/tree/master/js) tool and exactly its **beautify-html.js** subscript to format that line so it has some readable structure. Additionally I applied my own function to have some blank lines before `<hx>`, `<p>` and `<pre>` tags.
     823. I've put only the *minified version* of the **Ace Editor** scripts to the plugin package. To get the full **uncompressed** files go to its [GitHub repository](https://github.com/ajaxorg/ace-builds).
    8183
    8284= Resource Links =
    8385
    84 1. [Ace Editor Main Site](http://ace.c9.io) and [GitHub repository](https://github.com/ajaxorg/ace)
    85 2. [Ace Builds GitHub repository](https://github.com/ajaxorg/ace-builds) with sources
    86 3. [Ace Editor Demo Pages](https://github.com/ajaxorg/ace-builds/tree/master/demo)
    87 4. [Ace Editor Keyboard Shortcuts](https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts) and [my edition](http://pcadvice.co.nf/blog/ace-editor-shortcuts)
    88 5. Emmet plugin [Main Site](http://emmet.io), [Documentation](http://docs.emmet.io), [List of Abbreviations](http://docs.emmet.io/cheat-sheet)
    89 6. [Special Emmet package](https://github.com/mortalis13/emmet-for-ace-css) for the Ace Editor
    90 7. [JS Beautifier](https://github.com/beautify-web/js-beautify/tree/master/js)
     861. [Ace Editor Main Site](http://ace.c9.io) and [GitHub repository](https://github.com/ajaxorg/ace).
     872. [Ace Builds GitHub repository](https://github.com/ajaxorg/ace-builds) with sources.
     883. [Ace Editor Demo Pages](https://github.com/ajaxorg/ace-builds/tree/master/demo).
     894. [Ace Editor Keyboard Shortcuts](https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts) and [my edition](http://pcadvice.co.nf/blog/ace-editor-shortcuts).
     905. Emmet plugin: [Main Site](http://emmet.io), [Documentation](http://docs.emmet.io), [List of Abbreviations](http://docs.emmet.io/cheat-sheet).
     916. [Special Emmet package](https://github.com/mortalis13/emmet-for-ace-css) for the Ace Editor.
     927. [JS Beautifier](https://github.com/beautify-web/js-beautify/tree/master/js).
    9193
    9294
    9395== Installation ==
    9496
    95 1. Upload `html-post-editor` folder to the `/wp-content/plugins/` directory
    96 2. Activate the plugin through the 'Plugins' menu in WordPress
     971. Upload `html-post-editor` folder to the `/wp-content/plugins/` directory.
     982. Activate the plugin through the 'Plugins' menu in WordPress.
     993. Open edit post page (add new or edit existing post).
     1004. Switch to the HTML tab and check the editor loads the HTML source of the post.
    97101
    98102
Note: See TracChangeset for help on using the changeset viewer.