• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Default text in text panel..

Scheduled Pinned Locked Moved General Discussion
6 Posts 3 Posters 497 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sharonyue
    wrote on last edited by
    #1

    Hello guys, it is possible to add default in the text panel? Just like "Enter your topic title here"

    捕获.JPG

    1 Reply Last reply
    0
  • S Offline
    S Offline
    sharonyue
    wrote on last edited by
    #2

    I tried to add placeholder="I want to add somethin here" by a very stupid method, but where can I find the source file?...

    捕获.JPG

    1 Reply Last reply
    0
  • MJM Offline
    MJM Offline
    MJ
    wrote on last edited by MJ
    #3

    maybe the language file NodeBB/public/language/en-US/ or NodeBB/public/language/en-GB/

    here it is NodeBB/public/language/en-US/topic.json click

    the line is "composer.title_placeholder": "Enter your topic title here...", if you change it and restart nodebb it would be working 🙂

    PitaJP 1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    replied to MJ on last edited by
    #4

    @MJ I don't think that's the title placeholder, he wants to add a placeholder to the textarea. You want to override the highlighted line in this file:

    https://github.com/NodeBB/nodebb-plugin-composer-default/blob/master/static/templates/composer.tpl#L120

    And add a placeholder attribute with whatever you want.

    1 Reply Last reply
    0
  • S Offline
    S Offline
    sharonyue
    wrote on last edited by sharonyue
    #5

    Thanks, it works. Is it possible to add a line break in the placeholder? <br/> does not work

    1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    wrote on last edited by
    #6

    https://stackoverflow.com/a/26106287/847382

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development