Create the HTML content for the help dialog  or for external browser

    :param message: An optional message object to display in the dialog.
    :type message: Message.Message

    :return: the help HTML content
    :rtype: str
348032
def get_help_html(message=None):
    

    html = html_help_header()

    if message is None:
        message = dock_help()

    html += message.to_html()
    html += html_footer()
    return html
674067
def to_html(self):
        
        if self.text is None:
            return

        level = self.level
        if level > 6:
            level = 6
        return '<h%s%s><a id="%s"></a>%s%s</h%s>' % (
            level,
            self.html_attributes(),
            self.element_id,
            self.html_icon(),
            self.text.to_html(),
            level)
753508
def html(self):
        
        try:
            from lxml import html
            return html.fromstring(self.content)
        except ImportError as ie:
            raise DependencyException(ie)
597088
def render_text(self, request, instance, context):
        
        render_template = self.get_render_template(request, instance, email_format='text')
        if not render_template:
            # If there is no TEXT variation, create it by removing the HTML tags.
            base_url = request.build_absolute_uri('/')
            html = self.render_html(request, instance, context)
            return html_to_text(html, base_url)

        instance_context = self.get_context(request, instance, email_format='text', parent_context=context)
        instance_context['email_format'] = 'text'

        text = self.render_to_string(request, render_template, instance_context)
        text = text + ""  # Avoid being a safestring
        if self.render_replace_context_fields:
            text = replace_fields(text, instance_context, autoescape=False)
        return text
1118934
def help(self):
        
        message = m.Message()
        message.add(m.Brand())
        message.add(self.help_heading())
        message.add(self.help_content())
        return message
1085541
protected String createMessageHtml(CmsBroadcastMessage message) {

        StringBuffer result = new StringBuffer();
        result.append("<p class=\"").append(I_CmsLayoutBundle.INSTANCE.notificationCss().messageHead()).append("\">");
        if (!CmsStringUtil.isEmptyOrWhitespaceOnly(message.getIcon())) {
            result.append("<img src=\"").append(message.getIcon()).append("\">");
        }
        result.append("<em>" + message.getTime() + "</em><br/>");
        result.append(Messages.get().key(Messages.GUI_BROADCAST_SEND_BY_1, message.getUser()));
        result.append("</p>").append("<p>\n");
        result.append(
            message.getMessage().replaceAll("\\n", "<br/>").replaceAll("<div>", "<br>").replaceAll("</div>", ""));

        result.append("\n</p>");
        return result.toString();
    }
1149007
def html_content(self):
        
        context = self.acquire_context()
        try:
            return render_placeholder(self.content_placeholder, context)
        except (AttributeError, KeyError):
            # Should happen when ``context`` and ``request``
            # have not been found in the stack.
            pass
        return self.content
1260390
private void htmlMessage(DetailHtmlBuilder htmlBuilder, String message) throws IOException {
		htmlBuilder.beginRow()
			.labelCell("Message").valueCell(" colspan=\"3\"", message)
			.endRow();
	}
1032942
def htmlhelp():
    """"""
    build('htmlhelp', 'Now you can run HTML Help Workshop with the .hhp '
                      'project file in {}.')
    print('Running HTML Help Workshop...')
    builddir = os.path.join(BUILDDIR, 'htmlhelp')
    rc = subprocess.call(['hhc', os.path.join(builddir, 'rinohtype.hhp')])
    if rc != 1:
        print('Error running HTML Help Workshop. Aborting.')
        sys.exit(1)
    print('HTML Help Workshop finished; the CHM file is in {}.'
          .format(builddir))
1157557
def add_message(self, request, level, message_template,
                    message_context=None, extra_tags=''):
        
        if 'django.contrib.messages' in settings.INSTALLED_APPS:
            try:
                if message_context is None:
                    message_context = {}
                message = render_to_string(message_template,
                                           message_context).strip()
                if message:
                    messages.add_message(request, level, message,
                                         extra_tags=extra_tags)
            except TemplateDoesNotExist:
                pass
594686
def osm_downloader_help():
    

    message = m.Message()
    message.add(m.Brand())
    message.add(heading())
    message.add(content())
    return message
440213
def Message(message, title='FontParts', informativeText=""):
    
    return dispatcher["Message"](message=message, title=title,
                                 informativeText=informativeText)
618890
def multi_buffer_help():
    
    message = m.Message()
    message.add(m.Brand())
    message.add(heading())
    message.add(content())
    return message
624866
function createHtmlDocument (message) {
  var body = escapeHtml(message)
    .replace(NEWLINE_REGEXP, '<br>')
    .replace(DOUBLE_SPACE_REGEXP, ' &nbsp;')

  return '<!DOCTYPE html>\n' +
    '<html lang="en">\n' +
    '<head>\n' +
    '<meta charset="utf-8">\n' +
    '<title>Error</title>\n' +
    '</head>\n' +
    '<body>\n' +
    '<pre>' + body + '</pre>\n' +
    '</body>\n' +
    '</html>\n'
}
614395
def add_validation_message(self, message):
        
        if message.file not in self.messages:
            self.messages[message.file] = []

        self.messages[message.file].append(message)
1158327
def render_message(self):
        
        message = None
        if self.title:
            message = '标题：{0}'.format(self.title)
        if self.message_time:
            message = '{0}\n时间：{1}'.format(message, self.time)
        if message:
            message = '{0}\n内容：{1}'.format(message, self.content)
        else:
            message = self.content
        return message
1255575
def on_message(self, message):
        

        if 'content' in message['d']:
            metadata = self._parse_metadata(message)
            message = Message(text=message['d']['content'],
                              metadata=metadata).__dict__
            logger.debug(message)
            self.baseplate.tell(message)