(meta has many many themes, but luckily thanks to @kris.kotlarek we have an add to all themes button… got to sort out progress there, cause it takes a while to do its magic)
I never got into BB script tags, nor have I hand-coded FontAwesome, so the practice of using an empty tag pair has always seemed strange to me. Is that by popular convention, or is there a webcraft reason for using tag pairs? Also, can they have stuff between them, does that affect the text?
First when I wrote the wrap BBCode feature, @sam explicitly asked to me support 3 formats:
[wrap=foo][/wrap]
[wrap=foo]bar[/wrap]
[wrap=foo]
bar
[/wrap]
This is done to be consistent with our existing BBCode usage in Discourse.
I could have a better syntax as: [icon=times] but then it would have to be a plugin and not a theme component.
As an experimentation, I think it’s fine as it is today, and if people were to use it a lot, we could think of having a plugin do this with a more concise syntax.
Another idea I have had is to add an API to add autocompletes symbol in the composer just like we have fore users/categories/emojis… But I’m afraid this would be a nightmare with multiple components choosing their own symbol…
Oh! I need to add support for another bbcode and those) thought that I’d use this as a starting point, but you’re saying that the wrap stuff is handled in core, which explains why I can’t find how it’s handled by your theme component.
My current solution is to use the linked words component and an ugly regex, but I’m still struggling to add the necessary classes to the links.
Right I’ve looked at it a dozen times. And printed out the code for your component and stared at it for hours, trying to understand if the degree to which it’s javascript or ember that I don’t understand. I can’t add a [foo] tag without a plugin? Or can I some how replace wrap in your code with foo to cover my new bbcode?
No you can’t. Because part of it is server side. If you want your own custom BBCode you will have to write a plugin and look at how wrap is implemented for example:
게시물의 문장 내에 아이콘 랩을 사용합니다. 예: 이것은 아이콘입니다 [wrap=icon id=far-check-square][/wrap]
관련 텍스트를 강조한 뒤 '인용’을 선택합니다.
인용된 발췌문에서 아이콘이 엄청나게 커집니다.
강조 인용 시 구문이 다음과 같이 보입니다:
[quote="JammyDodger, post:1, topic:294, full:true"]
이것은 아이콘입니다 
[/quote]
이것은 거대해져 버리는 답변입니다
이는 테마에서 사용할 수 있는 settings.yml에 svg_icons 필드가 있어야 한다는 뜻인가요? 아니면 활성화된 테마 컴포넌트 중 어디에든 존재하는 svg_icons 필드를 사용할 수도 있나요? 만약 후자라면, 이 필드를 해당 테마 컴포넌트에 추가하는 것이 합리적인가요?