How to pass html template as props to Vue component

前端 未结 3 2099
时光取名叫无心
时光取名叫无心 2021-01-06 01:28

I have a textarea component that include html tag and I want to get html in edit mode in this component. I use Laravel to

3条回答
  •  伪装坚强ぢ
    2021-01-06 02:07

    In your case if you want to write your own content editor you can use div with attribute contenteditable="true" rather than textarea. After this you can write your text decoration methods ... The generated html with laravel store in myhtml and use it in vue component.

    Example: I also uploaded to codesandbox [Simple Vue Editor]

    
    
    
    
    
    

提交回复
热议问题