• Resolved Yggy

    (@yggydrasil)


    Is it possible to add a break in an entry of written headline text, so you can influence where a linebreak is going to be?

    Want to use it to seperate title and subtitle over 2 written lines.
    Currently I get:

    Title This is
    the subtitle

    While I want:

    Title
    This is the subtitle

    Tried following:
    Title<br>This is the subtitle tag is removed
    Title\nThis is the subtitle \n is shown as regular text
    <span style="display: block;">Title</span><span style="display: block;">This is the subtitle</span> tags are removed

    If possible, please show me how.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author apollo13themes

    (@apollo13themes)

    Hello ??

    In your place, I would use a separate title.
    As you see, breaking the line is not possible in any way.

    With kind regards.
    Air.

    Thread Starter Yggy

    (@yggydrasil)

    I thought of that too at the time of the original post, but then both would write simultaneously. While it would be preferable when the subtitle begins when title is finished. And there seems no option in the widget GUI to serialize the 2 titles, or delay the sub title long enough to have the title finished being written.

    While typing this reply, I found the readme of the original js library used.

    Normally it should be possible to break the lines using P tags, but apparently that gets filtered out by your widget, Elementor or WordPress.

    It also shows a way to delay text, by adding ^1000 in the text string to delay 1000 ms. This does seem to work in the widget.

    There are also other options not present in the widget. Will play around with those to see what works with the widget for my scenario.

    • This reply was modified 2 years, 3 months ago by Yggy.
    Thread Starter Yggy

    (@yggydrasil)

    Since additional code was needed for the extra options anyway, I went for the simplest way. Just adding the br tag, or actually changing the string, by right after the Writing effect headline widget adding the HTML widget with following code:

    <script>
    document.getElementsByClassName("written-lines")[0].textContent = "Title<br>This is the subtitle";
    </script>

    It doesn’t show in the back end, but in the front end it works.

    Plugin Author apollo13themes

    (@apollo13themes)

    Hello ??

    You have solved it as a programmer – great work! ??

    With kind regards.
    Air.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Writing effect headline: adding break in text’ is closed to new replies.