-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need a setting to remove the display of line breaks on the boundaries of the bbcode and its content in HTML #937
Comments
Do you want to add a line break after the opening tag and before the closing tag? If so, there is the breakStart and breakEnd BBCode options which do that. They would need to be added to each individual BBCode. For example: https://jsbin.com/saqagiyife/edit?html,js,output (only the There is also a breakStartBlock and breakEndBlock options which will do the same but for all block BBCodes. Unfortunately, there isn't an option to do it for all BBCodes so inline BBCodes will still need to have |
I raised a situation where messages with bbcodes were created not by the editor, but manually. In this case, such newlines may occur. |
Are you wanting to ignore the first/last line of BBCodes like Or is it that all first/last newlines at the start/end of BBCodes should be ignored? So a BBCode like:
would be the equivalent of:
|
Yes. My code removes 1 empty line at the beginning and 1 empty line at the end if they are present in the content. For all bbcodes. |
Is there a reason for not wanting the lines added to the output when they're supported in the input? If they're not added to the output, what should happen when editing previously output BBCode or if toggling between WYSIWYG and BBCode? As that will cause lines to be removed. For example, with the BBCode:
The first time it's edited there will be one line above but if the ignored lines aren't added to the output, the resulting BBCode will be:
Then, the next time it is edited/toggled between source and WYSIWYG, the line above will be stripped. |
Yes, but do leading and trailing lines within bbcodes make sense? |
Extra blank lines in HTML if bbcode is on a separate line from the content.
Example
result
or
result
Maybe I searched badly, but I did not find a method to solve the problem.
Made a crutch forkbb/forkbb@2e4941b
P.S.
After that, the text with bbcodes changes of course
But it's better than empty lines :|
The text was updated successfully, but these errors were encountered: