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

Wrap Highlighted Text with Tags

New Here ,
Feb 27, 2007 Feb 27, 2007
I am trying to write a function to take the highlighted text in design view and get its parent tag, then wrap that whole section with another tag.

using the function dw.getDocumentDOM().source.selectParentTag() to get the selected text's parent does not seem to work. i get the following error: ".. The function balanceTextView() is currently unavailable"

any way to get the same functionality as dw.getDocumentDOM().source.wrapSelection() but to bump it up to the text's parent node then wrap tags around it?
TOPICS
Extensions
352
Translate
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 27, 2007 Feb 27, 2007
LATEST
i seem to have figured it out...

dw.getDocumentDOM().selectParent();
dw.getDocumentDOM().source.wrapSelection();
Translate
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