Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Syntax Box on Property and Method Pages

6 views
Skip to first unread message

Joe Medley

unread,
Apr 21, 2015, 11:50:13 AM4/21/15
to mozilla...@lists.mozilla.org
The "Property pages" section of How to write has this: "Use the syntaxbox class for it and italics for part to be replaced by the actual variable name." The "Method pages" section says nothing about syntax box.

Is this the preferred method of marking syntax?

If so, why is it not listed in the editor's syntax highlighter list?

Jean-Yves Perrier

unread,
Apr 21, 2015, 11:57:58 AM4/21/15
to dev...@lists.mozilla.org
Hi!

On 17/04/2015 21:33, Joe Medley wrote:
> Is this the preferred method of marking syntax?
Yes, it is.
>
> If so, why is it not listed in the editor's syntax highlighter list?
Oversight :-( It is one of the rare case I need to go in source mode
nowadays. (I usually copy/paste a syntax from a correct page, then edit
it; you get the class for free)

The bug is likely open, we should get this added to the devs inbox.
Anybody can help find it?

Hope it helps.

--
Jean-Yves Perrier
Senior Technical Writer / Mozilla Developer Network

Eric Shepherd

unread,
Apr 21, 2015, 10:52:58 PM4/21/15
to Joe Medley, mozilla...@lists.mozilla.org
Joe Medley wrote:
> The "Property pages" section of How to write has this: "Use the syntaxbox class for it and italics for part to be replaced by the actual variable name." The "Method pages" section says nothing about syntax box.
>
> Is this the preferred method of marking syntax?
>
> If so, why is it not listed in the editor's syntax highlighter list?
Yeah, the toolbar badly needs work; this is something I'm actually going
to be trying to do myself over the next few weeks, as it's not hard to
do -- just needs someone who can spare a little time to do it.

--

Eric Shepherd
Senior Technical Writer
Mozilla <https://www.mozilla.org/>
Blog: http://www.bitstampede.com/
Twitter: http://twitter.com/sheppy

Chris Mills

unread,
Apr 22, 2015, 1:27:34 AM4/22/15
to Eric Shepherd, Joe Medley, mozilla...@lists.mozilla.org

> On 22 Apr 2015, at 03:52, Eric Shepherd <eshe...@mozilla.com> wrote:
>
> Joe Medley wrote:
>> The "Property pages" section of How to write has this: "Use the syntaxbox class for it and italics for part to be replaced by the actual variable name." The "Method pages" section says nothing about syntax box.
>>
>> Is this the preferred method of marking syntax?
>>
>> If so, why is it not listed in the editor's syntax highlighter list?
> Yeah, the toolbar badly needs work; this is something I'm actually going to be trying to do myself over the next few weeks, as it's not hard to do -- just needs someone who can spare a little time to do it.

Another thing I’d like to see is a button for adding code block line highlights (which is of course already available in the raw syntax, but pretty inconvenient to use). I am pretty sure a bug was filed for this, but I can’t find it now.

Jean-Yves Perrier

unread,
Apr 22, 2015, 2:00:42 AM4/22/15
to Chris Mills, Eric Shepherd, Joe Medley, mozilla...@lists.mozilla.org
Oh yes good catch, this is another case where we need to go to the source.

Sebastian Zartner

unread,
Apr 22, 2015, 5:34:49 AM4/22/15
to Jean-Yves Perrier, Joe Medley, mozilla...@lists.mozilla.org, Chris Mills, Eric Shepherd
On 22 April 2015 at 07:27, Chris Mills <cmi...@mozilla.com> wrote:
>
> Another thing I’d like to see is a button for adding code block line highlights (which is of course already available in the
> raw syntax, but pretty inconvenient to use). I am pretty sure a bug was filed for this, but I can’t find it now.

https://bugzil.la/1083999

On 21 April 2015 at 17:57, Jean-Yves Perrier <jype...@gmail.com> wrote:
>>
>> If so, why is it not listed in the editor's syntax highlighter list?
> Oversight :-( It is one of the rare case I need to go in source mode
> nowadays. (I usually copy/paste a syntax from a correct page, then edit
> it; you get the class for free)
>
> The bug is likely open, we should get this added to the devs inbox.
> Anybody can help find it?

At least I could not find it using only 'syntax' as keyword.[1] I
guess it should be part of https://bugzil.la/957649 or
https://bugzil.la/1032827.

Sebastian

[1] https://bugzilla.mozilla.org/buglist.cgi?short_desc=syntax&resolution=---&query_format=advanced&short_desc_type=allwordssubstr&product=Mozilla%20Developer%20Network

Joe Medley

unread,
Apr 22, 2015, 11:30:07 AM4/22/15
to Chris Mills, mozilla...@lists.mozilla.org, Eric Shepherd
On Tue, Apr 21, 2015 at 10:27 PM, Chris Mills <cmi...@mozilla.com> wrote:

> Another thing I’d like to see is a button for adding code block line
> highlights


I stumbled across one that was broken the other day. Here are a few
observations:

- The highlight applied to lines that weren't in the example, but the
page didn't have a scripting error banner. So the highlight instruction
said something like highlight lines 11 and 12, but the example only had 8
lines.
- I wondered why the highlight mechanism wasn't markup based.


Joe Medley | Technical Writer | jme...@google.com | 816-678-7195

Joe Medley

unread,
Apr 22, 2015, 11:30:18 AM4/22/15
to Chris Mills, mozilla...@lists.mozilla.org, Eric Shepherd
On Wed, Apr 22, 2015 at 8:23 AM, Joe Medley <jme...@google.com> wrote:

> I stumbled across one


A page that implements the existing version of the feature, that is.

Joe Medley

unread,
Apr 22, 2015, 6:45:53 PM4/22/15
to Chris Mills, mozilla...@lists.mozilla.org, Eric Shepherd
Eric just pointed out to me that there's a syntax box item in the style
drop down list. I may have know that at one time. Unlike other features of
the editor, it doesn't show its formatting until the page is saved. That
would've lead me and likely many others to think it's not what's used for
syntax statements. I think I've seen a lot of pages that use <pre> instead
of <div class="syntaxbox">.

Joe Medley | Technical Writer | jme...@google.com | 816-678-7195

0 new messages