【问题标题】:Formatting options in textArea element in Angular MaterialAngular Material中textArea元素中的格式选项
【发布时间】:2018-05-28 21:20:24
【问题描述】:

Angular 5

我想在页面的文本区域元素中提供项目符号、格式化文本等功能。在使用 Angular 材质元素时有什么方法可以做到这一点?

【问题讨论】:

    标签: angular angular-material2


    【解决方案1】:
    You can't do that but there is another way. delete the textarea.use contenteditable="true".using contenteditable="true" you can edit in your textarea section.
    
    '<section id="textarea" contenteditable="true">
    <ul>
        <li>List item here</li>
        <li>List item here</li>
        <li>List item here</li>
        <li>List item here</li>
    </ul>
    
    </section>'
    

    【讨论】:

    • 谢谢。不过,这是否与其余材料组件的主题一致?
    • 在该区域变为可编辑后,您可以将其与任何父 div 或 html 元素一起放置。
    • 谢谢!我试试看
    猜你喜欢
    • 1970-01-01
    • 2016-04-07
    • 2018-06-18
    • 2018-03-27
    • 2020-11-26
    • 1970-01-01
    • 2016-03-26
    • 2018-03-13
    • 1970-01-01
    相关资源
    最近更新 更多