B!P editor thread (HTML, CSS stuff) For more accurate editing (for preppers mostly)
2 replies to this topic
Started by
WhiteForte
, Jan 31 2017 05:00 AM ·
I figured I'd make a thread like this for preppers like me who like to be as faithful as possible when prepping. Since the editor in b!p is kinda... odd I use some tricks to make the posts as similar as possible to the source. Everyone is welcome to post more and I'll add it to the main post.
Note: remember to always paste the text of the entry in text mode rather than visual mode, it'll make work easier.
Accurate spacing: Since the editor deletes consecutives line breaks and spaces, here are two pieces of code I use for them to show correctly:
Line breaks (enters):
Spoiler
In text mode look consecutives line breaks you want to put.
Use the <code></code> for each line that doesn't have text.
This will show as four line breaks and they won't be deleted by the editor.
EXTRA STEP: sometimes adding 40-50 of these <code> tags can be time consuming, plus my pinky gets tired with all the copy-pasting, so we'll ask the help of a regular expression (don't worry, you don't need to know anything about them). For this, an advanced text editor like Notepad++ or Sublime Text is needed (I prefer the latter). For this example I'll use Sublime Text as the reference, but it should work for any editor that supports regular expressions.
First, in text mode cut (ctrl+x) all the content of the post and paste it in a new file.
Go to "Find->Replace..." in the menu bar.
Two text fields will appear on the bottom. In the one that says "Find what" go to the left and look for an icon that looks like this tut1.png449bytes0 downloads. Press it to enable regular expressions.
Now paste this in the "Find what" field:^ *\n
In the "Replace with" field paste this:<code></code>\n
Now hit the "Replace all button".
Copy everything and paste back into the editor. Now we have all the line breaks in just a couple of seconds!
  method (line breaks):
Spoiler
Another way for line breaks is to use If there's only two lines they'll keep, but if there's three or more it needs to go in between. For example:
漢字これが漢字ですよーっっ
また漢字か( ;´Д`)
Whereas, if it were just
漢字これが漢字ですよーっっ
また漢字か( ;´Д`)
the isn't needed. If you have an even number of spaces, it goes like this:
Spoiler
漢字これが漢字ですよーっっ
また漢字か( ;´Д`)
Multiple spaces:
Spoiler
Always in text mode, go to the part where the multiple spaces are.
Surround the closest word to the spaces with thes code shown bellow (the text has to go before the closing tag):
Another way for line breaks is to use
If there's only two lines they'll keep, but if there's three or more it needs to go in between. For example:
漢字これが漢字ですよーっっ
また漢字か( ;´Д`)
Whereas, if it were just
漢字これが漢字ですよーっっ
また漢字か( ;´Д`)
the isn't needed. If you have an even number of spaces, it goes like this: