Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Custom Tag Feature

New Here ,
Feb 20, 2007 Feb 20, 2007

Copy link to clipboard

Copied

All:

I have ran into an issue that seems to need some extensibility.

I have created a custom tag that my users are allowed to enter when editing HTML documents. I have added my custom tag to the tag library and also added it to the validator so there would be no issues when validating. (it does not matter that it is not valid HTML)

So my problem is this:
When users enter the custom tag into their document i would like the inner text to change color when viewing in design view. (for example: the way an H1 tag would render)

some notes:
- Users are only editing independent HTML files and the files are in various directories and are not associated with any web sites. We use DW as a stand alone HTML editor.
- I do not want any user interaction. Meaning i do not want the user to have to enter any CSS info or attach/create any Design-Time CSS.

Some thoughts on how I would like to accomplish this:
- Possibly inject some CSS code when the file is being opened. So the CSS is already in place when the file is open in DW. I am not sure how or where to put any code to intercept the opening of the file.
- Attach some kind of default CSS or Design-Time CSS to the DW application, so everytime a file is opened in DW this CSS is somehow associated with it.

Anyone have any ideas or thoughts?

Thanks,
kscap
TOPICS
Extensions

Views

648
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 21, 2007 Feb 21, 2007

Copy link to clipboard

Copied

You can do this with a translator, see the extending dreamweaver docs for
details.

--
Kevin Marshall
WebXeL.com Ltd
http://www.webxel.com

ASP.NET Dreamweaver Extensions
http://www.webxel-dw.co.uk
"kscap" <webforumsuser@macromedia.com> wrote in message
news:erfi1t$43f$1@forums.macromedia.com...
> All:
>
> I have ran into an issue that seems to need some extensibility.
>
> I have created a custom tag that my users are allowed to enter when
> editing
> HTML documents. I have added my custom tag to the tag library and also
> added it
> to the validator so there would be no issues when validating. (it does not
> matter that it is not valid HTML)
>
> So my problem is this:
> When users enter the custom tag into their document i would like the inner
> text to change color when viewing in design view. (for example: the way an
> H1
> tag would render)
>
> some notes:
> - Users are only editing independent HTML files and the files are in
> various
> directories and are not associated with any web sites. We use DW as a
> stand
> alone HTML editor.
> - I do not want any user interaction. Meaning i do not want the user to
> have
> to enter any CSS info or attach/create any Design-Time CSS.
>
> Some thoughts on how I would like to accomplish this:
> - Possibly inject some CSS code when the file is being opened. So the CSS
> is
> already in place when the file is open in DW. I am not sure how or where
> to put
> any code to intercept the opening of the file.
> - Attach some kind of default CSS or Design-Time CSS to the DW
> application, so
> everytime a file is opened in DW this CSS is somehow associated with it.
>
> Anyone have any ideas or thoughts?
>
> Thanks,
> kscap
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 21, 2007 Feb 21, 2007

Copy link to clipboard

Copied

quote:

Originally posted by: Newsgroup User
You can do this with a translator, see the extending dreamweaver docs for
details.

--
Kevin Marshall
WebXeL.com Ltd
http://www.webxel.com

ASP.NET Dreamweaver Extensions
http://www.webxel-dw.co.uk
"kscap" <webforumsuser@macromedia.com> wrote in message
news:erfi1t$43f$1@forums.macromedia.com...
> All:
>
> I have ran into an issue that seems to need some extensibility.
>
> I have created a custom tag that my users are allowed to enter when
> editing
> HTML documents. I have added my custom tag to the tag library and also
> added it
> to the validator so there would be no issues when validating. (it does not
> matter that it is not valid HTML)
>
> So my problem is this:
> When users enter the custom tag into their document i would like the inner
> text to change color when viewing in design view. (for example: the way an
> H1
> tag would render)
>
> some notes:
> - Users are only editing independent HTML files and the files are in
> various
> directories and are not associated with any web sites. We use DW as a
> stand
> alone HTML editor.
> - I do not want any user interaction. Meaning i do not want the user to
> have
> to enter any CSS info or attach/create any Design-Time CSS.
>
> Some thoughts on how I would like to accomplish this:
> - Possibly inject some CSS code when the file is being opened. So the CSS
> is
> already in place when the file is open in DW. I am not sure how or where
> to put
> any code to intercept the opening of the file.
> - Attach some kind of default CSS or Design-Time CSS to the DW
> application, so
> everytime a file is opened in DW this CSS is somehow associated with it.
>
> Anyone have any ideas or thoughts?
>
> Thanks,
> kscap
>





thanks. i will take a look in the docs, in the meantime is this something that will transparent to the user? I can't have the user add any info or attributes to the tag itself.

kscap

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 21, 2007 Feb 21, 2007

Copy link to clipboard

Copied

Its totaly transparent, you can invent a tag called Widget that is placed in
the page as:

<widget>content here</widget>

then write a translator that will force design view render it as if you had
typed the following H1 tag:

<h1 color="red">content here</h1>

but all the time the real content in the file is still:

<widget>content here</widget>

--
Kevin Marshall
WebXeL.com Ltd
http://www.webxel.com

ASP.NET Dreamweaver Extensions
http://www.webxel-dw.co.uk>

> thanks. i will take a look in the docs, in the meantime is this something
> that
> will transparent to the user? I can't have the user add any info or
> attributes
> to the tag itself.
>
> kscap
>
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 21, 2007 Feb 21, 2007

Copy link to clipboard

Copied

LATEST
quote:

Originally posted by: Newsgroup User
Its totaly transparent, you can invent a tag called Widget that is placed in
the page as:

<widget>content here</widget>

then write a translator that will force design view render it as if you had
typed the following H1 tag:

<h1 color="red">content here</h1>

but all the time the real content in the file is still:

<widget>content here</widget>

--
Kevin Marshall
WebXeL.com Ltd
http://www.webxel.com

ASP.NET Dreamweaver Extensions
http://www.webxel-dw.co.uk>

> thanks. i will take a look in the docs, in the meantime is this something
> that
> will transparent to the user? I can't have the user add any info or
> attributes
> to the tag itself.
>
> kscap
>
>





Cool man thanks for the heads up. Following the example in the docs i got this to work. However i did notice that if my custom tags are already in the document when it is opened in DW, the translator does not seem to work. However, it does seem to execute cause i put a simple alert in and when the doc opened, my alert did kick off. it doesn't take affect until i actually touch the document.

another thing i noticed is that once i do a "Apply source formatting" the translator works, but my original tag is stripped from code view, however the translation seems to still be working correctly but now my tag is gone from code view....

any ideas?

thanks
kscap

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines