Is there a way to rename the BODY tag?
I actually need it exported as a div tag instead. Is there some way to automate this?
Cheers
Cheers
I think the best way is to create a div inside the body and pop all the contents into it. If you had given the body some styling, give the same styling to the new div. After that, select the new div and make a component of it and save it in the component library.
Then you can open a new (or the other) project and add the component onto a page. If the new/other project already has some content, you may have some sorting of class names to do if you are using class names that also have been used in what you import.
Then you can open a new (or the other) project and add the component onto a page. If the new/other project already has some content, you may have some sorting of class names to do if you are using class names that also have been used in what you import.
Ha en riktig god dag!
Inger, Norway
My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com
Inger, Norway
My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com
Simon Keating wrote:
I actually need it exported as a div tag instead (of a body tag). Is there some way to automate this? ...
I actually need it exported as a div tag instead (of a body tag). Is there some way to automate this? ...
The mention of automating, and the post elsewhere about "exporting" using Right-Click Copy Element HTML, suggest that you may want to do this multiple times.
In those circumstances I would automate it in the Clipboard, for which I would use TextCrawler or similar program set up as follows:
Input from Clipboard
Output to Clipboard
Regular Expression
Reg Ex. <body>(.*?)</body>
Replace <div>$1</div>
Clicking Replace then does the job in the Clipboard.
Frank
Yes, I am making edits and going back and forth with the html and css to my js application to make sure things are working correctly, so every time I move the code it needs to be as seamless as possible. I dont want to have to make many repetitive edits each time. Ideally, none.
If the Body tag could just be renamed to div somehow, that would be perfect, but it doesn't look like this is possible.
The solution to have an extra div within the body tag in theory should work but there are additional issues caused by having a body tag (at all) in my app.
If the Body tag could just be renamed to div somehow, that would be perfect, but it doesn't look like this is possible.
The solution to have an extra div within the body tag in theory should work but there are additional issues caused by having a body tag (at all) in my app.
One could create the extra wrapping div as suggested by Inger and do the Right-Click Copy Element HTML on the div rather than on the body.
I find it useful to set up one's own template for new projects and set it as the default for new projects: mine is simple an empty div in the body. When the project is open I duplicate that page, and the content for each page goes into that ready-made div.
Frank
I find it useful to set up one's own template for new projects and set it as the default for new projects: mine is simple an empty div in the body. When the project is open I duplicate that page, and the content for each page goes into that ready-made div.
Frank
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.