Extendible-BBCode-Parser icon indicating copy to clipboard operation
Extendible-BBCode-Parser copied to clipboard

Post image and text in seperate lines

Open MuditSharmaPega opened this issue 9 years ago • 1 comments

Hi, I want to post text and image(s) in same post. Even if I enter it in different lines, final markup gets them in same line. Can we fix this issue?

MuditSharmaPega avatar Aug 13 '15 10:08 MuditSharmaPega

Adding a paragraph tag or a br to the tags array in xbbcode.js would probably fix this. Example: (update around line 97):

    "p": {
        openTag: function(params,content) {
            return '<p>';
        },
        closeTag: function(params,content) {
            return '</p>';
        }
    },
    "br": {
        openTag: function(params,content) {
            return '<br>';
        },
        closeTag: function(params,content) {
            return '';
        }
    },

Then you could use code like:

[image]image url[/image][p]This is a test[/p][br][/br]one more test

And it should work.

patorjk avatar Aug 13 '15 14:08 patorjk