Maintaining format when copying and pasting

This is really two questions.
First, I am trying to copy a short passage from a screenplay. The screenplay passage can be in Word or HTML, yet when imported, the format is changed somewhat. How can I preserve the exact format?

Secondly, is there a way to offset a passage in a chapter? I would like for the screenplay passage to be indented (a different margin) from the main text.

I have been looking at the user guide and video tutorials but have not found the answers to these questions. I could have easily overlooked them though.
Thanks for any help.

Hi @Tommy_Jenkins ,

Great questions and with potentially easy to use solutions!

First, I suspect the the screenplay passage has some extra (styles) formatting when in Word that is not carried over into Pressbooks. Have you tried importing the word document (with just the excerpt you need) as a Pressbook Chapter? If the formatting persists then you’ll be able to copy and paste from that Chapter to the spot in another chapter where you need it.

Secondly, I would use the blockquote (found on the toolbar) for the screenplay passage. It will have a different indentation than the rest of the main text and depending on your (custom) styles, it can have a different color too. Here’s what I have in my custom styles for blockquote that gives it left-margin indent and navy color text:

// Blockquote
.blockquote, .front-matter blockquote, .part blockquote, .chapter blockquote, .back-matter blockquote, body#tinymce.wp-editor blockquote {
  font-size: 1em;
  line-height: 1.5em;
  color: navy;
  margin-left: 1em;

Also, I’ve got a few chapters in one book where there is a script - conversation between characters. So, I created an extreme hanging indent style so that the first line is at the left margin and successive lines in the same paragraph are indented. Note: Hanging indent is available from the Formats on the toolbar.

To use the style, you’ll have to pop over to the text editor and add

[script lines]
around the script lines.

// Scriptstyle
.script p, .front-matter script p, .part script p, .chapter script p, .back-matter script p, body#tinymce.wp-editor script p {
  padding-left: 62px;
  text-indent: -62px !important;

With both of those style additions, you should also be able to see the style in effect in the editor when you’re back in Visual mode.

If you are uncomfortable adding custom CSS, you can use the Formats and Textboxes to apply special formatting to the screenplay passage and offset it in a textbox or blockquote.

Here’s to your good success,
Cheers - Shar :star:

1 Like

Thank you so much for this answer.
I think I figured out a way to do it by taking a screenshot and then uploading the image via media upload.