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 a DocBlock. The editCmd string specifies a command, executed at the MATLAB® prompt, which launches a custom HTML editor. By default, a 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 MATLAB Preferences dialog box.

Use the "%<FileName>" token in the editCmd string to represent the full pathname to the document. Use the empty string '' as the editCmd to reset the DocBlock to its default editor for a particular document type.

docblock('setEditorDOC', editCmd) sets the Rich Text Format (RTF) editor invoked by a DocBlock. The editCmd string specifies a command, executed at the MATLAB prompt, which launches a custom RTF editor. By default, a 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 a DocBlock. The editCmd string specifies a command, executed at the MATLAB prompt, which launches a custom text editor. By default, a 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 a DocBlock.

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

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

Examples

Specify Microsoft Notepad as the DocBlock editor for RTF documents:

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

Reset the DocBlock to use its default editor for RTF documents:

docblock('setEditorRTF','')

Specify Mozilla Composer as the HTML editor for the DocBlock:

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

See Also

Was this topic helpful?