docblock - Get or set editor invoked by Simulink® DocBlock

Syntax

docblock('setEditorHTML', editCmd)
docblock('setEditorDOC', editCmd)
docblock('setEditorTXT', editCmd)
editCmd = docblock('getEditorHTML')
editCmd = docblock('getEditorDOC')
editCmd = docblock('getEditorTXT')

Description

docblock('setEditorHTML', editCmd) sets the HTML editor invoked by the DocBlock. The editCmd string specifies a command, executed at the MATLAB® prompt, which launches a custom HTML editor. By default, the DocBlock invokes Microsoft® Word (if available) as the HTML editor; otherwise, it opens HTML documents using the editor you specified on the Editor/Debugger Preferences pane of the Preferences dialog box.

docblock('setEditorDOC', editCmd) sets the Rich Text Format (RTF) editor invoked by the DocBlock. The editCmd string specifies a command, executed at the MATLAB prompt, which launches a custom RTF editor. By default, the DocBlock invokes Microsoft Word (if available) as the RTF editor; otherwise, it opens RTF documents using the editor you specified on the Editor/Debugger Preferences pane of the Preferences dialog box.

docblock('setEditorTXT', editCmd) sets the text editor invoked by the DocBlock. The editCmd string specifies a command, executed at the MATLAB prompt, which launches a custom text editor. By default, the DocBlock invokes the editor you specified on the Editor/Debugger Preferences pane of the Preferences dialog box.

editCmd = docblock('getEditorHTML') returns the value of the current command used to invoke an HTML editor when double-clicking the DocBlock.

editCmd = docblock('getEditorDOC') returns the value of the current command used to invoke a RTF editor when double-clicking the DocBlock.

editCmd = docblock('getEditorTXT') returns the value of the current command used to invoke a text editor when double-clicking the DocBlock.

Examples

This command specifies Microsoft Notepad as the DocBlock editor for RTF documents.

docblock('setEditorRTF','system(''notepad "%<FileName>"'');')

This command resets the DocBlock to use its default editor for RTF documents.

docblock('setEditorRTF','')

This command specifies Mozilla Composer as the HTML editor for the DocBlock.

docblock('setEditorHTML','system(''/usr/local/bin/mozilla ...
  -edit "%<FileName>" &'');')
  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS