Basic text editing

User 2906089 Photo


Registered User
222 posts

How do you add multiple paragraphs to the canvas? I have a couple of cases.

Case 1. Say I've written a story in another application and I want to add it to my web page. For the sake of argument, the text is free from any markup, it's just plain text with carriage returns. If I copy my story and paste it into a <p> element in SD I will end up with the multiple paragraph separated by <br> elements. That's not right.

Case 2. I'm using SD to write a story. It's creative writing so I really don't know in advance how many paragraphs I need. So, I start by selecting the canvas (<body>) and I click on a paragraph element. I click ctrl-t to go straight in to the newly created <p> tag and write the first bit.

I now need to add another paragraph and I do what I did on the last time and repeat as often as necessary. Keep in mind that I also have to add classes or id's to each <p>. This seems really awkward to me.

One inconvenient method would be to create a <p> with the classes and id's and attributes using it as a styled paragraph. Select the duplicate icon on the <p> and create as many paragraph as I need, deleting or adding as I go. The other fix would be to copy the story into a html editor and add the required markup and paste the code into a html element. Again, long way around.

My question is what am I missing? How do I quickly markup a document in SD?

Thanks in advance!


Learn something, Share something.
User 379556 Photo


Registered User
1,535 posts

I find it helpful to remember the following -

1. The Styles > Design > Typography section of containers allows one to set up much of the styling that one wants in the paragraphs* that are, or will be, in that container. The styling doesn't have to be individually on each paragraph.

2. If one has a font that one regularly uses, one can make it the default font for paragraphs by using the 'Apply Styles' 'To all elements of this type'.

3. Using an external plain text editor (such as Notepad++), one can quickly copy a whole paragraph with a triple mouse-click and Ctrl+c.

4. One doesn't have to go through a routine of copy-paste for each paragraph individually. One can copy all the paragraphs first, and afterwards paste them. To do that one can set Windows to save multiple clipboard items **, but the power-paste facility of programs like ClipMate is far quicker.

Frank

* Or indeed HTML elements - useful when one wants to include special characters or links to named iframes.
** Windows key + v allows one to turn that facility on and to paste from it.
User 2906089 Photo


Registered User
222 posts

Thanks for taking the time to respond Frank.

I'm pretty good at knowing CSS, that's not the problem. My question is really about the work flow. I did a larger test that is more like the project I'm working on. Very time consuming getting the text into SD using the methods I currently know.

I opened the doc that I have and cut and pasted the text into the CC html editor and placed the proper markup on everything. I then placed it into SD using the html element. I can mark up the page faster in a text editor than I can adding a lot of paragraphs. Maybe a keyboard short cut to create the start and ending tags of a paragraph would help. I'm really looking forward to having a code editor in SD that was teased in the recent newsletter!

Now, Clipmate looks really cool. Dated, but if it still works in windows 10 it will be the next tool I'll have to get. Thank you for that tip.

This site has 200 pages with 1-4 images and 1 - 15 paragraphs per page so there is little time to waste. Plus I'm guessing that the text that I'm going to be getting is not clean so I will have to do a little updates as we go.

If anyone else is seeing my problem could help it would really be appreciated.
Learn something, Share something.
User 2906089 Photo


Registered User
222 posts

Frank,

ClipMate is really brilliant. Used it for 10 minutes and decided to pay-up! Solved a couple of other problems that are now a couple keystrokes.
Learn something, Share something.
User 379556 Photo


Registered User
1,535 posts

With 15 or so paragraphs in a page, in Notepad++ I would enter only the <p> at the start and the </p> at the end. All the rest could be inserted at one go by doing a 'Replace All' of the carriage returns and line feeds (\r\n) with </p>\r\n<p>.</p> (or something like that, depending how things are spaced)'

With 200 or so pages, I would not do it as in the paragraph above, but use a program like TextCrawler to do it for all the pages at one go.

Frank
User 379556 Photo


Registered User
1,535 posts

An extra </p> somehow got inserted immediately before the bracketed words in the first paragraph of my last post. Please put it down to old age and decrepitude.

Frank
User 2906089 Photo


Registered User
222 posts

ClipMate is a gift that keeps on giving! I bought a new laptop and didn't notice it lacked a prtscreen key. ClipMate has multiple ways to capture the screen views. I didn't even know it was an option until I started looking for solutions. It's better than the snipping tool that comes with Windows 11 in my opinion.

Thank you again for sharing and for your very thoughtful posts over the years.
Learn something, Share something.

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.