# Put code in external text file

**URL:** <https://forums.ankiweb.net/t/put-code-in-external-text-file/24141>\
**Category:** Help\
**Created:** [October 23, 2022, 1:22pm UTC](https://forums.ankiweb.net/t/put-code-in-external-text-file/24141 "2022-10-23T13:22:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rantanp](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@rantanp](https://forums.ankiweb.net/u/rantanp)\
**Post date:** [October 23, 2022, 1:22pm UTC](https://forums.ankiweb.net/t/put-code-in-external-text-file/24141/1 "2022-10-23T13:22:31Z")

</div>

I have two separate profiles that use a very similar card type. There’s a quite a bit of code on the card, and it’s getting confusing keeping track of what has been updated and what hasn’t. It would be much easier if I could put it in a single text file which I could then reference on both templates. Is that possible? I can see there might be security reasons why it’s not.

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [October 24, 2022, 12:22am UTC](https://forums.ankiweb.net/t/put-code-in-external-text-file/24141/2 "2022-10-24T00:22:59Z")

</div>

Templates can contain script tags that reference a script in your media folder.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [November 23, 2022, 12:23am UTC](https://forums.ankiweb.net/t/put-code-in-external-text-file/24141/3 "2022-11-23T00:23:20Z")

</div>

Closed on November 23, 2022, 12:23am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
